Package org.gbif.api.service.collections
Interface CollectionEntityService<T extends CollectionEntity>
- All Superinterfaces:
CommentService
,ContactService
,CrudService<T>
,IdentifierService
,MachineTagService
,OccurrenceMappingService
,PrimaryIdentifierService
,TagService
- All Known Subinterfaces:
CollectionService
,InstitutionService
public interface CollectionEntityService<T extends CollectionEntity>
extends CrudService<T>, PrimaryIdentifierService, TagService, MachineTagService, CommentService, ContactService, OccurrenceMappingService
-
Method Summary
Modifier and TypeMethodDescriptionint
addMasterSourceMetadata
(UUID targetEntityKey, MasterSourceMetadata masterSourceMetadata) AddsMasterSourceMetadata
to an entity.void
deleteMasterSourceMetadata
(UUID targetEntityKey) Removes theMasterSourceMetadata
from an entity.findByMasterSource
(Source source, String sourceId) Finds the collection entity whose master data metadata matches with the parameters received.getMasterSourceMetadata
(@NotNull UUID targetEntityKey) Returns theMasterSourceMetadata
of the entity.void
Replaces a entity with another.void
Updates an existing entity.Methods inherited from interface org.gbif.api.service.registry.CommentService
addComment, deleteComment, listComments
Methods inherited from interface org.gbif.api.service.collections.ContactService
addContactPerson, addSuggestionContacts, listContactPersons, removeContactPerson, replaceContactPersons, updateContactPerson
Methods inherited from interface org.gbif.api.service.collections.CrudService
create, delete, exists, get, update
Methods inherited from interface org.gbif.api.service.registry.IdentifierService
addIdentifier, deleteIdentifier, listIdentifiers
Methods inherited from interface org.gbif.api.service.registry.MachineTagService
addMachineTag, addMachineTag, addMachineTag, deleteMachineTag, deleteMachineTags, deleteMachineTags, deleteMachineTags, deleteMachineTags, listMachineTags
Methods inherited from interface org.gbif.api.service.collections.OccurrenceMappingService
addOccurrenceMapping, deleteOccurrenceMapping, listOccurrenceMappings
Methods inherited from interface org.gbif.api.service.registry.PrimaryIdentifierService
updateIdentifier
Methods inherited from interface org.gbif.api.service.registry.TagService
addTag, addTag, deleteTag, listTags
-
Method Details
-
replace
Replaces a entity with another. The entity replaced is also deleted. -
addMasterSourceMetadata
AddsMasterSourceMetadata
to an entity.- Parameters:
targetEntityKey
- key of the entity to add the metadata tomasterSourceMetadata
- metadata to add- Returns:
- key of the created metadata
-
deleteMasterSourceMetadata
Removes theMasterSourceMetadata
from an entity.- Parameters:
targetEntityKey
- key of the entity whose metadata will be deleted
-
getMasterSourceMetadata
Returns theMasterSourceMetadata
of the entity.- Parameters:
targetEntityKey
- key of the entity- Returns:
MasterSourceMetadata
-
findByMasterSource
Finds the collection entity whose master data metadata matches with the parameters received.- Parameters:
source
- source of the metadatasourceId
- source Id of the metadata- Returns:
Optional
with the collection entity found
-
update
Updates an existing entity.- Parameters:
entity
- that will replace the existing entity.lockFields
- indicates if fields that come from an external master source has to be locked.
-