Package com.adobe.granite.references
Interface ReferenceList
-
- All Superinterfaces:
java.util.Collection<Reference>,java.lang.Iterable<Reference>,java.util.List<Reference>
@ProviderType public interface ReferenceList extends java.util.List<Reference>
AReferenceListprovides a collection ofReferences specific to aResource. The type of references provided is dependent on the availableReferenceProviders registered in the system. AReferenceListcan 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ResourcegetResource()Returns theResourcefor which this reference list was created.java.util.List<Reference>subList(java.lang.String... types)Returns aListof allReferences available for the resource backing the references list, filtered by an array ofStrings corresponding to references types.-
Methods inherited from interface java.util.List
add, add, addAll, addAll, clear, contains, containsAll, equals, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray
-
-
-
-
Method Detail
-
getResource
Resource getResource()
Returns theResourcefor which this reference list was created.- Returns:
- The
Resource.
-
subList
java.util.List<Reference> subList(java.lang.String... types)
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- Returns:
- A filtered
ListofReferences, or an empty collection if no references were found.
-
-