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.
| 限定符和类型 | 字段和说明 |
|---|---|
static java.lang.String |
NAME_SEPARATOR
File name separator.
|
m_isWrappedResource| 构造器和说明 |
|---|
CmsResourceWrapperPreventCreateNameCI() |
| 限定符和类型 | 方法和说明 |
|---|---|
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, writeFilepublic static final java.lang.String NAME_SEPARATOR
public void configure(java.lang.String configString)
I_CmsResourceWrapperOtherwise, it will not be called.
configure 在接口中 I_CmsResourceWrapperconfigure 在类中 A_CmsResourceWrapperconfigString - 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 CmsException, CmsIllegalArgumentException
I_CmsResourceWrapperFirst 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 在接口中 I_CmsResourceWrappercreateResource 在类中 A_CmsResourceWrappercms - 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 resourceCmsException - if something goes wrongCmsIllegalArgumentException - 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_CmsResourceWrappercms - 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_CmsResourceWrapperFirst 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 在接口中 I_CmsResourceWrappermoveResource 在类中 A_CmsResourceWrappercms - 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)