public interface ResourceCollectionManager
ResourceCollectionManager defines the API to get, create and delete
resource collections ResourceCollection
.
The ResourceCollectionManager service can be retrieved by looking it up from the
service registry or by adapting a ResourceResolver
.
Modifier and Type | Method and Description |
---|---|
ResourceCollection |
createCollection(Resource parentResource,
java.lang.String name)
This method creates a resource collection with a given name under the
parentResource . |
ResourceCollection |
createCollection(Resource parentResource,
java.lang.String name,
java.util.Map<java.lang.String,java.lang.Object> properties)
This method creates a resource collection with a given name under the
parentResource . |
boolean |
deleteCollection(Resource resource)
Removes the
ResourceCollection corresponding to the collection represented by
resource . |
ResourceCollection |
getCollection(Resource resource)
This method returns a resource collection for the given
resource
that represents a ResourceCollection . |
ResourceCollection getCollection(Resource resource)
resource
that represents a ResourceCollection
.
It returns null if given resource is not a collectionresource
- resource that represents a collectionResourceCollection
representing the collection.ResourceCollection createCollection(Resource parentResource, java.lang.String name) throws PersistenceException
parentResource
.
The changes are transient and have to be saved by resourceResolver.commit()parentResource
- parent resource where collection needs to be created.name
- The name for collection.ResourceCollection
representing the created collection.{@link
- PersistenceException} if the operation failsPersistenceException
ResourceCollection createCollection(Resource parentResource, java.lang.String name, java.util.Map<java.lang.String,java.lang.Object> properties) throws PersistenceException
parentResource
.
The changes are transient and have to be saved by resourceResolver.commit()parentResource
- parent resource where collection needs to be created.name
- The name for collection.properties
- The additional data for resource collectionResourceCollection
representing the created collection.{@link
- PersistenceException} if the operation failsPersistenceException
boolean deleteCollection(Resource resource) throws PersistenceException
ResourceCollection
corresponding to the collection represented by
resource
.
The changes are transient and have to be saved by resourceResolver.commit()resource
- resource representing a collection to be deleted.true
if the collection was successfully removed.{@link
- PersistenceException} if the operation failsPersistenceException
"Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"