public class CmsWrappedResource extends java.lang.Object
It is not possible to change a CmsResource
instance. This helper class
clones a CmsResource
and can change some attributes of the
CmsResource
like the path, the typeId or the length.
Constructor and Description |
---|
CmsWrappedResource(CmsResource res)
Creates a new virtual resource.
|
Modifier and Type | Method and Description |
---|---|
CmsFile |
getFile()
Returns the virtual resource as a file.
|
int |
getLength()
Returns the length.
|
CmsResource |
getResource()
Returns the virtual resource.
|
java.lang.String |
getRootPath()
Returns the rootPath.
|
int |
getTypeId()
Returns the typeId.
|
boolean |
isFolder()
Returns the isFolder.
|
void |
setFolder(boolean isFolder)
Sets the isFolder.
|
void |
setLength(int length)
Sets the length.
|
void |
setRootPath(java.lang.String rootPath)
Sets the rootPath.
|
void |
setTypeId(int typeId)
Sets the typeId.
|
public CmsWrappedResource(CmsResource res)
res
- the resource this virtual resource is based onpublic CmsFile getFile()
public int getLength()
public CmsResource getResource()
public java.lang.String getRootPath()
public int getTypeId()
public boolean isFolder()
public void setFolder(boolean isFolder)
isFolder
- the isFolder to setpublic void setLength(int length)
length
- the length to setpublic void setRootPath(java.lang.String rootPath)
rootPath
- the rootPath to setpublic void setTypeId(int typeId)
typeId
- the typeId to set