Package org.gbif.api.service.collections
Interface ContactService
- All Known Subinterfaces:
CollectionEntityService<T>,CollectionService,InstitutionService
public interface ContactService
API Service for the contacts in the collections service.
-
Method Summary
Modifier and TypeMethodDescriptionintaddContactPerson(@NotNull UUID entityKey, @NotNull @Valid Contact contact) Adds aContactcontact to an entity.<T extends CollectionEntity>
voidaddSuggestionContacts(@NotNull UUID entityKey, @NotNull ChangeSuggestion<T> changeSuggestion) Adds aContactIH contact to an entity.listContactPersons(@NotNull UUID entityKey) Lists all the contacts of an entity.voidremoveContactPerson(@NotNull UUID entityKey, @javax.validation.constraints.NotNull int contactKey) Removes aContactcontact from an entity.voidreplaceContactPersons(@NotNull UUID entityKey, List<@Valid Contact> newContactPersons) Removes all the contacts from an entity.voidupdateContactPerson(@NotNull UUID entityKey, @NotNull @Valid Contact contact) Updates aContactcontact in an entity.
-
Method Details
-
listContactPersons
Lists all the contacts of an entity.- Parameters:
entityKey- of the entity- Returns:
- list of
Contact
-
addContactPerson
int addContactPerson(@NotNull @NotNull UUID entityKey, @NotNull @Valid @NotNull @Valid Contact contact) Adds aContactcontact to an entity.- Parameters:
entityKey- key of the entity where the contact will be added to.contact- key of the contact to add.
-
updateContactPerson
void updateContactPerson(@NotNull @NotNull UUID entityKey, @NotNull @Valid @NotNull @Valid Contact contact) Updates aContactcontact in an entity.- Parameters:
entityKey- key of the entity where the contact will be updated.contact- updated contact.
-
removeContactPerson
void removeContactPerson(@NotNull @NotNull UUID entityKey, @NotNull @javax.validation.constraints.NotNull int contactKey) Removes aContactcontact from an entity.- Parameters:
entityKey- key of the entity where the contact will be removed from.contactKey- key of the contact to remove.
-
replaceContactPersons
void replaceContactPersons(@NotNull @NotNull UUID entityKey, List<@Valid Contact> newContactPersons) Removes all the contacts from an entity.- Parameters:
entityKey- key of the entity where the contact will be removed from.newContactPersons- contact persons that will replace the existing ones.
-
addSuggestionContacts
<T extends CollectionEntity> void addSuggestionContacts(@NotNull @NotNull UUID entityKey, @NotNull @NotNull ChangeSuggestion<T> changeSuggestion) Adds aContactIH contact to an entity.- Parameters:
entityKey- key of the entity where the contact will be added to.changeSuggestion- suggestion to get contacts from
-