Interface ConditionalWebFragment

  • All Superinterfaces:
    WebFragment

    public interface ConditionalWebFragment
    extends WebFragment
    Extension of WebFragment providing conditional check
    • Method Detail

      • isApplicable

        boolean isApplicable​(org.apache.sling.api.SlingHttpServletRequest request)
        Checks if web fragment is applicable in the context of request. It controls if web fragment is returned by RestAction. It can be used to provide a condition that controls e.g displaying fragment in html.
        Parameters:
        request -
        Returns:
        true if provided condition is met, false otherwise