Package org.gbif.api.service.registry
Interface NetworkEntityService<T>
- All Superinterfaces:
CommentService
,ContactService
,EndpointService
,IdentifierService
,MachineTagService
,TagService
- All Known Subinterfaces:
DatasetService
,InstallationService
,NetworkService
,NodeService
,OrganizationService
public interface NetworkEntityService<T>
extends MachineTagService, TagService, CommentService, IdentifierService, EndpointService, ContactService
-
Method Summary
Modifier and TypeMethodDescriptionCreates a new entity.void
Deletes an entity by the provided key.Gets an entity by the provided key.getTitles
(@NotNull Collection<UUID> keys) Retrieves all titles for the requested entity keys in one goDeprecated.listByIdentifier
(String identifier, Pageable page) Deprecated.listByIdentifier
(IdentifierType type, String identifier, Pageable page) Deprecated.listByMachineTag
(String namespace, String name, String value, Pageable page) Deprecated.Deprecated.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.registry.ContactService
addContact, deleteContact, listContacts, updateContact
Methods inherited from interface org.gbif.api.service.registry.EndpointService
addEndpoint, deleteEndpoint, listEndpoints
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.registry.TagService
addTag, addTag, deleteTag, listTags
-
Method Details
-
create
Creates a new entity. Data should be valid.- Parameters:
entity
- to create- Returns:
- a key of the newly created entity.
-
update
Updates an existing entity. Data should be valid.- Parameters:
entity
- to update.
-
delete
Deletes an entity by the provided key.- Parameters:
key
- of the entity to delete.
-
get
Gets an entity by the provided key.- Parameters:
key
- of the entity to get- Returns:
- an entity.
-
getTitles
Retrieves all titles for the requested entity keys in one go- Parameters:
keys
- entity keys to get titles- Returns:
- pairs of entity key - entity title.
-
list
Deprecated.Used to retrieve a list of network entities.To iterate over all entities you can use code like this:
PagingRequest req = new PagingRequest(); PagingResponse<T> response; do { response = service.list(req); for (T obj : response.getResults()) { doStuff(); } req.nextPage(); } while (!response.isEndOfRecords());
- Returns:
- a list of network entities ordered by their creation date, newest coming first
Deprecated: use the list with parameters service.
-
search
Deprecated.A simple search that supports paging.- Returns:
- a pageable response of network entities, with accurate counts.
Deprecated: use the list with parameters service.
-
listByIdentifier
@Deprecated PagingResponse<T> listByIdentifier(IdentifierType type, String identifier, @Nullable Pageable page) Deprecated.Lists the entities by the provided identifier, scoped by type.- Returns:
- a pageable response of network entities, with accurate counts for the identifier
provided
Deprecated: use the list with parameters service.
-
listByIdentifier
Deprecated.Lists the entities by the provided identifier, which may be of any type.- Returns:
- a pageable response of network entities, with accurate counts for the identifier
provided
Deprecated: use the list with parameters service.
-
listByMachineTag
@Deprecated PagingResponse<T> listByMachineTag(String namespace, @Nullable String name, @Nullable String value, @Nullable Pageable page) Deprecated.Lists the entities having a machine tag in the provided namespace, with the provided name and value.- Returns:
- a pageable response of network entities, with accurate counts for the machine tag
provided
Deprecated: use the list with parameters service.
-