Package org.gbif.api.service.registry
Interface ContactService
- All Known Subinterfaces:
DatasetService
,InstallationService
,NetworkEntityService<T>
,NetworkService
,NodeService
,OrganizationService
public interface ContactService
Service provides a set of operations on
Contact
.-
Method Summary
Modifier and TypeMethodDescriptionint
addContact
(@NotNull UUID targetEntityKey, @NotNull @Valid Contact contact) Add a new Contact to a target entity.void
deleteContact
(@NotNull UUID targetEntityKey, int contactKey) Delete an existing Contact from a target entity by contact key.listContacts
(@NotNull UUID targetEntityKey) List all contacts of a target entity.void
updateContact
(@NotNull UUID targetEntityKey, @NotNull @Valid Contact contact) Updates the given contact for the target entity.
-
Method Details
-
addContact
int addContact(@NotNull @NotNull UUID targetEntityKey, @NotNull @Valid @NotNull @Valid Contact contact) Add a new Contact to a target entity.- Parameters:
targetEntityKey
- key of target entitycontact
- Contact to add- Returns:
- key of Contact added
-
deleteContact
Delete an existing Contact from a target entity by contact key.- Parameters:
targetEntityKey
- key of target entitycontactKey
- Contact key to delete
-
listContacts
List all contacts of a target entity.- Parameters:
targetEntityKey
- key of target entity- Returns:
- list of contacts that belong to the entity
-
updateContact
void updateContact(@NotNull @NotNull UUID targetEntityKey, @NotNull @Valid @NotNull @Valid Contact contact) Updates the given contact for the target entity.- Parameters:
targetEntityKey
- Which must be the the owner of the contact or else an exception will be thrown.contact
- To update
-