|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.opencms.file.types.A_CmsResourceType
org.opencms.file.types.A_CmsResourceTypeLinkParseable
public abstract class A_CmsResourceTypeLinkParseable
Base implementation for resource types implementing the I_CmsLinkParseable
interface.
Field Summary |
---|
Fields inherited from class org.opencms.file.types.A_CmsResourceType |
---|
m_addititionalModuleResourceType, m_className, m_copyResources, m_defaultProperties, m_frozen, m_mappings, m_typeId, m_typeName, MACRO_RESOURCE_FOLDER_PATH, MACRO_RESOURCE_NAME, MACRO_RESOURCE_PARENT_PATH, MACRO_RESOURCE_ROOT_PATH, MACRO_RESOURCE_SITE_PATH |
Fields inherited from interface org.opencms.file.types.I_CmsResourceType |
---|
ADD_MAPPING_METHOD, ADD_RESOURCE_TYPE_METHOD, CONFIGURATION_PROPERTY_CREATE, CONFIGURATION_RESOURCE_TYPE_ID, CONFIGURATION_RESOURCE_TYPE_NAME, PROPERTY_ON_RESOURCE, PROPERTY_ON_STRUCTURE |
Fields inherited from interface org.opencms.configuration.I_CmsConfigurationParameterHandler |
---|
ADD_PARAMETER_METHOD, INIT_CONFIGURATION_METHOD |
Constructor Summary | |
---|---|
A_CmsResourceTypeLinkParseable()
Default constructor. |
Method Summary | |
---|---|
void |
copyResource(CmsObject cms,
CmsSecurityManager securityManager,
CmsResource source,
java.lang.String destination,
CmsResource.CmsResourceCopyMode siblingMode)
Copies a resource. |
CmsResource |
createResource(CmsObject cms,
CmsSecurityManager securityManager,
java.lang.String resourcename,
byte[] content,
java.util.List properties)
Creates a new resource of the given resource type with the provided content and properties. |
CmsResource |
createSibling(CmsObject cms,
CmsSecurityManager securityManager,
CmsResource source,
java.lang.String destination,
java.util.List properties)
Creates a new sibling of the source resource. |
boolean |
isDirectEditable()
Returns true if this resource type is direct editable. |
void |
moveResource(CmsObject cms,
CmsSecurityManager securityManager,
CmsResource resource,
java.lang.String destination)
Moves a resource to the given destination. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface org.opencms.relations.I_CmsLinkParseable |
---|
parseLinks |
Constructor Detail |
---|
public A_CmsResourceTypeLinkParseable()
Method Detail |
---|
public void copyResource(CmsObject cms, CmsSecurityManager securityManager, CmsResource source, java.lang.String destination, CmsResource.CmsResourceCopyMode siblingMode) throws CmsException
I_CmsResourceType
You must ensure that the destination path is an absolute, valid and existing VFS path. Relative paths from the source are currently not supported.
The copied resource will always be locked to the current user after the copy operation.
In case the target resource already exists, it is overwritten with the source resource.
The siblingMode
parameter controls how to handle siblings
during the copy operation.
Possible values for this parameter are:
copyResource
in interface I_CmsResourceType
copyResource
in class A_CmsResourceType
cms
- the initialized CmsObjectsecurityManager
- the initialized OpenCms security managersource
- the resource to copydestination
- the name of the copy destination with complete pathsiblingMode
- indicates how to handle siblings during copy
CmsException
- if something goes wrongI_CmsResourceType.copyResource(org.opencms.file.CmsObject, CmsSecurityManager, CmsResource, java.lang.String, CmsResource.CmsResourceCopyMode)
public CmsResource createResource(CmsObject cms, CmsSecurityManager securityManager, java.lang.String resourcename, byte[] content, java.util.List properties) throws CmsException
I_CmsResourceType
createResource
in interface I_CmsResourceType
createResource
in class A_CmsResourceType
cms
- the initialized CmsObjectsecurityManager
- the initialized OpenCms security managerresourcename
- the name of the resource to create (full path)content
- the content for the new resourceproperties
- the properties for the new resource
CmsException
- if something goes wrongI_CmsResourceType.createResource(org.opencms.file.CmsObject, CmsSecurityManager, java.lang.String, byte[], List)
public CmsResource createSibling(CmsObject cms, CmsSecurityManager securityManager, CmsResource source, java.lang.String destination, java.util.List properties) throws CmsException
I_CmsResourceType
createSibling
in interface I_CmsResourceType
createSibling
in class A_CmsResourceType
cms
- the current cms contextsecurityManager
- the initialized OpenCms security managersource
- the resource to create a sibling fordestination
- the name of the sibling to create with complete pathproperties
- the individual properties for the new sibling
CmsException
- if something goes wrongI_CmsResourceType.createSibling(org.opencms.file.CmsObject, org.opencms.db.CmsSecurityManager, CmsResource, java.lang.String, java.util.List)
public boolean isDirectEditable()
I_CmsResourceType
true
if this resource type is direct editable.
isDirectEditable
in interface I_CmsResourceType
isDirectEditable
in class A_CmsResourceType
true
if this resource type is direct editableI_CmsResourceType.isDirectEditable()
public void moveResource(CmsObject cms, CmsSecurityManager securityManager, CmsResource resource, java.lang.String destination) throws CmsException, CmsIllegalArgumentException
I_CmsResourceType
A move operation in OpenCms is always a copy (as sibling) followed by a delete, this is a result of the online/offline structure of the OpenCms VFS. This way you can see the deleted files/folders in the offline project, and you will be unable to undelete them.
moveResource
in interface I_CmsResourceType
moveResource
in class A_CmsResourceType
cms
- the current cms contextsecurityManager
- the initialized OpenCms security managerresource
- the resource to movedestination
- the destination resource name
CmsException
- if something goes wrong
CmsIllegalArgumentException
- if the source
argument is null or of length 0I_CmsResourceType.moveResource(org.opencms.file.CmsObject, org.opencms.db.CmsSecurityManager, org.opencms.file.CmsResource, java.lang.String)
|
||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |