Class WCMFilteringResourceWrapper

  • All Implemented Interfaces:
    Adaptable, Resource

    public class WCMFilteringResourceWrapper
    extends FilteringResourceWrapper
    Filters child resources of the given resource based on the given contentResource design properties The current wrapper is filtering child resources using Granite ExpressionResolver It does that by adding custom variables to the ExpressionCustomizer which will use the request as a data vessel. Later the ExpressionResolver via its CustomVariableELResolver will read the registered custom variables to resolve the granite:hide expression. That expression can then refer to the custom variables
    See Also:
    ExpressionResolverImpl, CustomVariableELResolver, ExpressionCustomizer
    • Constructor Detail

      • WCMFilteringResourceWrapper

        public WCMFilteringResourceWrapper​(Resource filteredResource,
                                           Resource contentResource,
                                           ExpressionResolver expressionResolver,
                                           SlingHttpServletRequest slingRequest)
        Filters child resources of the given resource based on the given contentResource design properties e.g. - resource: the content of a dialog that contains fields that are conditionally hidden base on the design properties associated with the contentResource - contentResource: a resource of type image that has design properties associated
        Parameters:
        filteredResource - Resource for which to filter child resources
        contentResource - Content Resource from which to extract design properties
        expressionResolver - Expression Resolver Service
        slingRequest - SlingHttpServletRequest