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 TypeMethodDescriptionintaddMasterSourceMetadata(UUID targetEntityKey, MasterSourceMetadata masterSourceMetadata) AddsMasterSourceMetadatato an entity.voiddeleteMasterSourceMetadata(UUID targetEntityKey) Removes theMasterSourceMetadatafrom 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 theMasterSourceMetadataof the entity.voidReplaces a entity with another.voidUpdates an existing entity.Methods inherited from interface org.gbif.api.service.registry.CommentService
addComment, deleteComment, listCommentsMethods inherited from interface org.gbif.api.service.collections.ContactService
addContactPerson, addSuggestionContacts, listContactPersons, removeContactPerson, replaceContactPersons, updateContactPersonMethods inherited from interface org.gbif.api.service.collections.CrudService
create, delete, exists, get, updateMethods inherited from interface org.gbif.api.service.registry.IdentifierService
addIdentifier, deleteIdentifier, listIdentifiersMethods inherited from interface org.gbif.api.service.registry.MachineTagService
addMachineTag, addMachineTag, addMachineTag, deleteMachineTag, deleteMachineTags, deleteMachineTags, deleteMachineTags, deleteMachineTags, listMachineTagsMethods inherited from interface org.gbif.api.service.collections.OccurrenceMappingService
addOccurrenceMapping, deleteOccurrenceMapping, listOccurrenceMappingsMethods inherited from interface org.gbif.api.service.registry.PrimaryIdentifierService
updateIdentifierMethods 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
AddsMasterSourceMetadatato an entity.- Parameters:
targetEntityKey- key of the entity to add the metadata tomasterSourceMetadata- metadata to add- Returns:
- key of the created metadata
-
deleteMasterSourceMetadata
Removes theMasterSourceMetadatafrom an entity.- Parameters:
targetEntityKey- key of the entity whose metadata will be deleted
-
getMasterSourceMetadata
Returns theMasterSourceMetadataof 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:
Optionalwith 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.
-