org.apache.sling.jackrabbit.usermanager.resource
Class AuthorizableResource

java.lang.Object
  extended by org.apache.sling.adapter.SlingAdaptable
      extended by org.apache.sling.jackrabbit.usermanager.resource.AuthorizableResource
All Implemented Interfaces:
Adaptable, Resource

public class AuthorizableResource
extends org.apache.sling.adapter.SlingAdaptable
implements Resource

Resource implementation for Authorizable


Field Summary
 
Fields inherited from interface org.apache.sling.api.resource.Resource
RESOURCE_TYPE_NON_EXISTING
 
Constructor Summary
AuthorizableResource(org.apache.jackrabbit.api.security.user.Authorizable authorizable, ResourceResolver resourceResolver, java.lang.String path)
           
 
Method Summary
<AdapterType>
AdapterType
adaptTo(java.lang.Class<AdapterType> type)
          Adapts the adaptable to another type.
 java.lang.String getPath()
          This resource's path - for now that could be a JCR path.
 ResourceMetadata getResourceMetadata()
          Returns the metadata of this resource.
 ResourceResolver getResourceResolver()
          Returns the ResourceResolver from which this resource has been retrieved.
 java.lang.String getResourceSuperType()
          Returns the super type of the type of the resource or null if the Resource.getResourceType() has no supertype.
 java.lang.String getResourceType()
          The resource type is meant to point to rendering/processing scripts, editing dialogs, etc.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AuthorizableResource

public AuthorizableResource(org.apache.jackrabbit.api.security.user.Authorizable authorizable,
                            ResourceResolver resourceResolver,
                            java.lang.String path)
Method Detail

getPath

public java.lang.String getPath()
Description copied from interface: Resource
This resource's path - for now that could be a JCR path. It's also possible to have an URI for other data sources.

Specified by:
getPath in interface Resource

getResourceMetadata

public ResourceMetadata getResourceMetadata()
Description copied from interface: Resource
Returns the metadata of this resource. The concrete data contained in the ResourceMetadata object returned is implementation specific except for the ResourceMetadata.RESOLUTION_PATH property which is required to be set to the part of the request URI used to resolve the resource.

Specified by:
getResourceMetadata in interface Resource
See Also:
ResourceMetadata

getResourceResolver

public ResourceResolver getResourceResolver()
Description copied from interface: Resource
Returns the ResourceResolver from which this resource has been retrieved.

Specified by:
getResourceResolver in interface Resource

getResourceSuperType

public java.lang.String getResourceSuperType()
Description copied from interface: Resource
Returns the super type of the type of the resource or null if the Resource.getResourceType() has no supertype.

Specified by:
getResourceSuperType in interface Resource

getResourceType

public java.lang.String getResourceType()
Description copied from interface: Resource
The resource type is meant to point to rendering/processing scripts, editing dialogs, etc. It is usually a path in the repository, where scripts and other tools definitions are found, but the ResourceResolver is free to set this to any suitable value such as the primary node type of the JCR node from which the resource is created.

If the resource instance represents a resource which is not actually existing, this method returns the Resource.RESOURCE_TYPE_NON_EXISTING.

Specified by:
getResourceType in interface Resource

adaptTo

public <AdapterType> AdapterType adaptTo(java.lang.Class<AdapterType> type)
Description copied from interface: Adaptable
Adapts the adaptable to another type.

Specified by:
adaptTo in interface Adaptable
Overrides:
adaptTo in class org.apache.sling.adapter.SlingAdaptable
Type Parameters:
AdapterType - The generic type to which this resource is adapted to
Parameters:
type - The Class object of the target type, such as Node.class
Returns:
The adapter target or null if the resource cannot adapt to the requested type

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2007-2009. All Rights Reserved.