public class RenderConditionHelper extends Object
RenderCondition of a resource.| Constructor and Description |
|---|
RenderConditionHelper(SlingHttpServletRequest request,
SlingHttpServletResponse response) |
| Modifier and Type | Method and Description |
|---|---|
RenderCondition |
getRenderCondition(Resource resource)
Returns the render condition of the given resource.
|
RenderCondition |
getRenderCondition(Resource resource,
boolean cache)
Returns the render condition of the given resource.
|
public RenderConditionHelper(@Nonnull SlingHttpServletRequest request, @Nonnull SlingHttpServletResponse response)
@Nonnull public RenderCondition getRenderCondition(@Nonnull Resource resource) throws ServletException, IOException
getRenderCondition(Resource, boolean)
with cache = false.resource - The resource whose render condition needs to be fetchedServletException - When there's a servlet error during includeIOException - When there's an I/O error during include@Nonnull public RenderCondition getRenderCondition(@Nonnull Resource resource, boolean cache) throws ServletException, IOException
granite:rendercondition
subresource. If there is no such subresource,
SimpleRenderCondition.TRUE is returned.resource - The resource whose render condition needs to be fetchedcache - true to cache the result; Use it when checking render
condition of other resource (typically the item resource) so that
the render condition is only resolved once.ServletException - When there's a servlet error during includeIOException - When there's an I/O error during includeCopyright © 2010 - 2020 Adobe. All Rights Reserved