public interface Resources<T extends DataObjectRestRep>
Modifier and Type | Method and Description |
---|---|
void |
addTags(java.net.URI id,
java.util.Set<java.lang.String> add)
Adds a set of tags to the tags for a given resource.
|
T |
get(RelatedResourceRep ref)
Gets a resource by a reference.
|
T |
get(java.net.URI id)
Gets a resource by ID.
|
java.util.List<T> |
getByIds(java.util.Collection<java.net.URI> ids)
Fetches the resource values for the given IDs.
|
java.util.List<T> |
getByIds(java.util.Collection<java.net.URI> ids,
ResourceFilter<T> filter)
Fetches the resource values for the given IDs, optionally filtering the results as they are returned.
|
java.util.List<T> |
getByRefs(java.util.Collection<? extends RelatedResourceRep> refs)
Fetches the resource values for the given references.
|
java.util.List<T> |
getByRefs(java.util.Collection<? extends RelatedResourceRep> refs,
ResourceFilter<T> filter)
Fetches the resource values for the given references, optionally filtering the results as they are returned.
|
java.util.Set<java.lang.String> |
getTags(java.net.URI id)
Gets the set of all tags assigned to the given resource.
|
void |
removeTags(java.net.URI id,
java.util.Set<java.lang.String> remove)
Removes a set of tags to the tags for a given resource.
|
SearchBuilder<T> |
search()
Creates a builder for building up search queries.
|
void |
updateTags(java.net.URI id,
TagAssignment tags)
Updates the tags for a given resource.
|
T get(java.net.URI id)
Gets a resource by ID.
API Call: GET /RESOURCE_PATH/{id}
id
- the resource ID.T get(RelatedResourceRep ref)
Gets a resource by a reference.
Convenience method for calling get(ref.getId()).
ref
- the resource reference.java.util.List<T> getByRefs(java.util.Collection<? extends RelatedResourceRep> refs)
Fetches the resource values for the given references.
Convenience method for calling getByIds(*resources.id).
refs
- the resource references.java.util.List<T> getByRefs(java.util.Collection<? extends RelatedResourceRep> refs, ResourceFilter<T> filter)
Fetches the resource values for the given references, optionally filtering the results as they are returned.
Convenience method for calling getByIds(*resources.id, filter).
refs
- the resource references.filter
- the resource filter to apply to the results as they are returned (optional).java.util.List<T> getByIds(java.util.Collection<java.net.URI> ids)
Fetches the resource values for the given IDs.
API Call: GET /RESOURCE_PATH/{id}
ids
- the resource IDs.java.util.List<T> getByIds(java.util.Collection<java.net.URI> ids, ResourceFilter<T> filter)
Fetches the resource values for the given IDs, optionally filtering the results as they are returned.
API Call: GET /RESOURCE_PATH/{id}
ids
- the resource IDs.filter
- the resource filter to apply to the results as they are returned (optional).java.util.Set<java.lang.String> getTags(java.net.URI id)
id
- the ID of the resource.void updateTags(java.net.URI id, TagAssignment tags)
id
- the ID of the resource.tags
- the tags to add/remove.void addTags(java.net.URI id, java.util.Set<java.lang.String> add)
id
- the ID of the resource.add
- the tags to add.void removeTags(java.net.URI id, java.util.Set<java.lang.String> remove)
id
- the ID of the resource.remove
- the tags to remove.SearchBuilder<T> search()
Creates a builder for building up search queries.