use of de.symeda.sormas.api.contact.ContactListEntryDto in project SORMAS-Project by hzi-braunschweig.
the class ContactFacadeEjb method getEntriesList.
@Override
public List<ContactListEntryDto> getEntriesList(String personUuid, Integer first, Integer max) {
Long personId = personFacade.getPersonIdByUuid(personUuid);
List<ContactListEntryDto> entries = service.getEntriesList(personId, first, max);
Pseudonymizer pseudonymizer = Pseudonymizer.getDefault(userService::hasRight, I18nProperties.getCaption(Captions.inaccessibleValue));
pseudonymizer.pseudonymizeDtoCollection(ContactListEntryDto.class, entries, ContactListEntryDto::isInJurisdiction, null);
return entries;
}
use of de.symeda.sormas.api.contact.ContactListEntryDto in project SORMAS-Project by hzi-braunschweig.
the class ContactList method drawDisplayedEntries.
@Override
protected void drawDisplayedEntries() {
List<ContactListEntryDto> displayedEntries = getDisplayedEntries();
UserProvider currentUser = UserProvider.getCurrent();
for (int i = 0, displayedEntriesSize = displayedEntries.size(); i < displayedEntriesSize; i++) {
final ContactListEntryDto contactListEntryDto = displayedEntries.get(i);
final ContactListEntry listEntry = new ContactListEntry(contactListEntryDto);
if (currentUser != null && currentUser.hasUserRight(UserRight.CONTACT_EDIT)) {
listEntry.addEditButton("edit-contact-" + i, (Button.ClickListener) event -> ControllerProvider.getContactController().navigateToData(listEntry.getContactListEntryDto().getUuid()));
}
listLayout.addComponent(listEntry);
}
}
Aggregations