public class MapResourceImpl extends AbstractResource implements MapResource
RESOURCE_TYPE_NON_EXISTING| Constructor and Description |
|---|
MapResourceImpl(ResourceResolver resolver,
CachingResourceProvider provider,
java.lang.String resolvedPath,
java.util.Map<java.lang.String,java.lang.Object> doc,
boolean isAttachment) |
| Modifier and Type | Method and Description |
|---|---|
<AdapterType> |
adaptTo(java.lang.Class<AdapterType> type)
Calls into the registered
AdapterManager to adapt this object to
the desired type. |
boolean |
checkPermissions(java.lang.String permission) |
static java.lang.String |
getAclPathGivenBase(java.lang.String path,
java.lang.String providerBase) |
Resource |
getParent()
Returns the parent resource of this resource.
|
java.lang.String |
getPath()
Returns the absolute path of this resource in the resource tree.
|
ResourceMetadata |
getResourceMetadata()
Returns the meta data of this resource.
|
SocialResourceProvider |
getResourceProvider() |
ResourceResolver |
getResourceResolver()
Returns the
ResourceResolver from which this resource has been
retrieved. |
java.lang.String |
getResourceSuperType()
Returns the super type of the resource if the resource defines its
own super type.
|
java.lang.String |
getResourceType()
The resource type is meant to point to rendering/processing scripts,
editing dialogs, etc.
|
Resource |
getRootJCRNode() |
boolean |
isAttachment() |
void |
unlockMetadata()
Unlocks the metadata for this resource.
|
void |
update() |
getChild, getChildren, getName, getValueMap, hasChildren, isResourceType, listChildrensetAdapterManager, unsetAdapterManagerequals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetChild, getChildren, getName, getValueMap, hasChildren, isResourceType, listChildrenpublic MapResourceImpl(ResourceResolver resolver, CachingResourceProvider provider, java.lang.String resolvedPath, java.util.Map<java.lang.String,java.lang.Object> doc, boolean isAttachment)
public Resource getParent()
This method is implemented calling the ResourceResolver.getParent(Resource) method.
getParent in interface ResourcegetParent in class AbstractResourcenull.ResourceResolver.getParent(Resource)public java.lang.String getPath()
public java.lang.String getResourceType()
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 Resource.RESOURCE_TYPE_NON_EXISTING.
getResourceType in interface Resourcepublic java.lang.String getResourceSuperType()
null is returned.
A resource might return a resource super type to overwrite the
resource type hierarchy.
If a client is interested in the effective resource super type
of a resource, it should call ResourceResolver.getParentResourceType(Resource).getResourceSuperType in interface Resourcenull.public ResourceMetadata getResourceMetadata()
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.getResourceMetadata in interface ResourceResourceMetadatapublic ResourceResolver getResourceResolver()
ResourceResolver from which this resource has been
retrieved.getResourceResolver in interface Resourcepublic SocialResourceProvider getResourceProvider()
getResourceProvider in interface SocialResourcepublic <AdapterType> AdapterType adaptTo(java.lang.Class<AdapterType> type)
AdapterManager to adapt this object to
the desired type.
This method implements a cache of adapters to improve performance. That is repeated calls to this method with the same class will result in the same object to be returned.
adaptTo in interface AdaptableadaptTo in class SlingAdaptableAdapterType - The generic type to which this resource is adapted
totype - The Class object of the target type, such as
javax.jcr.Node.class or
java.io.File.classnull if the resource cannot
adapt to the requested typepublic void update()
public Resource getRootJCRNode()
getRootJCRNode in interface SocialResourcepublic boolean isAttachment()
isAttachment in interface MapResourcepublic void unlockMetadata()
unlockMetadata in interface MapResourcepublic static java.lang.String getAclPathGivenBase(java.lang.String path,
java.lang.String providerBase)
public boolean checkPermissions(java.lang.String permission)
checkPermissions in interface SocialResourceCopyright © 2010 - 2023 Adobe. All Rights Reserved