public class CmsResourceWrapperPreventCreateNameCI extends A_CmsResourceWrapper
This can be used to prevent file browsers accessing the repository from creating thumbnail files. This class does not distinguish between upper case and lower case letters in file names.
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
NAME_SEPARATOR
File name separator.
|
m_isWrappedResource
Constructor and Description |
---|
CmsResourceWrapperPreventCreateNameCI() |
Modifier and Type | Method and Description |
---|---|
void |
configure(java.lang.String configString)
If there is a configuration string for the wrapper, this method will be called with the configuration string
before it is used.
|
CmsResource |
createResource(CmsObject cms,
java.lang.String resourcepath,
int type,
byte[] content,
java.util.List<CmsProperty> properties)
Creates a new resource of the given resource type
with the provided content and properties.
|
boolean |
isWrappedResource(CmsObject cms,
CmsResource res)
Is called to check if the given resource is handled by this wrapper.
|
boolean |
moveResource(CmsObject cms,
java.lang.String source,
java.lang.String destination)
Moves a resource to the given destination.
|
addResourcesToFolder, copyResource, deleteResource, getLock, lockResource, readFile, readResource, restoreLink, rewriteLink, unlockResource, wrapResource, writeFile
public static final java.lang.String NAME_SEPARATOR
public CmsResourceWrapperPreventCreateNameCI()
public void configure(java.lang.String configString)
I_CmsResourceWrapper
Otherwise, it will not be called.
configure
in interface I_CmsResourceWrapper
configure
in class A_CmsResourceWrapper
configString
- the configuration string for the wrapperA_CmsResourceWrapper.configure(java.lang.String)
public CmsResource createResource(CmsObject cms, java.lang.String resourcepath, int type, byte[] content, java.util.List<CmsProperty> properties) throws CmsIllegalArgumentException
I_CmsResourceWrapper
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 create the resource.
createResource
in interface I_CmsResourceWrapper
createResource
in class A_CmsResourceWrapper
cms
- the initialized CmsObjectresourcepath
- the name of the resource to create (full path)type
- the type of the resource to createcontent
- the content for the new resourceproperties
- the properties for the new resourceCmsIllegalArgumentException
- if the source
argument is null or of length 0A_CmsResourceWrapper.createResource(org.opencms.file.CmsObject, java.lang.String, int, byte[], java.util.List)
public boolean isWrappedResource(CmsObject cms, CmsResource res)
I_CmsResourceWrapper
cms
- the initialized CmsObjectres
- the resource to checkI_CmsResourceWrapper.isWrappedResource(org.opencms.file.CmsObject, org.opencms.file.CmsResource)
public boolean moveResource(CmsObject cms, java.lang.String source, java.lang.String destination) throws CmsException, CmsIllegalArgumentException
I_CmsResourceWrapper
First should be a check if the source and/or the destination are handled by this resource wrapper.
It is possible that the path in the source or in the destination are virtual paths and so has to be translated into valid paths existing in the VFS to move the resource.
moveResource
in interface I_CmsResourceWrapper
moveResource
in class A_CmsResourceWrapper
cms
- the current cms contextsource
- the name of the resource to movedestination
- the destination resource nameCmsException
- if something goes wrongCmsIllegalArgumentException
- if the source
argument is null or of length 0A_CmsResourceWrapper.moveResource(org.opencms.file.CmsObject, java.lang.String, java.lang.String)