public interface I_CmsResource
Modifier and Type | Interface and Description |
---|---|
static class |
I_CmsResource.CmsResourceAttribute
Enumeration for all attributes of a resource.
|
Modifier and Type | Field and Description |
---|---|
static java.util.Comparator<I_CmsResource> |
COMPARE_DATE_LAST_MODIFIED
A comparator for the date last modified of two resources.
|
static java.util.Comparator<I_CmsResource> |
COMPARE_DATE_RELEASED
A comparator for the release date of two resources.
|
static java.util.Comparator<I_CmsResource> |
COMPARE_ROOT_PATH
A comparator for the root path of two resources.
|
static java.util.Comparator<I_CmsResource> |
COMPARE_ROOT_PATH_IGNORE_CASE
A comparator for the root path of two resources ignoring case differences.
|
static java.util.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.
|
Modifier and Type | Method and Description |
---|---|
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.
|
java.lang.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.
|
java.lang.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. can have no sub-resources. |
boolean |
isFolder()
Returns
true if the resource is a folder, i.e. can have sub-resources. |
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.
|
static final java.util.Comparator<I_CmsResource> COMPARE_DATE_LAST_MODIFIED
static final java.util.Comparator<I_CmsResource> COMPARE_DATE_RELEASED
If the release date of a resource is not set, the creation date is used instead.
static final java.util.Comparator<I_CmsResource> COMPARE_ROOT_PATH
static final java.util.Comparator<I_CmsResource> COMPARE_ROOT_PATH_IGNORE_CASE
static final java.util.Comparator<I_CmsResource> COMPARE_ROOT_PATH_IGNORE_CASE_FOLDERS_FIRST
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.
java.lang.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()
java.lang.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 againsttrue
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 againsttrue
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 againsttrue
if this resource is valid at the given timeisExpired(long)
,
isReleased(long)
boolean isTouched()