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 onContact
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description int
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.List<Contact>
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 Detail
-
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
void deleteContact(@NotNull @NotNull UUID targetEntityKey, int contactKey)
Delete an existing Contact from a target entity by contact key.- Parameters:
targetEntityKey
- key of target entitycontactKey
- Contact key to delete
-
listContacts
List<Contact> listContacts(@NotNull @NotNull UUID targetEntityKey)
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
-
-