|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.db.CmsPublishedResource
public class CmsPublishedResource
Represents the state of a published resource *before* it got published.
This allows various subsequent tasks in the Cms app. (e.g. exporting files and folders) to identify published resources after a resource or project was published.
The values to fill this container are read from the Cms publish history database table that is written during each publishing process.
I_CmsProjectDriver.readPublishedResources(CmsDbContext, CmsUUID)
,
Serialized FormNested Class Summary | |
---|---|
static class |
CmsPublishedResource.CmsPublishedResourceState
Add new resource states under consideration of the move operation. |
Field Summary | |
---|---|
static CmsPublishedResource.CmsPublishedResourceState |
STATE_MOVED_DESTINATION
Additional state for moved resources, the (new) destination of the moved resource. |
static CmsPublishedResource.CmsPublishedResourceState |
STATE_MOVED_SOURCE
Additional state for moved resources, the (deleted) source of the moved resource. |
Constructor Summary | |
---|---|
CmsPublishedResource(CmsResource resource)
Creates an object for published VFS resources. |
|
CmsPublishedResource(CmsResource resource,
int publishTag)
Creates an object for published VFS resources. |
|
CmsPublishedResource(CmsResource resource,
int publishTag,
CmsResourceState state)
Creates an object for published VFS resources. |
|
CmsPublishedResource(CmsUUID structureId,
CmsUUID resourceId,
int publishTag,
java.lang.String rootPath,
int resourceType,
boolean isFolder,
CmsResourceState resourceState,
int siblingCount)
Creates an object for published VFS resources. |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object obj)
|
boolean |
equals(java.lang.Object obj)
|
int |
getBackupTagId()
Deprecated. Use getPublishTag() instead |
CmsResourceState |
getMovedState()
Returns the resource state including move operation information. |
int |
getPublishTag()
Returns the publish tag of the published resource. |
CmsUUID |
getResourceId()
Returns the resource ID of the published resource. |
java.lang.String |
getRootPath()
Returns the root path of the published resource. |
int |
getSiblingCount()
Returns the count of siblings of the published resource. |
CmsResourceState |
getState()
Returns the resource state of the published resource. |
CmsUUID |
getStructureId()
Returns the structure ID of the published resource. |
int |
getType()
Returns the resource type of the published resource. |
int |
hashCode()
|
boolean |
isFile()
Determines if this resource is a file. |
boolean |
isFolder()
Checks if this resource is a folder. |
boolean |
isMoved()
Returns true if the resource has been moved. |
boolean |
isVfsResource()
Deprecated. no longer needed |
void |
setState(CmsResourceState state)
Sets the resource state of the published resource. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final CmsPublishedResource.CmsPublishedResourceState STATE_MOVED_DESTINATION
public static final CmsPublishedResource.CmsPublishedResourceState STATE_MOVED_SOURCE
Constructor Detail |
---|
public CmsPublishedResource(CmsResource resource)
Do not write objects created with this constructor to db, since the publish tag is not set.
resource
- an CmsResource object to create a CmsPublishedResource frompublic CmsPublishedResource(CmsResource resource, int publishTag)
resource
- an CmsResource object to create a CmsPublishedResource frompublishTag
- the publish Tagpublic CmsPublishedResource(CmsResource resource, int publishTag, CmsResourceState state)
resource
- an CmsResource object to create a CmsPublishedResource fromstate
- the resource statepublishTag
- the publish tagpublic CmsPublishedResource(CmsUUID structureId, CmsUUID resourceId, int publishTag, java.lang.String rootPath, int resourceType, boolean isFolder, CmsResourceState resourceState, int siblingCount)
structureId
- the structure ID of the published resourceresourceId
- the resource ID of the published resourcepublishTag
- the publish tagrootPath
- the root path of the published resourceresourceType
- the type of the published resourceisFolder
- indicates if the published resource is a folder or a fileresourceState
- the state of the resource *before* it was publishedsiblingCount
- count of siblings of the published resourceMethod Detail |
---|
public int compareTo(java.lang.Object obj)
compareTo
in interface java.lang.Comparable
Comparable.compareTo(java.lang.Object)
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
Object.equals(java.lang.Object)
public int getBackupTagId()
getPublishTag()
instead
public CmsResourceState getMovedState()
public int getPublishTag()
public CmsUUID getResourceId()
public java.lang.String getRootPath()
public 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
.
public CmsResourceState getState()
public CmsUUID getStructureId()
public int getType()
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()
public boolean isFile()
public boolean isFolder()
public boolean isMoved()
true
if the resource has been moved.
true
if the resource has been movedpublic boolean isVfsResource()
If the published resource has no structure id, it is considered to be no VFS resource.
public void setState(CmsResourceState state)
This is sometimes required for offline search index generation.
state
- the new state to setpublic java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |