public class CmsResourceWrapperReplaceDeleted extends A_CmsResourceWrapper
This is useful because when accessing a repository, users can neither see nor publish deleted files, and thus can not re-create a file of state "deleted".
m_isWrappedResource
Constructor and Description |
---|
CmsResourceWrapperReplaceDeleted() |
Modifier and Type | Method and Description |
---|---|
CmsResource |
createResource(CmsObject cms,
java.lang.String resourcename,
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.
|
addResourcesToFolder, configure, copyResource, deleteResource, getLock, lockResource, moveResource, readFile, readResource, restoreLink, rewriteLink, unlockResource, wrapResource, writeFile
public CmsResourceWrapperReplaceDeleted()
public CmsResource createResource(CmsObject cms, java.lang.String resourcename, int type, byte[] content, java.util.List<CmsProperty> properties) throws CmsException, 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 CmsObjectresourcename
- 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_CmsResourceWrapper
cms
- the initialized CmsObjectres
- the resource to checkI_CmsResourceWrapper.isWrappedResource(org.opencms.file.CmsObject, org.opencms.file.CmsResource)