Package org.apache.sling.api.resource
Interface AttributableResourceProvider
-
- All Superinterfaces:
ResourceProvider
@Deprecated @ConsumerType public interface AttributableResourceProvider extends ResourceProvider
Deprecated.Use theResourceProvider
The attributes provider is an extensions of aResourceProvider
. It allows to add attributes to the set of available attributes from a resource resolver. This extension is supported for services directly implementing theResourceProvider
interface andResourceProvider
s returned through aResourceProviderFactory
.- 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
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description java.lang.Object
getAttribute(ResourceResolver resolver, java.lang.String name)
Deprecated.Returns the value of the given resource provider attribute ornull
if the attribute is not set or not visible (as e.g.java.util.Collection<java.lang.String>
getAttributeNames(ResourceResolver resolver)
Deprecated.Returns a collection of attribute names whose value can be retrieved calling thegetAttribute(ResourceResolver, String)
method.-
Methods inherited from interface org.apache.sling.api.resource.ResourceProvider
getResource, getResource, listChildren
-
-
-
-
Method Detail
-
getAttributeNames
java.util.Collection<java.lang.String> getAttributeNames(ResourceResolver resolver)
Deprecated.Returns a collection of attribute names whose value can be retrieved calling thegetAttribute(ResourceResolver, String)
method.- Parameters:
resolver
- The resource resolver- Returns:
- A collection of attribute names or
null
- Throws:
java.lang.IllegalStateException
- if this resource provider has already been closed.
-
getAttribute
java.lang.Object getAttribute(ResourceResolver resolver, java.lang.String name)
Deprecated.Returns the value of the given resource provider attribute ornull
if the attribute is not set or not visible (as e.g. security sensitive attributes).- Parameters:
resolver
- The resource resolvername
- 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:
java.lang.NullPointerException
- ifname
isnull
.java.lang.IllegalStateException
- if this resource provider has already been closed.
-
-