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 long
m_dateContent
The date of the last modification of the content of this resource.protected int
m_length
The size of the content.
-
Constructor Summary
Constructors Constructor Description CmsResourceBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CmsResource
buildResource()
Builds the resource.long
getDateContent()
Gets the date content.long
getDateCreated()
Gets the date created.long
getDateExpired()
Gets the date expired.long
getDateLastModified()
Gets the date last modified.long
getDateReleased()
Gets the date released.int
getFlags()
Gets the flags.int
getLength()
Gets the length.CmsUUID
getProjectLastModified()
Gets the project last modified.CmsUUID
getResourceId()
Gets the resource id.java.lang.String
getRootPath()
Gets the root path.int
getSiblingCount()
Gets the sibling count.CmsResourceState
getState()
Gets the state.CmsUUID
getStructureId()
Gets the structure id.I_CmsResourceType
getType()
Gets the type.CmsUUID
getUserCreated()
Gets the user created.CmsUUID
getUserLastModified()
Gets the user last modified.int
getVersion()
Gets the version.boolean
isFolder()
Checks if is folder.boolean
isTouched()
Checks if is touched.void
setDateContent(long dateContent)
Sets the date content.void
setDateCreated(long dateCreated)
Sets the date created.void
setDateExpired(long dateExpired)
Sets the date expired.void
setDateLastModified(long dateLastModified)
Sets the date last modified.void
setDateReleased(long dateReleased)
Sets the date released.void
setFlags(int flags)
Sets the flags.void
setFolder(boolean isFolder)
Sets the folder.void
setLength(int length)
Sets the length.void
setProjectLastModified(CmsUUID projectLastModified)
Sets the project last modified.void
setResourceId(CmsUUID resourceId)
Sets the resource id.void
setRootPath(java.lang.String rootPath)
Sets the root path.void
setSiblingCount(int siblingCount)
Sets the sibling count.void
setState(CmsResourceState state)
Sets the state.void
setStructureId(CmsUUID structureId)
Sets the structure id.void
setTouched(boolean isTouched)
Sets the touched.void
setType(I_CmsResourceType type)
Sets the type.void
setUserCreated(CmsUUID userCreated)
Sets the user created.void
setUserLastModified(CmsUUID userLastModified)
Sets the user last modified.void
setVersion(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
-
-