public interface ResourceQueryService
Modifier and Type | Method and Description |
---|---|
Set<Resource> |
getAvailableResources(DiscreteResourceId parent)
Returns resources that point available child resources under the specified resource.
|
<T> Set<Resource> |
getAvailableResources(DiscreteResourceId parent,
Class<T> cls)
Returns available resources which are child resources of the specified parent and
whose type is the specified type.
|
<T> Set<T> |
getAvailableResourceValues(DiscreteResourceId parent,
Class<T> cls)
Returns available resource values which are the values of the child resource of
the specified parent and whose type is the specified type.
|
Set<Resource> |
getRegisteredResources(DiscreteResourceId parent)
Returns resources registered under the specified resource.
|
<T> Collection<ResourceAllocation> |
getResourceAllocations(DiscreteResourceId parent,
Class<T> cls)
Returns allocated resources being as children of the specified parent and being the specified resource type.
|
Collection<ResourceAllocation> |
getResourceAllocations(ResourceConsumer consumer)
Returns resources allocated to the specified consumer.
|
List<ResourceAllocation> |
getResourceAllocations(ResourceId id)
Returns resource allocations of the specified resource.
|
boolean |
isAvailable(Resource resource)
Returns the availability of the specified resource.
|
List<ResourceAllocation> getResourceAllocations(ResourceId id)
id
- ID of the resource to check the allocation<T> Collection<ResourceAllocation> getResourceAllocations(DiscreteResourceId parent, Class<T> cls)
T
- type of the resourceparent
- parent resource IDcls
- class to specify a type of resourceCollection<ResourceAllocation> getResourceAllocations(ResourceConsumer consumer)
consumer
- consumer whose allocated resources are to be returnedSet<Resource> getAvailableResources(DiscreteResourceId parent)
parent
- parent resource ID<T> Set<Resource> getAvailableResources(DiscreteResourceId parent, Class<T> cls)
T
- type of the resourceparent
- parent resource IDcls
- class to specify a type of resource<T> Set<T> getAvailableResourceValues(DiscreteResourceId parent, Class<T> cls)
T
- type of the resourceparent
- parent resource IDcls
- class to specify a type of resourceSet<Resource> getRegisteredResources(DiscreteResourceId parent)
parent
- parent resource IDboolean isAvailable(Resource resource)
resource
- resource to check the availability