Package com.adobe.granite.references
Interface ReferenceList
- All Superinterfaces:
Collection<Reference>,Iterable<Reference>,List<Reference>,SequencedCollection<Reference>
A
ReferenceList provides a collection of References specific to a Resource.
The type of references provided is dependent on the available ReferenceProviders registered in the system.
A ReferenceList can be retrieved by adapting a resource:
resource.adaptTo(ReferenceList.class).
Any resource can be adapted. Whether references are provided for a resource is decided by the references providers.- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionReturns theResourcefor which this reference list was created.Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.List
add, add, addAll, addAll, addFirst, addLast, clear, contains, containsAll, equals, get, getFirst, getLast, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeFirst, removeLast, replaceAll, retainAll, reversed, set, size, sort, spliterator, subList, toArray, toArray
-
Method Details
-
getResource
Resource getResource()Returns theResourcefor which this reference list was created.- Returns:
- The
Resource.
-
subList
Returns aListof allReferences available for the resource backing the references list, filtered by an array ofStrings corresponding to references types. If no items are found, an empty list is returned. Caution: At this stage, the reference list is already created and retrieved references for all the reference types. Use com.adobe.granite.references.ReferenceAggregator#createReferenceList(org.apache.sling.api.resource.Resource, java.lang.String...) to process filtering even before the reference search
-