Class RenderConditionHelper

java.lang.Object
com.adobe.granite.ui.components.rendercondition.RenderConditionHelper

public class RenderConditionHelper extends Object
A helper to get RenderCondition of a resource.
  • Constructor Details

  • Method Details

    • getRenderCondition

      @Nonnull public RenderCondition getRenderCondition(@Nonnull Resource resource) throws ServletException, IOException
      Returns the render condition of the given resource. This method is an overload of getRenderCondition(Resource, boolean) with cache = false.
      Parameters:
      resource - The resource whose render condition needs to be fetched
      Returns:
      The render condition
      Throws:
      ServletException - When there's a servlet error during include
      IOException - When there's an I/O error during include
    • getRenderCondition

      @Nonnull public RenderCondition getRenderCondition(@Nonnull Resource resource, boolean cache) throws ServletException, IOException
      Returns the render condition of the given resource. The render condition is specified by granite:rendercondition subresource. If there is no such subresource, SimpleRenderCondition.TRUE is returned.
      Parameters:
      resource - The resource whose render condition needs to be fetched
      cache - 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.
      Returns:
      The render condition
      Throws:
      ServletException - When there's a servlet error during include
      IOException - When there's an I/O error during include