org.opencms.file
Class CmsBackupResource

java.lang.Object
  extended byorg.opencms.file.CmsResource
      extended byorg.opencms.file.CmsFile
          extended byorg.opencms.file.CmsBackupResource
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable, java.io.Serializable

public class CmsBackupResource
extends CmsFile
implements java.lang.Cloneable, java.io.Serializable, java.lang.Comparable

A backup resource for the OpenCms VFS resource history.

Backup resources are basic resources that contain additional information used to describe the backup state. Backup resource extend CmsFile since the might contain binary content, but they can also in fact be backup resources for a folder.

Backup resources contain the names of the users that created or last modified the resource as a String because a user id might have been deleted.

Since:
6.0.0
Version:
$Revision: 1.18 $
Author:
Alexander Kandzior
See Also:
Serialized Form

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, DELETE_PRESERVE_SIBLINGS, DELETE_REMOVE_SIBLINGS, FLAG_INTERNAL, FLAG_LABELED, FLAG_TEMPFILE, m_length, NAME_CONSTRAINTS, STATE_CHANGED, STATE_DELETED, STATE_KEEP, STATE_NEW, STATE_UNCHANGED, TOUCH_DATE_UNCHANGED, VFS_FOLDER_CHANNELS, VFS_FOLDER_SITES, VFS_FOLDER_SYSTEM
 
Constructor Summary
CmsBackupResource(CmsUUID backupId, int tagId, int versionId, CmsUUID structureId, CmsUUID resourceId, CmsUUID contentId, java.lang.String path, int type, int flags, int projectId, int state, long dateCreated, CmsUUID userCreated, java.lang.String userCreatedName, long dateLastModified, CmsUUID userLastModified, java.lang.String userLastModifiedName, long dateReleased, long dateExpired, int size, byte[] content)
          Constructor, creates a new CmsBackupResource object.
 
Method Summary
 java.lang.Object clone()
          Returns a clone of this Objects instance.
 CmsUUID getBackupId()
          Returns the backup id of this resource.
 java.lang.String getCreatedByName()
          Returns the user name of the creator of this backup resource.
 java.lang.String getLastModifiedByName()
          Returns the name of the user who last changed this backup resource.
 int getTagId()
          Returns the tag id of this resource.
 int getVersionId()
          Returns the version id of this backup resource.
 
Methods inherited from class org.opencms.file.CmsFile
getContentId, getContents, getLength, isFile, isFolder, setContents, upgrade
 
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, hashCode, isFolder, isInternal, isLabeled, isTouched, setDateExpired, setDateLastModified, setDateReleased, setFlags, setState, setType, setUserLastModified, toString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Constructor Detail

CmsBackupResource

public CmsBackupResource(CmsUUID backupId,
                         int tagId,
                         int versionId,
                         CmsUUID structureId,
                         CmsUUID resourceId,
                         CmsUUID contentId,
                         java.lang.String path,
                         int type,
                         int flags,
                         int projectId,
                         int state,
                         long dateCreated,
                         CmsUUID userCreated,
                         java.lang.String userCreatedName,
                         long dateLastModified,
                         CmsUUID userLastModified,
                         java.lang.String userLastModifiedName,
                         long dateReleased,
                         long dateExpired,
                         int size,
                         byte[] content)
Constructor, creates a new CmsBackupResource object.

Parameters:
backupId - the backup id of this backup resource
tagId - the tag id of this backup resource
versionId - the version id of this backup resource
structureId - the id of this resources structure record
resourceId - the id of this resources resource record
contentId - the id of this resources content 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
userCreatedName - the name 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
userLastModifiedName - the name 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
size - the size of the file content of this resource
content - the binary content data of this file
Method Detail

clone

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

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

getBackupId

public CmsUUID getBackupId()
Returns the backup id of this resource.

Returns:
the backup id of this resource

getCreatedByName

public java.lang.String getCreatedByName()
Returns the user name of the creator of this backup resource.

Returns:
the user name of the creator of this backup resource

getLastModifiedByName

public java.lang.String getLastModifiedByName()
Returns the name of the user who last changed this backup resource.

Returns:
the name of the user who last changed this backup resource

getTagId

public int getTagId()
Returns the tag id of this resource.

Returns:
the tag id of this resource

getVersionId

public int getVersionId()
Returns the version id of this backup resource.

Returns:
the version id of this resource