public interface ClusterController extends SchemaFactory
Modifier and Type | Method and Description |
---|---|
RequestStatus |
createResources(Resource.Type type,
Request request)
Create the resources defined by the properties in the given request object.
|
RequestStatus |
deleteResources(Resource.Type type,
Request request,
Predicate predicate)
Delete the resources selected by the given predicate.
|
ResourceProvider |
ensureResourceProvider(Resource.Type type)
Get the resource provider for the given type, creating it if required.
|
Predicate |
getAmendedPredicate(Resource.Type type,
Predicate predicate)
Gets the amended predicate for a resource.
|
Iterable<Resource> |
getIterable(Resource.Type type,
QueryResponse queryResponse,
Request request,
Predicate predicate,
PageRequest pageRequest,
SortRequest sortRequest)
Get an iterable set of resources from the given set of resources filtered by the
given request and predicate objects.
|
PageResponse |
getPage(Resource.Type type,
QueryResponse queryResponse,
Request request,
Predicate predicate,
PageRequest pageRequest,
SortRequest sortRequest)
Get a page of resources from the given set filtered by the given request,
predicate objects and page request.
|
QueryResponse |
getResources(Resource.Type type,
Request request,
Predicate predicate)
Get the resources of the given type filtered by the given request and
predicate objects.
|
Schema |
getSchema(Resource.Type type)
Get the
schema for the given resource type. |
Set<Resource> |
populateResources(Resource.Type type,
Set<Resource> resources,
Request request,
Predicate predicate)
Populate the given resources from the associated property providers.
|
RequestStatus |
updateResources(Resource.Type type,
Request request,
Predicate predicate)
Update the resources selected by the given predicate with the properties
from the given request object.
|
QueryResponse getResources(Resource.Type type, Request request, Predicate predicate) throws UnsupportedPropertyException, NoSuchResourceException, NoSuchParentResourceException, SystemException
type
- the type of the requested resourcesrequest
- the request object which defines the desired set of propertiespredicate
- the predicate object which filters which resources are returnedUnsupportedPropertyException
- thrown if the request or predicate contain
unsupported property idsSystemException
- an internal exception occurredNoSuchResourceException
- no matching resource(s) foundNoSuchParentResourceException
- a specified parent resource doesn't existSet<Resource> populateResources(Resource.Type type, Set<Resource> resources, Request request, Predicate predicate) throws SystemException
type
- the resource typeresources
- the resources to be populatedrequest
- the requestpredicate
- the predicateSystemException
- if unable to populate the resourcesIterable<Resource> getIterable(Resource.Type type, QueryResponse queryResponse, Request request, Predicate predicate, PageRequest pageRequest, SortRequest sortRequest) throws NoSuchParentResourceException, UnsupportedPropertyException, NoSuchResourceException, SystemException
type
- type of resourcesqueryResponse
- the response from the resource queryrequest
- the requestpredicate
- the predicate object which filters which resources are returnedpageRequest
- the page request for a paginated responsesortRequest
- the sortRequest object which defines if the resources need to be sortedUnsupportedPropertyException
- thrown if the request or predicate contain
unsupported property idsSystemException
- an internal exception occurredNoSuchResourceException
- no matching resource(s) foundNoSuchParentResourceException
- a specified parent resource doesn't existPageResponse getPage(Resource.Type type, QueryResponse queryResponse, Request request, Predicate predicate, PageRequest pageRequest, SortRequest sortRequest) throws UnsupportedPropertyException, SystemException, NoSuchResourceException, NoSuchParentResourceException
type
- type of resourcesqueryResponse
- the response from the resource queryrequest
- the requestpredicate
- the predicate object which filters which resources are returnedpageRequest
- the page request for a paginated responseUnsupportedPropertyException
- thrown if the request or predicate contain
unsupported property idsSystemException
- an internal exception occurredNoSuchResourceException
- no matching resource(s) foundNoSuchParentResourceException
- a specified parent resource doesn't existSchema getSchema(Resource.Type type)
schema
for the given resource type. The schema
for a given resource type describes the properties and categories provided
by that type of resource.getSchema
in interface SchemaFactory
type
- the resource typeResourceProvider ensureResourceProvider(Resource.Type type)
type
- the resource typeRequestStatus createResources(Resource.Type type, Request request) throws UnsupportedPropertyException, SystemException, ResourceAlreadyExistsException, NoSuchParentResourceException
type
- the type of the resourcesrequest
- the request object which defines the set of properties
for the resources to be createdUnsupportedPropertyException
- thrown if the request contains
unsupported property idsSystemException
- an internal exception occurredResourceAlreadyExistsException
- attempted to create a resource that already existsNoSuchParentResourceException
- a specified parent resource doesn't existRequestStatus updateResources(Resource.Type type, Request request, Predicate predicate) throws UnsupportedPropertyException, SystemException, NoSuchResourceException, NoSuchParentResourceException
type
- the type of the resourcesrequest
- the request object which defines the set of properties
for the resources to be updatedpredicate
- the predicate object which can be used to filter which
resources are updatedUnsupportedPropertyException
- thrown if the request or predicate
contain unsupported property idsSystemException
- an internal exception occurredNoSuchResourceException
- no matching resource(s) foundNoSuchParentResourceException
- a specified parent resource doesn't existRequestStatus deleteResources(Resource.Type type, Request request, Predicate predicate) throws UnsupportedPropertyException, SystemException, NoSuchResourceException, NoSuchParentResourceException
type
- the type of the resourcesrequest
- the request object which defines the set of properties
for the resources to be deletedpredicate
- the predicate object which can be used to filter which
resources are deletedUnsupportedPropertyException
- thrown if the predicate contains
unsupported property idsSystemException
- an internal exception occurredNoSuchResourceException
- no matching resource(s) foundNoSuchParentResourceException
- a specified parent resource doesn't existPredicate getAmendedPredicate(Resource.Type type, Predicate predicate)
type
- the type of the resourcepredicate
- the predicate object to use for filteringCopyright © 2022 Apache Software Foundation. All rights reserved.