Package com.day.cq.wcm.api
Class WCMFilteringResourceWrapper
- java.lang.Object
-
- org.apache.sling.api.resource.ResourceWrapper
-
- com.adobe.granite.ui.components.FilteringResourceWrapper
-
- com.day.cq.wcm.api.WCMFilteringResourceWrapper
-
public class WCMFilteringResourceWrapper extends FilteringResourceWrapper
Filters child resources of the givenresourcebased on the givencontentResourcedesign properties The current wrapper is filtering child resources using GraniteExpressionResolverIt does that by adding custom variables to theExpressionCustomizerwhich will use the request as a data vessel. Later theExpressionResolvervia itsCustomVariableELResolverwill read the registered custom variables to resolve thegranite:hideexpression. That expression can then refer to the custom variables- See Also:
ExpressionResolverImpl,CustomVariableELResolver,ExpressionCustomizer
-
-
Field Summary
-
Fields inherited from interface org.apache.sling.api.resource.Resource
RESOURCE_TYPE_NON_EXISTING
-
-
Constructor Summary
Constructors Constructor Description WCMFilteringResourceWrapper(Resource filteredResource, Resource contentResource, ExpressionResolver expressionResolver, SlingHttpServletRequest slingRequest)Filters child resources of the givenresourcebased on the givencontentResourcedesign properties e.g.
-
Method Summary
-
Methods inherited from class com.adobe.granite.ui.components.FilteringResourceWrapper
getChild, getChildren, getResourceType, hasChildren, listChildren
-
Methods inherited from class org.apache.sling.api.resource.ResourceWrapper
adaptTo, getName, getParent, getPath, getResource, getResourceMetadata, getResourceResolver, getResourceSuperType, getValueMap, isResourceType, toString
-
-
-
-
Constructor Detail
-
WCMFilteringResourceWrapper
public WCMFilteringResourceWrapper(Resource filteredResource, Resource contentResource, ExpressionResolver expressionResolver, SlingHttpServletRequest slingRequest)
Filters child resources of the givenresourcebased on the givencontentResourcedesign properties e.g. - resource: the content of a dialog that contains fields that are conditionally hidden base on the design properties associated with thecontentResource- contentResource: a resource of type image that has design properties associated- Parameters:
filteredResource- Resource for which to filter child resourcescontentResource- Content Resource from which to extract design propertiesexpressionResolver- Expression Resolver ServiceslingRequest-SlingHttpServletRequest
-
-