public class CmsResourceWrapperPropertyFile extends A_CmsResourceWrapper
Empty folders don't have the property folder visible.
The names of the property files are the same as the resource they belong to with the extension "properties". To keep the correct sorting the names of folders gets additionaly the prefix "__" to keep them at the beginning of the list.
When creating new folders, the property folder gets visible after a time period of 60 seconds. For new resources the property file appears after that period too. In this time period it is possible to create the property folder and the property files manually. The properties in the created property files will be set at the resource they belong to.
m_isWrappedResource| 构造器和说明 |
|---|
CmsResourceWrapperPropertyFile() |
| 限定符和类型 | 方法和说明 |
|---|---|
java.util.List<CmsResource> |
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.
|
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 |
deleteResource(CmsObject cms,
java.lang.String resourcename,
CmsResourceDeleteMode siblingMode)
Deletes a resource given its name.
|
CmsLock |
getLock(CmsObject cms,
CmsResource resource)
Returns the lock for the resource.
|
boolean |
isWrappedResource(CmsObject cms,
CmsResource res)
Is called to check if the given resource is handled by this wrapper.
|
boolean |
lockResource(CmsObject cms,
java.lang.String resourcename,
boolean temporary)
Locks a resource.
|
CmsFile |
readFile(CmsObject cms,
java.lang.String resourcename,
CmsResourceFilter filter)
Reads a file resource (including it's binary content) from the VFS,
using the specified resource filter.
|
CmsResource |
readResource(CmsObject cms,
java.lang.String resourcename,
CmsResourceFilter filter)
Reads a resource from the VFS, using the specified resource filter.
|
java.lang.String |
restoreLink(CmsObject cms,
java.lang.String uri)
Returns the link to a existing resource in the VFS for the uri.
|
boolean |
unlockResource(CmsObject cms,
java.lang.String resourcename)
Unlocks a resource.
|
CmsFile |
writeFile(CmsObject cms,
CmsFile resource)
Writes a resource, including it's content.
|
configure, copyResource, moveResource, rewriteLink, wrapResourcepublic java.util.List<CmsResource> addResourcesToFolder(CmsObject cms, java.lang.String resourcename, CmsResourceFilter filter) throws CmsException
I_CmsResourceWrapperaddResourcesToFolder 在接口中 I_CmsResourceWrapperaddResourcesToFolder 在类中 A_CmsResourceWrappercms - the current users OpenCms contextresourcename - the full path of the resource where to add the child resources forfilter - the resource filter to useCmsResourcesCmsException - if something goes wrongA_CmsResourceWrapper.addResourcesToFolder(CmsObject, String, CmsResourceFilter)public CmsResource createResource(CmsObject cms, java.lang.String resourcename, 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 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 deleteResource(CmsObject cms, java.lang.String resourcename, CmsResourceDeleteMode siblingMode) throws CmsException
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 delete the resource.
deleteResource 在接口中 I_CmsResourceWrapperdeleteResource 在类中 A_CmsResourceWrappercms - the initialized CmsObjectresourcename - the name of the resource to deletesiblingMode - indicates how to handle siblings of the deleted resourceCmsException - if something goes wrongorg.opencms.file.wrapper.A_CmsResourceWrapper#deleteResource(org.opencms.file.CmsObject, java.lang.String, org.opencms.file.CmsResource.CmsResourceDeleteMode)public CmsLock getLock(CmsObject cms, CmsResource resource) throws CmsException
I_CmsResourceWrapperFirst should be a check if the resource is handled by this resource wrapper.
It is possible that the path in the resource is a virtual path and so has to be translated into a valid path existing in the VFS to get the lock for the resource.
getLock 在接口中 I_CmsResourceWrappergetLock 在类中 A_CmsResourceWrappercms - the initialized CmsObjectresource - the resource to check the lock forCmsException - if something goes wrongA_CmsResourceWrapper.getLock(org.opencms.file.CmsObject, org.opencms.file.CmsResource)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 lockResource(CmsObject cms, java.lang.String resourcename, boolean temporary) throws CmsException
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 lock the resource.
lockResource 在接口中 I_CmsResourceWrapperlockResource 在类中 A_CmsResourceWrappercms - the current users OpenCms contextresourcename - the name of the resource to lock (full path)temporary - true if the resource should only be locked temporarilyCmsException - if something goes wrongA_CmsResourceWrapper.lockResource(org.opencms.file.CmsObject, java.lang.String, boolean)public CmsFile readFile(CmsObject cms, java.lang.String resourcename, CmsResourceFilter filter) throws CmsException
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 read the resource.
readFile 在接口中 I_CmsResourceWrapperreadFile 在类中 A_CmsResourceWrappercms - the current users OpenCms contextresourcename - the name of the resource to read (full path)filter - the resource filter to use while readingCmsException - if the file resource could not be read for any reasonA_CmsResourceWrapper.readFile(org.opencms.file.CmsObject, java.lang.String, org.opencms.file.CmsResourceFilter)public CmsResource readResource(CmsObject cms, java.lang.String resourcename, CmsResourceFilter filter) throws CmsException
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 read the resource.
readResource 在接口中 I_CmsResourceWrapperreadResource 在类中 A_CmsResourceWrappercms - the current users OpenCms contextresourcename - The name of the resource to read (full path)filter - the resource filter to use while readingCmsException - if the resource could not be read for any reasonA_CmsResourceWrapper.readResource(org.opencms.file.CmsObject, java.lang.String, org.opencms.file.CmsResourceFilter)public java.lang.String restoreLink(CmsObject cms, java.lang.String uri)
I_CmsResourceWrapperTurns the virtual path into a real path to a resource in the VFS.
restoreLink 在接口中 I_CmsResourceWrapperrestoreLink 在类中 A_CmsResourceWrappercms - the initialized CmsObjecturi - the (virtual) uri to be restoredA_CmsResourceWrapper.restoreLink(org.opencms.file.CmsObject, java.lang.String)public boolean unlockResource(CmsObject cms, java.lang.String resourcename) throws CmsException
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 unlock the resource.
unlockResource 在接口中 I_CmsResourceWrapperunlockResource 在类中 A_CmsResourceWrappercms - the current users OpenCms contextresourcename - the name of the resource to unlock (full path)CmsException - if something goes wrongA_CmsResourceWrapper.unlockResource(org.opencms.file.CmsObject, java.lang.String)public CmsFile writeFile(CmsObject cms, CmsFile resource) throws CmsException
I_CmsResourceWrapperFirst should be a check if the resource is handled by this resource wrapper.
It is possible that the path in the resource is a virtual path and so has to be translated into a valid path existing in the VFS to write the resource.
writeFile 在接口中 I_CmsResourceWrapperwriteFile 在类中 A_CmsResourceWrappercms - the current cms contextresource - the resource to apply this operation toCmsException - if something goes wrongA_CmsResourceWrapper.writeFile(org.opencms.file.CmsObject, org.opencms.file.CmsFile)