org.opencms.repository
Class CmsRepositoryItem

java.lang.Object
  extended by org.opencms.repository.CmsRepositoryItem
All Implemented Interfaces:
I_CmsRepositoryItem

public class CmsRepositoryItem
extends java.lang.Object
implements I_CmsRepositoryItem

Represents a single entry in the repository. In the context of OpenCms this means a single CmsResource.

Since:
6.5.6
Version:
$Revision: 1.10 $
Author:
Peter Bonrad

Constructor Summary
CmsRepositoryItem(CmsResource res, CmsObjectWrapper cms)
          Construct a new CmsRepositoryItem initialized with the CmsResource to use and the CmsObjectWrapper needed for some operations.
 
Method Summary
 byte[] getContent()
          Returns the content of this item as a byte array.
 long getContentLength()
          Returns the length of the content of this item.
 long getCreationDate()
          Returns the date of the creation of this item.
 long getLastModifiedDate()
          Returns the date of the last modification of this item.
 java.lang.String getMimeType()
          Returns the mime type of this item.
 java.lang.String getName()
          Returns the name of this item.
 boolean isCollection()
          Checks if this item is a collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsRepositoryItem

public CmsRepositoryItem(CmsResource res,
                         CmsObjectWrapper cms)
Construct a new CmsRepositoryItem initialized with the CmsResource to use and the CmsObjectWrapper needed for some operations.

Parameters:
res - the CmsResource this CmsRepositoryItem is used for
cms - the actual CmsObjectWrapper
Method Detail

getContent

public byte[] getContent()
Description copied from interface: I_CmsRepositoryItem
Returns the content of this item as a byte array.

Specified by:
getContent in interface I_CmsRepositoryItem
Returns:
the content of this item as a byte array
See Also:
I_CmsRepositoryItem.getContent()

getContentLength

public long getContentLength()
Description copied from interface: I_CmsRepositoryItem
Returns the length of the content of this item.

Specified by:
getContentLength in interface I_CmsRepositoryItem
Returns:
the content length of this item as long
See Also:
I_CmsRepositoryItem.getContentLength()

getCreationDate

public long getCreationDate()
Description copied from interface: I_CmsRepositoryItem
Returns the date of the creation of this item.

Specified by:
getCreationDate in interface I_CmsRepositoryItem
Returns:
the creation date if this item as long.
See Also:
I_CmsRepositoryItem.getCreationDate()

getLastModifiedDate

public long getLastModifiedDate()
Description copied from interface: I_CmsRepositoryItem
Returns the date of the last modification of this item.

Specified by:
getLastModifiedDate in interface I_CmsRepositoryItem
Returns:
the last modification date of the item as long
See Also:
I_CmsRepositoryItem.getLastModifiedDate()

getMimeType

public java.lang.String getMimeType()
Description copied from interface: I_CmsRepositoryItem
Returns the mime type of this item.

Specified by:
getMimeType in interface I_CmsRepositoryItem
Returns:
the mime type of this item
See Also:
I_CmsRepositoryItem.getMimeType()

getName

public java.lang.String getName()
Description copied from interface: I_CmsRepositoryItem
Returns the name of this item.

Specified by:
getName in interface I_CmsRepositoryItem
Returns:
the name of this item
See Also:
I_CmsRepositoryItem.getName()

isCollection

public boolean isCollection()
Description copied from interface: I_CmsRepositoryItem
Checks if this item is a collection.

Specified by:
isCollection in interface I_CmsRepositoryItem
Returns:
true if this item is a collection otherwise false
See Also:
I_CmsRepositoryItem.isCollection()