org.opencms.file.wrapper
Class CmsResourceWrapperSystemFolder

java.lang.Object
  extended by org.opencms.file.wrapper.A_CmsResourceWrapper
      extended by org.opencms.file.wrapper.CmsResourceWrapperSystemFolder
All Implemented Interfaces:
I_CmsResourceWrapper

public class CmsResourceWrapperSystemFolder
extends A_CmsResourceWrapper

Adds the system folder to every root folder of target sites.

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

Field Summary
 
Fields inherited from class org.opencms.file.wrapper.A_CmsResourceWrapper
m_isWrappedResource
 
Constructor Summary
CmsResourceWrapperSystemFolder()
           
 
Method Summary
 java.util.List addResourcesToFolder(CmsObject cms, java.lang.String resourcename, CmsResourceFilter filter)
          Here it is possible to add additional (virtual) child resources to those already existing in the VFS.
 boolean isWrappedResource(CmsObject cms, CmsResource res)
          Is called to check if the given resource is handled by this wrapper.
 CmsResource readResource(CmsObject cms, java.lang.String resourcename, CmsResourceFilter filter)
          Reads a resource from the VFS, using the specified resource filter.
 
Methods inherited from class org.opencms.file.wrapper.A_CmsResourceWrapper
copyResource, createResource, deleteResource, getLock, lockResource, moveResource, readFile, restoreLink, rewriteLink, unlockResource, wrapResource, writeFile
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CmsResourceWrapperSystemFolder

public CmsResourceWrapperSystemFolder()
Method Detail

addResourcesToFolder

public java.util.List addResourcesToFolder(CmsObject cms,
                                           java.lang.String resourcename,
                                           CmsResourceFilter filter)
                                    throws CmsException
Description copied from interface: I_CmsResourceWrapper
Here it is possible to add additional (virtual) child resources to those already existing in the VFS.

Specified by:
addResourcesToFolder in interface I_CmsResourceWrapper
Overrides:
addResourcesToFolder in class A_CmsResourceWrapper
Parameters:
cms - the current users OpenCms context
resourcename - the full path of the resource where to add the child resources for
filter - the resource filter to use
Returns:
a list of all additionaly child CmsResources
Throws:
CmsException - if something goes wrong
See Also:
A_CmsResourceWrapper.addResourcesToFolder(CmsObject, String, CmsResourceFilter)

isWrappedResource

public boolean isWrappedResource(CmsObject cms,
                                 CmsResource res)
Description copied from interface: I_CmsResourceWrapper
Is called to check if the given resource is handled by this wrapper.

Parameters:
cms - the initialized CmsObject
res - the resource to check
Returns:
true if the resource will be handled by the wrapper otherwise false
See Also:
I_CmsResourceWrapper.isWrappedResource(CmsObject, CmsResource)

readResource

public CmsResource readResource(CmsObject cms,
                                java.lang.String resourcename,
                                CmsResourceFilter filter)
                         throws CmsException
Description copied from interface: I_CmsResourceWrapper
Reads a resource from the VFS, using the specified resource filter.

First should be a check if the resourcename is handled by this resource wrapper.

It is possible that the path in the resourcename is a virtual path and so has to be translated into a valid path existing in the VFS to read the resource.

Specified by:
readResource in interface I_CmsResourceWrapper
Overrides:
readResource in class A_CmsResourceWrapper
Parameters:
cms - the current users OpenCms context
resourcename - The name of the resource to read (full path)
filter - the resource filter to use while reading
Returns:
the resource that was read or null if it could not be handled by this resource wrapper
Throws:
CmsException - if the resource could not be read for any reason
See Also:
A_CmsResourceWrapper.readResource(org.opencms.file.CmsObject, java.lang.String, org.opencms.file.CmsResourceFilter)