Class ResourceTypeHierarchyBasedResourcePicker
- java.lang.Object
-
- org.apache.sling.resourcemerger.impl.picker.ResourceTypeHierarchyBasedResourcePicker
-
- All Implemented Interfaces:
MergedResourcePicker2
public class ResourceTypeHierarchyBasedResourcePicker extends Object implements MergedResourcePicker2
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_ROOT
-
Fields inherited from interface org.apache.sling.resourcemerger.spi.MergedResourcePicker2
MERGE_ROOT, READ_ONLY, TRAVERSE_PARENT
-
-
Constructor Summary
Constructors Constructor Description ResourceTypeHierarchyBasedResourcePicker()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
activate(org.apache.sling.resourcemerger.impl.picker.ResourceTypeHierarchyBasedResourcePicker.Configuration config)
List<org.apache.sling.api.resource.Resource>
pickResources(org.apache.sling.api.resource.ResourceResolver resolver, String relativePath, org.apache.sling.api.resource.Resource relatedResource)
Method invoked by the MergingResourceProvider to identify the resources to be merged for a given relative path.
-
-
-
Field Detail
-
DEFAULT_ROOT
public static final String DEFAULT_ROOT
- See Also:
- Constant Field Values
-
-
Method Detail
-
pickResources
public List<org.apache.sling.api.resource.Resource> pickResources(org.apache.sling.api.resource.ResourceResolver resolver, String relativePath, org.apache.sling.api.resource.Resource relatedResource)
Description copied from interface:MergedResourcePicker2
Method invoked by the MergingResourceProvider to identify the resources to be merged for a given relative path. The resources returned may be either resources returned from the ResourceResolver directory or an instance of NonExistingResource. Returning an empty list will cause the resource to not exist for consumers (resolver.getResource(path) will return null).- Specified by:
pickResources
in interfaceMergedResourcePicker2
- Parameters:
resolver
- the ResourceResolverrelativePath
- the path relative to the merge rootrelatedResource
- an optional resource which is related to the given path (always the parent resource ornull
)- Returns:
- a List of Resource objects
-
activate
protected void activate(org.apache.sling.resourcemerger.impl.picker.ResourceTypeHierarchyBasedResourcePicker.Configuration config)
-
-