Package org.apache.sling.cms

## 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

All Methods Instance Methods Abstract Methods
`boolean` `applies​(org.apache.sling.api.resource.Resource resource)` Returns true if the ComponentPolicy applies to the specified resource
`String[]` `getAvailableComponentTypes()` Gets the list of Component Types which will be available when using this component policy
`Map<String,​org.apache.sling.api.resource.Resource>` `getComponentConfigs()` Gets the Component Configurations when using this component policy

### Method Detail

#### 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