Package org.apache.sling.jackrabbit.usermanager.impl.resource

# Class AuthorizableResource

java.lang.Object
org.apache.sling.api.adapter.SlingAdaptable
org.apache.sling.api.resource.AbstractResource
org.apache.sling.jackrabbit.usermanager.impl.resource.BaseResource
org.apache.sling.jackrabbit.usermanager.impl.resource.AuthorizableResource

All Implemented Interfaces:
  `org.apache.sling.api.adapter.Adaptable`, `org.apache.sling.api.resource.Resource`

Direct Known Subclasses:
  `NestedAuthorizableResource`

@Adaptable(adaptableClass=org.apache.sling.api.resource.Resource.class,adapters={@Adapter({java.util.Map.class,org.apache.sling.api.resource.ValueMap.class,org.apache.jackrabbit.api.security.user.Authorizable.class}),@Adapter(condition="If the resource is an AuthorizableResource and represents a JCR User",value=org.apache.jackrabbit.api.security.user.User.class),@Adapter(condition="If the resource is an AuthorizableResource and represents a JCR Group",value=org.apache.jackrabbit.api.security.user.Group.class)}) public class AuthorizableResource extends BaseResource
Resource implementation for Authorizable

## Field Summary

Fields
Modifier and Type
Field
Description
`protected final org.apache.jackrabbit.api.security.user.Authorizable`
`authorizable`
`protected final SystemUserManagerPaths`
`systemUserManagerPaths`

### Fields inherited from class org.apache.sling.jackrabbit.usermanager.impl.resource.BaseResource

`resourceResolver`

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

`RESOURCE_TYPE_NON_EXISTING`

## Constructor Summary

Constructors
Constructor
Description
`AuthorizableResource(org.apache.jackrabbit.api.security.user.Authorizable authorizable, org.apache.sling.api.resource.ResourceResolver resourceResolver, String path, SystemUserManagerPaths systemUserManagerPaths)`

## Method Summary

Modifier and Type
Method
Description
`<T> T`
`adaptTo(Class<T> type)`
`String`
`getResourceType()`
`protected String`
`toResourceType(org.apache.jackrabbit.api.security.user.Authorizable authorizable)`
determine the resource type for the authorizable.
`String`
`toString()`

### Methods inherited from class org.apache.sling.jackrabbit.usermanager.impl.resource.BaseResource

`getPath, getResourceMetadata, getResourceResolver, getResourceSuperType`

### Methods inherited from class org.apache.sling.api.resource.AbstractResource

`getChild, getChildren, getName, getParent, getValueMap, hasChildren, isResourceType, listChildren`

### Methods inherited from class org.apache.sling.api.adapter.SlingAdaptable

`setAdapterManager, unsetAdapterManager`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

## Field Details

### authorizable

protected final org.apache.jackrabbit.api.security.user.Authorizable authorizable

### systemUserManagerPaths

protected final SystemUserManagerPaths systemUserManagerPaths

## Constructor Details

### AuthorizableResource

public AuthorizableResource(org.apache.jackrabbit.api.security.user.Authorizable authorizable, org.apache.sling.api.resource.ResourceResolver resourceResolver, String path, SystemUserManagerPaths systemUserManagerPaths)

## Method Details

### toResourceType

protected String toResourceType(org.apache.jackrabbit.api.security.user.Authorizable authorizable)
determine the resource type for the authorizable.

Parameters:
  `authorizable` - the authorizable to consider
Returns:
  the resource type

### getResourceType

public String getResourceType()

### adaptTo

public <T> T adaptTo(Class<T> type)

Specified by:
  `adaptTo` in interface `org.apache.sling.api.adapter.Adaptable`
Overrides:
  `adaptTo` in class `org.apache.sling.api.adapter.SlingAdaptable`

### toString

public String toString()

Overrides:
  `toString` in class `Object`