preparing contact index page
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
@@ -185,6 +185,7 @@ public class Constants {
|
||||
public static final String UTF8 = UTF_8.displayName();
|
||||
|
||||
public static final String VALUE = "value";
|
||||
public static final String VCARD = "vcard";
|
||||
public static final String VERSION = "version";
|
||||
public static final String VERSIONS = "versions";
|
||||
|
||||
|
||||
@@ -7,6 +7,7 @@ import de.srsoftware.umbrella.core.api.*;
|
||||
public class ModuleRegistry {
|
||||
private BookmarkService bookmarkService;
|
||||
private CompanyService companyService;
|
||||
private ContactService contactService;
|
||||
private DocumentService documentService;
|
||||
private FileService fileService;
|
||||
private ItemService itemService;
|
||||
@@ -29,6 +30,7 @@ public class ModuleRegistry {
|
||||
switch (service) {
|
||||
case BookmarkService bs: singleton.bookmarkService = bs; break;
|
||||
case CompanyService cs: singleton.companyService = cs; break;
|
||||
case ContactService cs: singleton.contactService = cs; break;
|
||||
case DocumentService ds: singleton.documentService = ds; break;
|
||||
case FileService fs: singleton.fileService = fs; break;
|
||||
case ItemService is: singleton.itemService = is; break;
|
||||
@@ -55,6 +57,10 @@ public class ModuleRegistry {
|
||||
return singleton.companyService;
|
||||
}
|
||||
|
||||
public static ContactService contactService() {
|
||||
return singleton.contactService;
|
||||
}
|
||||
|
||||
public static DocumentService documentService(){
|
||||
return singleton.documentService;
|
||||
}
|
||||
|
||||
@@ -4,8 +4,8 @@ package de.srsoftware.umbrella.core.api;
|
||||
import de.srsoftware.umbrella.core.exceptions.UmbrellaException;
|
||||
import de.srsoftware.umbrella.core.model.Contact;
|
||||
import de.srsoftware.umbrella.core.model.UmbrellaUser;
|
||||
import java.util.Collection;
|
||||
import java.util.Map;
|
||||
|
||||
public interface ContactService {
|
||||
Collection<Contact> listContactsOf(UmbrellaUser user) throws UmbrellaException;
|
||||
Map<Long, Contact> listContactsOf(UmbrellaUser user) throws UmbrellaException;
|
||||
}
|
||||
|
||||
@@ -1,8 +1,7 @@
|
||||
/* © SRSoftware 2025 */
|
||||
package de.srsoftware.umbrella.core.model;
|
||||
|
||||
import static de.srsoftware.umbrella.core.Constants.DATA;
|
||||
import static de.srsoftware.umbrella.core.Constants.ID;
|
||||
import static de.srsoftware.umbrella.core.Constants.*;
|
||||
|
||||
import de.srsoftware.tools.Mappable;
|
||||
import java.sql.ResultSet;
|
||||
@@ -16,6 +15,6 @@ public record Contact(long id, String vcard) implements Mappable {
|
||||
|
||||
@Override
|
||||
public Map<String, Object> toMap() {
|
||||
return Map.of();
|
||||
return Map.of(ID,id,VCARD,vcard);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user