Package org.opencms.repository
Class CmsRepositoryItem
- java.lang.Object
-
- 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 singleCmsResource
.- Since:
- 6.5.6
-
-
Constructor Summary
Constructors Constructor Description CmsRepositoryItem(CmsResource res, CmsObjectWrapper cms)
Construct a new CmsRepositoryItem initialized with theCmsResource
to use and theCmsObjectWrapper
needed for some operations.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
Constructor Detail
-
CmsRepositoryItem
public CmsRepositoryItem(CmsResource res, CmsObjectWrapper cms)
Construct a new CmsRepositoryItem initialized with theCmsResource
to use and theCmsObjectWrapper
needed for some operations.- Parameters:
res
- the CmsResource this CmsRepositoryItem is used forcms
- 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 interfaceI_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 interfaceI_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 interfaceI_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 interfaceI_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 interfaceI_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 interfaceI_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 interfaceI_CmsRepositoryItem
- Returns:
- true if this item is a collection otherwise false
- See Also:
I_CmsRepositoryItem.isCollection()
-
-