|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.file.CmsResource
org.opencms.file.CmsFolder
public class CmsFolder
A folder resource in the OpenCms VFS.
A folder resource is a CmsResource object that can contain sub-resources.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.opencms.file.CmsResource |
---|
CmsResource.CmsResourceCopyMode, CmsResource.CmsResourceDeleteMode, CmsResource.CmsResourceUndoMode |
Field Summary |
---|
Constructor Summary | |
---|---|
CmsFolder(CmsResource resource)
Constructor, creates a new CmsFolder Object from the given CmsResource. |
|
CmsFolder(CmsUUID structureId,
CmsUUID resourceId,
java.lang.String path,
int type,
int flags,
CmsUUID projectId,
CmsResourceState state,
long dateCreated,
CmsUUID userCreated,
long dateLastModified,
CmsUUID userLastModified,
long dateReleased,
long dateExpired,
int version)
Constructor, creates a new CmsFolder object. |
Method Summary | |
---|---|
java.lang.Object |
clone()
Returns a clone of this Objects instance. |
int |
getLength()
Returns the length of the resource. |
boolean |
isFile()
Returns true if the resource is a file, i.e. can have no sub-resources. |
boolean |
isFolder()
Returns true if the resource is a folder, i.e. can have sub-resources. |
static boolean |
isFolderSize(long size)
Returns true if the given resource size describes a folder type. |
static boolean |
isFolderType(int typeId)
Returns true if the given resource type id describes a folder type. |
static boolean |
isFolderType(java.lang.String typeName)
Returns true if the given resource type name describes a folder type. |
Methods inherited from class java.lang.Object |
---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.lang.Comparable |
---|
compareTo |
Constructor Detail |
---|
public CmsFolder(CmsResource resource)
resource
- the base resource object to create a folder frompublic CmsFolder(CmsUUID structureId, CmsUUID resourceId, java.lang.String path, int type, int flags, CmsUUID projectId, CmsResourceState state, long dateCreated, CmsUUID userCreated, long dateLastModified, CmsUUID userLastModified, long dateReleased, long dateExpired, int version)
structureId
- the id of this resources structure recordresourceId
- the id of this resources resource recordpath
- the filename of this resoucetype
- the type of this resourceflags
- the flags of this resourceprojectId
- the project id this resource was last modified instate
- the state of this resourcedateCreated
- the creation date of this resourceuserCreated
- the id of the user who created this resourcedateLastModified
- the date of the last modification of this resourceuserLastModified
- the id of the user who did the last modification of this resource * @param size the size of the file content of this resourcedateReleased
- the release date of this resourcedateExpired
- the expiration date of this resourceversion
- the version number of this resourceMethod Detail |
---|
public static final boolean isFolderSize(long size)
true
if the given resource size describes a folder type.
size
- the resource size to check
public static final boolean isFolderType(int typeId)
true
if the given resource type id describes a folder type.
typeId
- the resource type id to check
public static final boolean isFolderType(java.lang.String typeName)
true
if the given resource type name describes a folder type.
typeName
- the resource type name to check
public java.lang.Object clone()
clone
in class CmsResource
public int getLength()
CmsResource
If the resource is a file, then this is the byte size of the file content. If the resource is a folder, then the size is always -1.
getLength
in class CmsResource
CmsResource.getLength()
public boolean isFile()
CmsResource
true
if the resource is a file, i.e. can have no sub-resources.
isFile
in class CmsResource
CmsResource.isFile()
public boolean isFolder()
CmsResource
true
if the resource is a folder, i.e. can have sub-resources.
isFolder
in class CmsResource
CmsResource.isFolder()
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |