org.opencms.file.history
Class CmsHistoryFolder

java.lang.Object
  extended by org.opencms.file.CmsResource
      extended by org.opencms.file.CmsFolder
          extended by org.opencms.file.history.CmsHistoryFolder
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable, I_CmsHistoryResource

public class CmsHistoryFolder
extends CmsFolder
implements I_CmsHistoryResource

A historical version of a file in the OpenCms VFS resource history.

Since:
6.9.1
Version:
$Revision: 1.8 $
Author:
Michael Moossen
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.opencms.file.CmsResource
CmsResource.CmsResourceCopyMode, CmsResource.CmsResourceDeleteMode, CmsResource.CmsResourceUndoMode
 
Field Summary
 
Fields inherited from class org.opencms.file.CmsResource
COMPARE_DATE_RELEASED, COMPARE_ROOT_PATH, COMPARE_ROOT_PATH_IGNORE_CASE, COMPARE_ROOT_PATH_IGNORE_CASE_FOLDERS_FIRST, 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, TOUCH_DATE_UNCHANGED, UNDO_CONTENT, UNDO_CONTENT_RECURSIVE, UNDO_MOVE_CONTENT, UNDO_MOVE_CONTENT_RECURSIVE, VFS_FOLDER_SITES, VFS_FOLDER_SYSTEM
 
Constructor Summary
CmsHistoryFolder(I_CmsHistoryResource resource)
          Constructor from a history resource.
CmsHistoryFolder(int publishTag, 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, CmsUUID parentId, int resourceVersion, int structureVersion)
          Default Constructor.
 
Method Summary
 java.lang.Object clone()
          Returns a clone of this Objects instance.
 CmsUUID getBackupId()
          Deprecated. this field has been removed
 java.lang.String getCreatedByName()
          Deprecated. use getUserCreatedName(CmsObject) instead
 java.lang.String getLastModifiedByName()
          Deprecated. use getUserLastModifiedName(CmsObject) instead
 CmsUUID getParentId()
          Returns the structure id of the parent resource.
 int getPublishTag()
          Returns the publish tag of this historical resource.
 int getPublishTagId()
          Deprecated. use getPublishTag() instead
 int getResourceVersion()
          Returns the version number of the resource part for this historical resource.
 int getStructureVersion()
          Returns the version number of the structure part for this historical resource.
 java.lang.String getUserCreatedName(CmsObject cms)
          Returns the name of the user that created this resource.
 java.lang.String getUserLastModifiedName(CmsObject cms)
          Returns the name of the user that last modified this resource.
 java.lang.String toString()
           
 
Methods inherited from class org.opencms.file.CmsFolder
getDateContent, getLength, isFile, isFolder, isFolderSize, isFolderType, isFolderType
 
Methods inherited from class org.opencms.file.CmsResource
checkResourceName, compareTo, equals, 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, isTouched, setDateExpired, setDateLastModified, setDateReleased, setFlags, setState, setType, setUserLastModified
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.opencms.file.history.I_CmsHistoryResource
getDateContent, getDateCreated, getDateExpired, getDateLastModified, getDateReleased, getFlags, getLength, getName, getProjectLastModified, getResourceId, getRootPath, getSiblingCount, getState, getStructureId, getTypeId, getUserCreated, getUserLastModified, getVersion, isExpired, isFile, isFolder, isInternal, isLabeled, isReleased, isReleasedAndNotExpired, isTouched
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

CmsHistoryFolder

public CmsHistoryFolder(I_CmsHistoryResource resource)
Constructor from a history resource.

Parameters:
resource - the base history resource

CmsHistoryFolder

public CmsHistoryFolder(int publishTag,
                        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,
                        CmsUUID parentId,
                        int resourceVersion,
                        int structureVersion)
Default Constructor.

Parameters:
publishTag - the publish tag of this historical resource
structureId - the id of this resources structure record
resourceId - the id of this resources resource record
path - the filename of this resouce
type - the type of this resource
flags - the flags of this resource
projectId - the project id this resource was last modified in
state - the state of this resource
dateCreated - the creation date of this resource
userCreated - the id of the user who created this resource
dateLastModified - the date of the last modification of this resource
userLastModified - the id of the user who did the last modification of this resource
dateReleased - the release date of this resource
dateExpired - the expiration date of this resource
version - the version number of this resource
parentId - structure id of the parent of this historical resource
resourceVersion - the version number of the resource part for this historical resource
structureVersion - the version number of the structure part for this historical resource
Method Detail

clone

public java.lang.Object clone()
Returns a clone of this Objects instance.

Overrides:
clone in class CmsFolder
Returns:
a clone of this instance

getBackupId

public CmsUUID getBackupId()
Deprecated. this field has been removed

Description copied from interface: I_CmsHistoryResource
Returns the history id of this historical resource.

Specified by:
getBackupId in interface I_CmsHistoryResource
Returns:
the history id of this historical resource
See Also:
I_CmsHistoryResource.getBackupId()

getCreatedByName

public java.lang.String getCreatedByName()
Deprecated. use getUserCreatedName(CmsObject) instead

Description copied from interface: I_CmsHistoryResource
Returns the user name of the creator of this historical resource.

Specified by:
getCreatedByName in interface I_CmsHistoryResource
Returns:
the user name of the creator of this historical resource
See Also:
I_CmsHistoryResource.getCreatedByName()

getLastModifiedByName

public java.lang.String getLastModifiedByName()
Deprecated. use getUserLastModifiedName(CmsObject) instead

Description copied from interface: I_CmsHistoryResource
Returns the name of the user who last changed this historical resource.

Specified by:
getLastModifiedByName in interface I_CmsHistoryResource
Returns:
the name of the user who last changed this historical resource
See Also:
I_CmsHistoryResource.getLastModifiedByName()

getParentId

public CmsUUID getParentId()
Description copied from interface: I_CmsHistoryResource
Returns the structure id of the parent resource.

Specified by:
getParentId in interface I_CmsHistoryResource
Returns:
the structure id of the parent resource
See Also:
I_CmsHistoryResource.getParentId()

getPublishTag

public int getPublishTag()
Description copied from interface: I_CmsHistoryResource
Returns the publish tag of this historical resource.

Specified by:
getPublishTag in interface I_CmsHistoryResource
Returns:
the publish tag of this historical resource
See Also:
I_CmsHistoryResource.getPublishTag()

getPublishTagId

public int getPublishTagId()
Deprecated. use getPublishTag() instead

Description copied from interface: I_CmsHistoryResource
Returns the publish tag of this historical resource.

Specified by:
getPublishTagId in interface I_CmsHistoryResource
Returns:
the publish tag of this historical resource
See Also:
I_CmsHistoryResource.getPublishTagId()

getResourceVersion

public int getResourceVersion()
Description copied from interface: I_CmsHistoryResource
Returns the version number of the resource part for this historical resource.

Specified by:
getResourceVersion in interface I_CmsHistoryResource
Returns:
the version number of the resource part for this historical resource
See Also:
I_CmsHistoryResource.getResourceVersion()

getStructureVersion

public int getStructureVersion()
Description copied from interface: I_CmsHistoryResource
Returns the version number of the structure part for this historical resource.

Specified by:
getStructureVersion in interface I_CmsHistoryResource
Returns:
the version number of the structure part for this historical resource
See Also:
I_CmsHistoryResource.getStructureVersion()

getUserCreatedName

public java.lang.String getUserCreatedName(CmsObject cms)
Returns the name of the user that created this resource.

Parameters:
cms - the current cms context
Returns:
the name of the user that created this resource

getUserLastModifiedName

public java.lang.String getUserLastModifiedName(CmsObject cms)
Returns the name of the user that last modified this resource.

Parameters:
cms - the current cms context
Returns:
the name of the user that last modified this resource

toString

public java.lang.String toString()
Overrides:
toString in class CmsResource
See Also:
CmsResource.toString()