Package com.day.cq.dam.api.collection
Interface SmartCollection
-
- All Superinterfaces:
ResourceCollection
public interface SmartCollection extends ResourceCollection
This interface defines a SmartCollection. Should be used, when working with Smart Collections i.e. collection with no static member, rather a query string.
-
-
Field Summary
-
Fields inherited from interface org.apache.sling.resource.collection.ResourceCollection
RESOURCE_TYPE
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Query
getQuery()
returns the query object that is used to query collection members.java.util.Iterator<Resource>
getResources(long offset, long limit)
Returns an iterator over resources referred in the collection starting from position specified by the parameter "offset".-
Methods inherited from interface org.apache.sling.resource.collection.ResourceCollection
add, add, contains, getName, getPath, getProperties, getResources, orderBefore, remove
-
-
-
-
Method Detail
-
getQuery
Query getQuery() throws java.io.IOException, RepositoryException
returns the query object that is used to query collection members.- Returns:
Query
object- Throws:
java.io.IOException
- thrown if an error occurs while reading from the binary streamRepositoryException
- thrown if an error occurs while accessing items in repository
-
getResources
java.util.Iterator<Resource> getResources(long offset, long limit)
Returns an iterator over resources referred in the collection starting from position specified by the parameter "offset". The size of the iterator is limited by the parameter "limit".- Returns:
- iterator over the subset of resources referred in collection.
-
-