Interface ComponentPolicy


public interface ComponentPolicy
A class to represent a component policy, e.g. the definition of what components are available for a particular container and their shared configurations.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    applies(org.apache.sling.api.resource.Resource resource)
    Returns true if the ComponentPolicy applies to the specified resource
    Gets the list of Component Types which will be available when using this component policy
    Map<String,org.apache.sling.api.resource.Resource>
    Gets the Component Configurations when using this component policy
  • Method Details

    • applies

      boolean applies(org.apache.sling.api.resource.Resource resource)
      Returns true if the ComponentPolicy applies to the specified resource
      Parameters:
      resource - the resource to check
      Returns:
      true if this policy should be enabled for the resource, false if not
    • getAvailableComponentTypes

      String[] getAvailableComponentTypes()
      Gets the list of Component Types which will be available when using this component policy
      Returns:
      the available ComponentTypes
    • getComponentConfigs

      Map<String,org.apache.sling.api.resource.Resource> getComponentConfigs()
      Gets the Component Configurations when using this component policy
      Returns:
      the componentConfigs