org.apache.sling.capabilities

## Interface CapabilitiesSource

    @ProviderType
    public interface CapabilitiesSource

A CapabilitiesSource provides capabilities, as a Map of key/value pairs. Various types of CapabilitiesSources are meant to be implemented, using Health Checks, OSGi environment status or any suitable input to find out which capabilities are present.

### Method Summary

All Methods Instance Methods Abstract Methods
`Map<String,Object>` `getCapabilities(org.apache.sling.api.resource.ResourceResolver resolver)` Return zero to N capabilities, each being represented by a key/value pair.
`String` `getNamespace()`

### Method Detail

#### getNamespace

    String getNamespace()

Returns:
  the namespace to use to group our capabilities. That name must be unique in a given Sling instance.

#### getCapabilities

    Map<String,Object> getCapabilities(org.apache.sling.api.resource.ResourceResolver resolver)
                                throws Exception

Return zero to N capabilities, each being represented by a key/value pair. Services implementing this interface must be careful to avoid crossing trust boundaries. They should only expose data that is accessible to the ResourceResolver that's passed as a parameter.

Parameters:
  `resolver` - used to establish the user's identity
Returns:
  a Map of capabilities
Throws:
  `Exception` - if the capabilities could not be computed.