Class ResourceTypeHierarchyBasedResourcePicker

    • Constructor Detail

      • ResourceTypeHierarchyBasedResourcePicker

        public ResourceTypeHierarchyBasedResourcePicker()
    • 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 interface MergedResourcePicker2
        Parameters:
        resolver - the ResourceResolver
        relativePath - the path relative to the merge root
        relatedResource - an optional resource which is related to the given path (always the parent resource or null)
        Returns:
        a List of Resource objects
      • activate

        protected void activate​(org.apache.sling.resourcemerger.impl.picker.ResourceTypeHierarchyBasedResourcePicker.Configuration config)