|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.test.OpenCmsTestResourceStorage
public class OpenCmsTestResourceStorage
Storage object for storing all attributes of vfs resources.
Field Summary | |
---|---|
static String |
DEFAULT_STORAGE
the name of the default storage. |
static String |
GLOBAL_STORAGE
the name of the default storage. |
Constructor Summary | |
---|---|
OpenCmsTestResourceStorage(String name)
Creates a new OpenCmsTestResourceStorage. |
Method Summary | |
---|---|
void |
add(CmsObject cms,
String resourceName,
CmsResource resource)
Adds a CmsResource to the resource storage. |
OpenCmsTestResourceStorageEntry |
get(String resourceName)
Gets an entry from the storage. |
String |
getName()
Gets the name of the storage. |
CmsResourceState |
getPreCalculatedState(String resourceName)
Gets an precalculate resource state from the storage. |
String |
getSourceNameMapping()
Returns the source name mapping. |
String |
getTargetNameMapping()
Returns the target name mapping. |
String |
mapResourcename(String resourceName)
Does the name mapping of a resourceName. |
void |
resetMapping()
Resets the mapping for resourcenames. |
void |
setMapping(String source,
String target)
Sets the mapping for resourcenames. |
int |
size()
Returns the size of the storage. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static String DEFAULT_STORAGE
public static String GLOBAL_STORAGE
Constructor Detail |
---|
public OpenCmsTestResourceStorage(String name)
name
- the name of the storageMethod Detail |
---|
public void add(CmsObject cms, String resourceName, CmsResource resource) throws CmsException
cms
- the CmsObjectresourceName
- the resource name to addresource
- the resource to add
CmsException
- if something goes wrongpublic OpenCmsTestResourceStorageEntry get(String resourceName) throws Exception
resourceName
- the name of the resource to get
Exception
- in case something goes wrongpublic String getName()
public int size()
public CmsResourceState getPreCalculatedState(String resourceName) throws Exception
resourceName
- the name of the resource to get the state
Exception
- in case something goes wrongpublic String getSourceNameMapping()
public String getTargetNameMapping()
public void setMapping(String source, String target)
source
- the source resource nametarget
- the target resource namepublic void resetMapping()
public String mapResourcename(String resourceName)
This is required to find resources in the resource storage afer their path in the vfs has changed (e.g. after a copy operation).
resourceName
- the resource name to map
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |