org.opencms.test
Class OpenCmsTestResourceStorageEntry

java.lang.Object
  extended by org.opencms.test.OpenCmsTestResourceStorageEntry

public class OpenCmsTestResourceStorageEntry
extends Object

A single entry of the OpenCmsTestResourceStorage.


Field Summary
protected  int m_length
          The size of the content.
 
Constructor Summary
OpenCmsTestResourceStorageEntry()
          Creates a new empty OpenCmsTestResourceStorageEntry.
OpenCmsTestResourceStorageEntry(CmsObject cms, String resourceName, CmsResource res)
          Creates a new OpenCmsTestResourceStorageEntry.
 
Method Summary
 List<CmsAccessControlEntry> getAccessControlEntries()
          Returns the access control entries of the resource.
 CmsAccessControlList getAccessControlList()
          Returns the access control list of the resource.
 byte[] getContents()
          Returns the date of the creation of this resource.
 long getDateContent()
          Returns the date of the content of this resource.
 long getDateCreated()
          Returns the date of the creation of this resource.
 long getDateExpired()
          Returns the expiration date this resource.
 long getDateLastModified()
          Returns the date of the last modification of this resource.
 long getDateReleased()
          Returns the release date this resource.
 int getFlags()
          Returns the flags of this resource.
 int getLength()
          Gets the length of the content (i.e.
 int getLoaderId()
          Gets the loader id of this resource.
 CmsLock getLock()
          Gets the lockstate of this resource.
 String getName()
          Returns the name of this resource, e.g.
 String getPath()
          Returns the name of this resource including the full path in the current site, but without the current site root.
 CmsUUID getProjectLastModified()
          Returns the id of the project where the resource has been last modified.
 List<CmsProperty> getProperties()
          Returns the properties of the resource.
 CmsUUID getResourceId()
          Returns the id of the resource database entry of this resource.
 int getSiblingCount()
          Gets the number of references to the resource.
 CmsResourceState getState()
          Returns the state of this resource.
 CmsUUID getStructureId()
          Returns the id of the structure record of this resource.
 int getType()
          Returns the type id for this resource.
 CmsUUID getUserCreated()
          Returns the user id of the user who created this resource.
 CmsUUID getUserLastModified()
          Returns the user id of the user who made the last change on this resource.
 boolean isTouched()
          Returns true if this resource was touched.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_length

protected int m_length
The size of the content.

Constructor Detail

OpenCmsTestResourceStorageEntry

public OpenCmsTestResourceStorageEntry()
Creates a new empty OpenCmsTestResourceStorageEntry.


OpenCmsTestResourceStorageEntry

public OpenCmsTestResourceStorageEntry(CmsObject cms,
                                       String resourceName,
                                       CmsResource res)
                                throws CmsException
Creates a new OpenCmsTestResourceStorageEntry.

Parameters:
cms - current CmsObject
resourceName - the complete name of the resource
res - the CmsResource to store.
Throws:
CmsException - if something goes wrong
Method Detail

getAccessControlEntries

public List<CmsAccessControlEntry> getAccessControlEntries()
Returns the access control entries of the resource.

Returns:
the access control entries of the resource

getAccessControlList

public CmsAccessControlList getAccessControlList()
Returns the access control list of the resource.

Returns:
the access control list of the resource

getContents

public byte[] getContents()
Returns the date of the creation of this resource.

Returns:
the date of the creation of this resource

getDateContent

public long getDateContent()
Returns the date of the content of this resource.

Returns:
the date of the content of this resource

getDateCreated

public long getDateCreated()
Returns the date of the creation of this resource.

Returns:
the date of the creation of this resource

getDateExpired

public long getDateExpired()
Returns the expiration date this resource.

Returns:
the expiration date of this resource

getDateLastModified

public long getDateLastModified()
Returns the date of the last modification of this resource.

Returns:
the date of the last modification of this resource

getDateReleased

public long getDateReleased()
Returns the release date this resource.

Returns:
the release date of this resource

getFlags

public int getFlags()
Returns the flags of this resource.

Returns:
the flags of this resource

getLength

public int getLength()
Gets the length of the content (i.e. the file size).

Returns:
the length of the content

getLoaderId

public int getLoaderId()
Gets the loader id of this resource.

Returns:
the loader type id of this resource

getLock

public CmsLock getLock()
Gets the lockstate of this resource.

Returns:
the lockstate of this resource

getName

public String getName()
Returns the name of this resource, e.g. index.html.

Returns:
the name of this resource

getPath

public String getPath()
Returns the name of this resource including the full path in the current site, but without the current site root.

Returns:
the name of this resource including the full path in the current site

getProjectLastModified

public CmsUUID getProjectLastModified()
Returns the id of the project where the resource has been last modified.

Returns:
the id of the project where the resource has been last modified

getProperties

public List<CmsProperty> getProperties()
Returns the properties of the resource.

Returns:
the properties of the resource

getResourceId

public CmsUUID getResourceId()
Returns the id of the resource database entry of this resource.

Returns:
the id of the resource database entry

getSiblingCount

public int getSiblingCount()
Gets the number of references to the resource.

Returns:
the number of links

getState

public CmsResourceState getState()
Returns the state of this resource.

This may be STATE_UNCHANGED, STATE_CHANGED, STATE_NEW or STATE_DELETED.

Returns:
the state of this resource

getStructureId

public CmsUUID getStructureId()
Returns the id of the structure record of this resource.

Returns:
the id of the structure record of this resource

getType

public int getType()
Returns the type id for this resource.

Returns:
the type id of this resource.

getUserCreated

public CmsUUID getUserCreated()
Returns the user id of the user who created this resource.

Returns:
the user id

getUserLastModified

public CmsUUID getUserLastModified()
Returns the user id of the user who made the last change on this resource.

Returns:
the user id of the user who made the last change


isTouched

public boolean isTouched()
Returns true if this resource was touched.

Returns:
boolean true if this resource was touched