public class CmsFolder extends CmsResource
A folder resource is a CmsResource object that can contain sub-resources.
CmsResource.CmsResourceCopyMode, CmsResource.CmsResourceDeleteMode, CmsResource.CmsResourceUndoMode
I_CmsResource.CmsResourceAttribute
COPY_AS_NEW, COPY_AS_SIBLING, COPY_PRESERVE_SIBLING, DATE_EXPIRED_DEFAULT, DATE_RELEASED_DEFAULT, DATE_RELEASED_EXPIRED_IGNORE, DELETE_PRESERVE_SIBLINGS, DELETE_REMOVE_SIBLINGS, FLAG_INTERNAL, FLAG_LABELED, FLAG_TEMPFILE, m_dateContent, m_length, NAME_CONSTRAINTS, STATE_CHANGED, STATE_DELETED, STATE_KEEP, STATE_NEW, STATE_UNCHANGED, TEMP_FILE_PREFIX, TOUCH_DATE_UNCHANGED, UNDO_CONTENT, UNDO_CONTENT_RECURSIVE, UNDO_MOVE_CONTENT, UNDO_MOVE_CONTENT_RECURSIVE, VFS_FOLDER_SITES, VFS_FOLDER_SYSTEM
COMPARE_DATE_LAST_MODIFIED, COMPARE_DATE_RELEASED, COMPARE_ROOT_PATH, COMPARE_ROOT_PATH_IGNORE_CASE, COMPARE_ROOT_PATH_IGNORE_CASE_FOLDERS_FIRST
Constructor and Description |
---|
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.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
clone()
Returns a clone of this Objects instance.
|
long |
getDateContent()
A folder does always have the content date
-1 . |
int |
getLength()
A folder does always have length
-1 . |
boolean |
isFile()
Since this is a folder, not a file,
false is always returned. |
boolean |
isFolder()
Since this is a folder,
true is always returned. |
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. |
boolean |
isTemporaryFile()
Returns
true if this resource is a temporary file. |
checkResourceName, compareTo, equals, getCopy, getDateCreated, getDateExpired, getDateLastModified, getDateReleased, getFlags, getFolderPath, getName, getName, getParentFolder, getPathLevel, getPathPart, getProjectLastModified, getResourceId, getRootPath, getSiblingCount, getState, getStructureId, getTypeId, getUserCreated, getUserLastModified, getVersion, hashCode, isExpired, isFolder, isInternal, isLabeled, isReleased, isReleasedAndNotExpired, isTemporaryFileName, isTouched, setDateExpired, setDateLastModified, setDateReleased, setFlags, setInternal, setState, setType, setUserLastModified, toString
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 resourcepublic static final boolean isFolderSize(long size)
true
if the given resource size describes a folder type.
This is true
in case size < 0
.
size
- the resource size to checkpublic static final boolean isFolderType(int typeId)
true
if the given resource type id describes a folder type.typeId
- the resource type id to checkpublic 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 checkpublic java.lang.Object clone()
clone
in class CmsResource
public long getDateContent()
-1
.getDateContent
in interface I_CmsResource
getDateContent
in class CmsResource
CmsResource.getDateContent()
public int getLength()
-1
.getLength
in interface I_CmsResource
getLength
in class CmsResource
CmsResource.getLength()
public boolean isFile()
false
is always returned.isFile
in interface I_CmsResource
isFile
in class CmsResource
CmsResource.isFile()
public boolean isFolder()
true
is always returned.isFolder
in interface I_CmsResource
isFolder
in class CmsResource
CmsResource.isFolder()
public boolean isTemporaryFile()
CmsResource
true
if this resource is a temporary file.
A resource is considered a temporary file it is a file where the
CmsResource.FLAG_TEMPFILE
flag has been set, or if the file name (without parent folders)
starts with the prefix char '~'
(tilde).
isTemporaryFile
in class CmsResource
true
if the given resource name is a temporary fileCmsResource.isTemporaryFile()