|
||||||||||
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.fsprovider.internal.FsResource
public class FsResource
The FsResource
represents a file system file or folder as
a Sling Resource.
Field Summary |
---|
Fields inherited from interface org.apache.sling.api.resource.Resource |
---|
RESOURCE_TYPE_NON_EXISTING |
Method Summary | ||
---|---|---|
|
adaptTo(Class<AdapterType> type)
Returns an adapter for this resource. |
|
String |
getPath()
Returns the path of this resource |
|
ResourceMetadata |
getResourceMetadata()
Returns the resource meta data for this resource containing the file length, last modification time and the resource path (same as getPath() ). |
|
ResourceResolver |
getResourceResolver()
Returns the resource resolver which cause this resource object to be created. |
|
String |
getResourceSuperType()
Returns null } |
|
String |
getResourceType()
Returns RESOURCE_TYPE_FILE if this resource
wraps a file. |
Methods inherited from class org.apache.sling.api.resource.AbstractResource |
---|
getChild, getName, getParent, 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, toString, wait, wait, wait |
Methods inherited from interface org.apache.sling.api.resource.Resource |
---|
getChild, getName, getParent, isResourceType, listChildren |
Method Detail |
---|
public String getPath()
getPath
in interface Resource
public ResourceMetadata getResourceMetadata()
getPath()
).
getResourceMetadata
in interface Resource
ResourceMetadata
public ResourceResolver getResourceResolver()
getResourceResolver
in interface Resource
public String getResourceSuperType()
null
}
getResourceSuperType
in interface Resource
public String getResourceType()
RESOURCE_TYPE_FILE
if this resource
wraps a file. Otherwise RESOURCE_TYPE_FOLDER
is returned.
getResourceType
in interface Resource
public <AdapterType> AdapterType adaptTo(Class<AdapterType> type)
File
, InputStream
and URL
plus those supported by the adapter manager.
adaptTo
in interface Adaptable
adaptTo
in class SlingAdaptable
AdapterType
- 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)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |