Package org.opencms.file
Class CmsResourceBuilder
- java.lang.Object
-
- org.opencms.file.CmsResourceBuilder
-
public class CmsResourceBuilder extends java.lang.Object
This class allows the developer to build a CmsResource object by filling out individual fields one after the other.
-
-
Field Summary
Fields Modifier and Type Field Description protected longm_dateContentThe date of the last modification of the content of this resource.protected intm_lengthThe size of the content.
-
Constructor Summary
Constructors Constructor Description CmsResourceBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CmsResourcebuildResource()Builds the resource.longgetDateContent()Gets the date content.longgetDateCreated()Gets the date created.longgetDateExpired()Gets the date expired.longgetDateLastModified()Gets the date last modified.longgetDateReleased()Gets the date released.intgetFlags()Gets the flags.intgetLength()Gets the length.CmsUUIDgetProjectLastModified()Gets the project last modified.CmsUUIDgetResourceId()Gets the resource id.java.lang.StringgetRootPath()Gets the root path.intgetSiblingCount()Gets the sibling count.CmsResourceStategetState()Gets the state.CmsUUIDgetStructureId()Gets the structure id.I_CmsResourceTypegetType()Gets the type.CmsUUIDgetUserCreated()Gets the user created.CmsUUIDgetUserLastModified()Gets the user last modified.intgetVersion()Gets the version.booleanisFolder()Checks if is folder.booleanisTouched()Checks if is touched.voidsetDateContent(long dateContent)Sets the date content.voidsetDateCreated(long dateCreated)Sets the date created.voidsetDateExpired(long dateExpired)Sets the date expired.voidsetDateLastModified(long dateLastModified)Sets the date last modified.voidsetDateReleased(long dateReleased)Sets the date released.voidsetFlags(int flags)Sets the flags.voidsetFolder(boolean isFolder)Sets the folder.voidsetLength(int length)Sets the length.voidsetProjectLastModified(CmsUUID projectLastModified)Sets the project last modified.voidsetResourceId(CmsUUID resourceId)Sets the resource id.voidsetRootPath(java.lang.String rootPath)Sets the root path.voidsetSiblingCount(int siblingCount)Sets the sibling count.voidsetState(CmsResourceState state)Sets the state.voidsetStructureId(CmsUUID structureId)Sets the structure id.voidsetTouched(boolean isTouched)Sets the touched.voidsetType(I_CmsResourceType type)Sets the type.voidsetUserCreated(CmsUUID userCreated)Sets the user created.voidsetUserLastModified(CmsUUID userLastModified)Sets the user last modified.voidsetVersion(int version)Sets the version.
-
-
-
Field Detail
-
m_dateContent
protected long m_dateContent
The date of the last modification of the content of this resource.
-
m_length
protected int m_length
The size of the content.
-
-
Constructor Detail
-
CmsResourceBuilder
public CmsResourceBuilder()
-
-
Method Detail
-
buildResource
public CmsResource buildResource()
Builds the resource.- Returns:
- the cms resource
-
getDateContent
public long getDateContent()
Gets the date content.- Returns:
- the date content
-
getDateCreated
public long getDateCreated()
Gets the date created.- Returns:
- the date created
-
getDateExpired
public long getDateExpired()
Gets the date expired.- Returns:
- the date expired
-
getDateLastModified
public long getDateLastModified()
Gets the date last modified.- Returns:
- the date last modified
-
getDateReleased
public long getDateReleased()
Gets the date released.- Returns:
- the date released
-
getFlags
public int getFlags()
Gets the flags.- Returns:
- the flags
-
getLength
public int getLength()
Gets the length.- Returns:
- the length
-
getProjectLastModified
public CmsUUID getProjectLastModified()
Gets the project last modified.- Returns:
- the project last modified
-
getResourceId
public CmsUUID getResourceId()
Gets the resource id.- Returns:
- the resource id
-
getRootPath
public java.lang.String getRootPath()
Gets the root path.- Returns:
- the root path
-
getSiblingCount
public int getSiblingCount()
Gets the sibling count.- Returns:
- the sibling count
-
getState
public CmsResourceState getState()
Gets the state.- Returns:
- the state
-
getStructureId
public CmsUUID getStructureId()
Gets the structure id.- Returns:
- the structure id
-
getType
public I_CmsResourceType getType()
Gets the type.- Returns:
- the type
-
getUserCreated
public CmsUUID getUserCreated()
Gets the user created.- Returns:
- the user created
-
getUserLastModified
public CmsUUID getUserLastModified()
Gets the user last modified.- Returns:
- the user last modified
-
getVersion
public int getVersion()
Gets the version.- Returns:
- the version
-
isFolder
public boolean isFolder()
Checks if is folder.- Returns:
- true, if is folder
-
isTouched
public boolean isTouched()
Checks if is touched.- Returns:
- true, if is touched
-
setDateContent
public void setDateContent(long dateContent)
Sets the date content.- Parameters:
dateContent- the new date content
-
setDateCreated
public void setDateCreated(long dateCreated)
Sets the date created.- Parameters:
dateCreated- the new date created
-
setDateExpired
public void setDateExpired(long dateExpired)
Sets the date expired.- Parameters:
dateExpired- the new date expired
-
setDateLastModified
public void setDateLastModified(long dateLastModified)
Sets the date last modified.- Parameters:
dateLastModified- the new date last modified
-
setDateReleased
public void setDateReleased(long dateReleased)
Sets the date released.- Parameters:
dateReleased- the new date released
-
setFlags
public void setFlags(int flags)
Sets the flags.- Parameters:
flags- the new flags
-
setFolder
public void setFolder(boolean isFolder)
Sets the folder.- Parameters:
isFolder- the new folder
-
setLength
public void setLength(int length)
Sets the length.- Parameters:
length- the new length
-
setProjectLastModified
public void setProjectLastModified(CmsUUID projectLastModified)
Sets the project last modified.- Parameters:
projectLastModified- the new project last modified
-
setResourceId
public void setResourceId(CmsUUID resourceId)
Sets the resource id.- Parameters:
resourceId- the new resource id
-
setRootPath
public void setRootPath(java.lang.String rootPath)
Sets the root path.- Parameters:
rootPath- the new root path
-
setSiblingCount
public void setSiblingCount(int siblingCount)
Sets the sibling count.- Parameters:
siblingCount- the new sibling count
-
setState
public void setState(CmsResourceState state)
Sets the state.- Parameters:
state- the new state
-
setStructureId
public void setStructureId(CmsUUID structureId)
Sets the structure id.- Parameters:
structureId- the new structure id
-
setTouched
public void setTouched(boolean isTouched)
Sets the touched.- Parameters:
isTouched- the new touched
-
setType
public void setType(I_CmsResourceType type)
Sets the type.- Parameters:
type- the new type
-
setUserCreated
public void setUserCreated(CmsUUID userCreated)
Sets the user created.- Parameters:
userCreated- the new user created
-
setUserLastModified
public void setUserLastModified(CmsUUID userLastModified)
Sets the user last modified.- Parameters:
userLastModified- the new user last modified
-
setVersion
public void setVersion(int version)
Sets the version.- Parameters:
version- the new version
-
-