|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.sling.api.adapter.SlingAdaptable
org.apache.sling.api.resource.AbstractResource
org.apache.sling.bundleresource.impl.BundleResource
public class BundleResource
A Resource that wraps a Bundle entry
Field Summary |
---|
Fields inherited from interface org.apache.sling.api.resource.Resource |
---|
RESOURCE_TYPE_NON_EXISTING |
Constructor Summary | |
---|---|
BundleResource(ResourceResolver resourceResolver,
org.apache.sling.bundleresource.impl.BundleResourceCache bundle,
org.apache.sling.bundleresource.impl.MappedPath mappedPath,
String resourcePath)
|
Method Summary | ||
---|---|---|
|
adaptTo(Class<Type> type)
Adapts the adaptable to another type. |
|
String |
getPath()
Returns the absolute path of this resource in the resource tree. |
|
static BundleResource |
getResource(ResourceResolver resourceResolver,
org.apache.sling.bundleresource.impl.BundleResourceCache bundle,
org.apache.sling.bundleresource.impl.MappedPath mappedPath,
String resourcePath)
|
|
ResourceMetadata |
getResourceMetadata()
Returns the metadata of this resource. |
|
ResourceResolver |
getResourceResolver()
Returns the ResourceResolver from which this resource has been
retrieved. |
|
String |
getResourceSuperType()
Returns null , bundle resources have no super type |
|
String |
getResourceType()
The resource type is meant to point to rendering/processing scripts, editing dialogs, etc. |
|
Iterator<Resource> |
listChildren()
Returns an iterator on the direct child resources. |
|
String |
toString()
|
Methods inherited from class org.apache.sling.api.resource.AbstractResource |
---|
getChild, getName, getParent, isResourceType |
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 |
Methods inherited from interface org.apache.sling.api.resource.Resource |
---|
getChild, getName, getParent, isResourceType |
Constructor Detail |
---|
public BundleResource(ResourceResolver resourceResolver, org.apache.sling.bundleresource.impl.BundleResourceCache bundle, org.apache.sling.bundleresource.impl.MappedPath mappedPath, String resourcePath)
Method Detail |
---|
public static BundleResource getResource(ResourceResolver resourceResolver, org.apache.sling.bundleresource.impl.BundleResourceCache bundle, org.apache.sling.bundleresource.impl.MappedPath mappedPath, String resourcePath)
public String getPath()
Resource
getPath
in interface Resource
public String getResourceType()
Resource
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 Resource
public String getResourceSuperType()
null
, bundle resources have no super type
getResourceSuperType
in interface Resource
public ResourceMetadata getResourceMetadata()
Resource
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 Resource
ResourceMetadata
public ResourceResolver getResourceResolver()
Resource
ResourceResolver
from which this resource has been
retrieved.
getResourceResolver
in interface Resource
public <Type> Type adaptTo(Class<Type> type)
Adaptable
adaptTo
in interface Adaptable
adaptTo
in class SlingAdaptable
Type
- The generic type to which this resource is adapted
totype
- The Class object of the target type, such as
Node.class
null
if the resource cannot
adapt to the requested typeAdaptable.adaptTo(java.lang.Class)
public String toString()
toString
in class Object
public Iterator<Resource> listChildren()
AbstractResource
This method is implemented calling the
ResourceResolver.listChildren(Resource)
method.
Implementations should not generally overwrite this method without calling this base class implementation.
listChildren
in interface Resource
listChildren
in class AbstractResource
ResourceResolver.listChildren(Resource)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |