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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
addContactPerson(@NotNull UUID entityKey, @NotNull @Valid Contact contact)
Adds aContact
contact to an entity.<T extends CollectionEntity>
voidaddSuggestionContacts(@NotNull UUID entityKey, @NotNull ChangeSuggestion<T> changeSuggestion)
Adds aContact
IH contact to an entity.List<Contact>
listContactPersons(@NotNull UUID entityKey)
Lists all the contacts of an entity.void
removeContactPerson(@NotNull UUID entityKey, @javax.validation.constraints.NotNull int contactKey)
Removes aContact
contact from an entity.void
replaceContactPersons(@NotNull UUID entityKey, List<@Valid Contact> newContactPersons)
Removes all the contacts from an entity.void
updateContactPerson(@NotNull UUID entityKey, @NotNull @Valid Contact contact)
Updates aContact
contact in an entity.
-
-
-
Method Detail
-
listContactPersons
List<Contact> listContactPersons(@NotNull @NotNull UUID entityKey)
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 aContact
contact 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 aContact
contact 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 aContact
contact 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 aContact
IH contact to an entity.- Parameters:
entityKey
- key of the entity where the contact will be added to.changeSuggestion
- suggestion to get contacts from
-
-