T
- the type of the resource class provided by this ResourceProvider object.public interface ResourceProvider<T>
Modifier and Type | Method and Description |
---|---|
void |
createResource(String resourceId,
Map<String,Object> properties)
Create a resource with the given id and given property values.
|
boolean |
deleteResource(String resourceId)
Delete the resource identified by the given resource id.
|
T |
getResource(String resourceId,
Set<String> properties)
Get a single resource from the given id.
|
Set<T> |
getResources(ReadRequest request)
Get all of the resources.
|
boolean |
updateResource(String resourceId,
Map<String,Object> properties)
Update the resource identified by given resource id with the given property values.
|
T getResource(String resourceId, Set<String> properties) throws SystemException, NoSuchResourceException, UnsupportedPropertyException
resourceId
- the id of the requested resourceproperties
- the set of requested property idsSystemException
- an internal system exception occurredNoSuchResourceException
- a requested resource doesn't existUnsupportedPropertyException
- the request contains unsupported property idsSet<T> getResources(ReadRequest request) throws SystemException, NoSuchResourceException, UnsupportedPropertyException
request
- the read requestSystemException
- an internal system exception occurredNoSuchResourceException
- a requested resource doesn't existUnsupportedPropertyException
- the request contains unsupported property idsvoid createResource(String resourceId, Map<String,Object> properties) throws SystemException, ResourceAlreadyExistsException, NoSuchResourceException, UnsupportedPropertyException
resourceId
- the id of the requested resourceproperties
- the map of property values to set on the new resourceSystemException
- an internal system exception occurredResourceAlreadyExistsException
- attempted to create a resource which already existsNoSuchResourceException
- a parent resource doesn't existUnsupportedPropertyException
- the request contains unsupported property idsboolean updateResource(String resourceId, Map<String,Object> properties) throws SystemException, NoSuchResourceException, UnsupportedPropertyException
resourceId
- the id of the requested resourceproperties
- the map of property values to update on the resourceSystemException
- an internal system exception occurredNoSuchResourceException
- a requested resource doesn't existUnsupportedPropertyException
- the request contains unsupported property idsboolean deleteResource(String resourceId) throws SystemException, NoSuchResourceException, UnsupportedPropertyException
resourceId
- the id of the requested resourceSystemException
- an internal system exception occurredNoSuchResourceException
- the resource instance to be deleted doesn't existUnsupportedPropertyException
- the request contains unsupported property idsCopyright © 2015. All rights reserved.