|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface I_CmsResource
Common ancestor interface for CmsFile
and CmsFolder
as well as for and CmsHistoryFolder
.
Nested Class Summary | |
---|---|
static class |
I_CmsResource.CmsResourceAttribute
Enumeration for all attributes of a resource. |
Field Summary | |
---|---|
static Comparator<I_CmsResource> |
COMPARE_DATE_LAST_MODIFIED
A comparator for the date last modified of two resources. |
static Comparator<I_CmsResource> |
COMPARE_DATE_RELEASED
A comparator for the release date of two resources. |
static Comparator<I_CmsResource> |
COMPARE_ROOT_PATH
A comparator for the root path of two resources. |
static Comparator<I_CmsResource> |
COMPARE_ROOT_PATH_IGNORE_CASE
A comparator for the root path of two resources ignoring case differences. |
static Comparator<I_CmsResource> |
COMPARE_ROOT_PATH_IGNORE_CASE_FOLDERS_FIRST
A comparator for the root path of two resources ignoring case differences, putting folders before files. |
Method Summary | |
---|---|
long |
getDateContent()
Returns the date of the last modification of the content of this resource. |
long |
getDateCreated()
Returns the date of the creation of this resource. |
long |
getDateExpired()
Returns the expiration date this resource. |
long |
getDateLastModified()
Returns the date of the last modification of this resource. |
long |
getDateReleased()
Returns the release date this resource. |
int |
getFlags()
Returns the flags of this resource. |
int |
getLength()
Returns the content length of this resource. |
String |
getName()
Returns the file name of this resource without parent folders, for example index.html . |
CmsUUID |
getProjectLastModified()
Returns the id of the CmsProject where this resource has been last modified. |
CmsUUID |
getResourceId()
Returns the id of the database content record of this resource. |
String |
getRootPath()
Returns the name of this resource with it's full path from the top level root folder, for example /sites/default/myfolder/index.html . |
int |
getSiblingCount()
Returns the number of siblings of this resource, also counting this resource. |
CmsResourceState |
getState()
Returns the state of this resource. |
CmsUUID |
getStructureId()
Returns the id of the database structure record of this resource. |
int |
getTypeId()
Returns the resource type id for this resource. |
CmsUUID |
getUserCreated()
Returns the id of the CmsUser who created this resource. |
CmsUUID |
getUserLastModified()
Returns the id of the CmsUser who made the last modification on this resource. |
int |
getVersion()
Returns the current version number of this resource. |
boolean |
isExpired(long time)
Returns true if this resource is expired at the given time according to the
information stored in getDateExpired() . |
boolean |
isFile()
Returns true if the resource is a file, i.e. |
boolean |
isFolder()
Returns true if the resource is a folder, i.e. |
boolean |
isInternal()
Checks if the resource is internal. |
boolean |
isLabeled()
Checks if the link has to be labeled with a special icon in the explorer view. |
boolean |
isReleased(long time)
Returns true if this resource is released at the given time according to the
information stored in getDateReleased() . |
boolean |
isReleasedAndNotExpired(long time)
Returns true if this resource is valid at the given time according to the
information stored in getDateReleased() and getDateExpired() . |
boolean |
isTouched()
Returns true if this resource was touched. |
Field Detail |
---|
static final Comparator<I_CmsResource> COMPARE_DATE_LAST_MODIFIED
static final Comparator<I_CmsResource> COMPARE_DATE_RELEASED
If the release date of a resource is not set, the creation date is used instead.
static final Comparator<I_CmsResource> COMPARE_ROOT_PATH
static final Comparator<I_CmsResource> COMPARE_ROOT_PATH_IGNORE_CASE
static final Comparator<I_CmsResource> COMPARE_ROOT_PATH_IGNORE_CASE_FOLDERS_FIRST
Method Detail |
---|
long getDateContent()
long getDateCreated()
long getDateExpired()
long getDateLastModified()
long getDateReleased()
int getFlags()
int getLength()
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.
String getName()
index.html
.
CmsUUID getProjectLastModified()
CmsProject
where this resource has been last modified.
CmsProject
where this resource has been last modified, or null
CmsUUID getResourceId()
String getRootPath()
/sites/default/myfolder/index.html
.
int getSiblingCount()
If a resource has no sibling, the total sibling count for this resource is 1
,
if a resource has n
siblings, the sibling count is n + 1
.
CmsResourceState getState()
CmsUUID getStructureId()
int getTypeId()
CmsUUID getUserCreated()
CmsUser
who created this resource.
CmsUser
who created this resourceCmsUUID getUserLastModified()
CmsUser
who made the last modification on this resource.
CmsUser
who made the last modification on this resourceint getVersion()
boolean isExpired(long time)
true
if this resource is expired at the given time according to the
information stored in getDateExpired()
.
time
- the time to check the expiration date against
true
if this resource is expired at the given timeisReleased(long)
,
isReleasedAndNotExpired(long)
boolean isFile()
true
if the resource is a file, i.e. can have no sub-resources.
boolean isFolder()
true
if the resource is a folder, i.e. can have sub-resources.
boolean isInternal()
This state is stored as bit 1 in the resource flags.
boolean isLabeled()
This state is stored as bit 2 in the resource flags.
boolean isReleased(long time)
true
if this resource is released at the given time according to the
information stored in getDateReleased()
.
time
- the time to check the release date against
true
if this resource is released at the given timeisExpired(long)
,
isReleasedAndNotExpired(long)
boolean isReleasedAndNotExpired(long time)
true
if this resource is valid at the given time according to the
information stored in getDateReleased()
and getDateExpired()
.A resource is valid if it is released and not yet expired.
time
- the time to check the release and expiration date against
true
if this resource is valid at the given timeisExpired(long)
,
isReleased(long)
boolean isTouched()
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |