public interface ReferenceList extends java.util.List<Reference>
ReferenceList
provides a collection of Reference
s specific to a Resource
.
The type of references provided is dependent on the available ReferenceProvider
s 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.Modifier and Type | Method and Description |
---|---|
Resource |
getResource()
Returns the
Resource for which this reference list was created. |
java.util.List<Reference> |
subList(java.lang.String... types)
Returns a
List of all Reference s available for the resource backing the references list,
filtered by an array of String s corresponding to references types. |
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
Resource getResource()
Resource
for which this reference list was created.Resource
.java.util.List<Reference> subList(java.lang.String... types)
List
of all Reference
s available for the resource backing the references list,
filtered by an array of String
s 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 searchList
of Reference
s, or an empty collection if no references were found."Copyright © 2010 - 2020 Adobe Systems Incorporated. All Rights Reserved"