Package org.apache.sling.api.resource

# Interface AttributableResourceProvider

All Superinterfaces:
  `ResourceProvider`

@Deprecated @ConsumerType public interface AttributableResourceProvider extends ResourceProvider
Deprecated.
Use the `ResourceProvider`
The attributes provider is an extensions of a `ResourceProvider`. It allows to add attributes to the set of available attributes from a resource resolver. This extension is supported for services directly implementing the `ResourceProvider` interface and `ResourceProvider`s returned through a `ResourceProviderFactory`.

Since:
  2.2 (Sling API Bundle 2.2.0)
See Also:
  - `ResourceResolver.getAttribute(String)`
  - `ResourceResolver.getAttributeNames()`

## Field Summary

### Fields inherited from interface org.apache.sling.api.resource.ResourceProvider

`OWNS_ROOTS, RESOURCE_TYPE_SYNTHETIC, ROOTS, SERVICE_NAME, USE_RESOURCE_ACCESS_SECURITY`

## Method Summary

Modifier and Type
Method
Description
`Object`
`getAttribute(ResourceResolver resolver, String name)`
Deprecated.
Returns the value of the given resource provider attribute or `null` if the attribute is not set or not visible (as e.g.
`Collection<String>`
`getAttributeNames(ResourceResolver resolver)`
Deprecated.
Returns a collection of attribute names whose value can be retrieved calling the `getAttribute(ResourceResolver, String)` method.

### Methods inherited from interface org.apache.sling.api.resource.ResourceProvider

`getResource, getResource, listChildren`

## Method Details

### getAttributeNames

Collection<String> getAttributeNames(ResourceResolver resolver)
Deprecated.
Returns a collection of attribute names whose value can be retrieved calling the `getAttribute(ResourceResolver, String)` method.

Parameters:
  `resolver` - The resource resolver
Returns:
  A collection of attribute names or `null`
Throws:
  `IllegalStateException` - if this resource provider has already been closed.

### getAttribute

Object getAttribute(ResourceResolver resolver, String name)
Deprecated.
Returns the value of the given resource provider attribute or `null` if the attribute is not set or not visible (as e.g. security sensitive attributes).

Parameters:
  `resolver` - The resource resolver
  `name` - The name of the attribute to access
Returns:
  The value of the attribute or `null` if the attribute is not set or not accessible.
Throws:
  `NullPointerException` - if `name` is `null`.
  `IllegalStateException` - if this resource provider has already been closed.