Package org.opencms.workplace.editors
Class A_CmsPreEditorActionDefinition
- java.lang.Object
-
- org.opencms.workplace.editors.A_CmsPreEditorActionDefinition
-
- All Implemented Interfaces:
I_CmsConfigurationParameterHandler
,I_CmsPreEditorActionDefinition
- Direct Known Subclasses:
CmsPreEditorActionDefinitionXmlContent
public abstract class A_CmsPreEditorActionDefinition extends java.lang.Object implements I_CmsPreEditorActionDefinition
Defines an action to be performed before the workplace editor is opened for the first time.Implements the basic methods to handle the resource type.
- Since:
- 6.5.4
-
-
Field Summary
Fields Modifier and Type Field Description protected CmsParameterConfiguration
m_configuration
Configuration parameters.-
Fields inherited from interface org.opencms.configuration.I_CmsConfigurationParameterHandler
ADD_PARAMETER_METHOD, INIT_CONFIGURATION_METHOD
-
-
Constructor Summary
Constructors Constructor Description A_CmsPreEditorActionDefinition()
Constructor, without parameters.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description void
addConfigurationParameter(java.lang.String paramName, java.lang.String paramValue)
Adds a configuration parameter to this parameter configurable class instance.abstract boolean
doPreAction(CmsResource resource, CmsDialog dialog, java.lang.String originalParams)
Returns if an action has to be performed before opening the editor depending on the resource to edit and eventual request parameter values.CmsParameterConfiguration
getConfiguration()
Returns the parameters of this configurable class instance, ornull
if the class does not need any parameters.I_CmsResourceType
getResourceType()
Returns the resource type for which the action should be performed.java.lang.String
getResourceTypeName()
Returns the resource type name for which the action should be performed.void
initConfiguration()
Initializes a configuration after all parameters have been added.void
setResourceTypeName(java.lang.String resourceTypeName)
Sets the resource type name for which the action should be performed.
-
-
-
Field Detail
-
m_configuration
protected CmsParameterConfiguration m_configuration
Configuration parameters.
-
-
Constructor Detail
-
A_CmsPreEditorActionDefinition
public A_CmsPreEditorActionDefinition()
Constructor, without parameters.
-
-
Method Detail
-
addConfigurationParameter
public void addConfigurationParameter(java.lang.String paramName, java.lang.String paramValue)
Description copied from interface:I_CmsConfigurationParameterHandler
Adds a configuration parameter to this parameter configurable class instance.- Specified by:
addConfigurationParameter
in interfaceI_CmsConfigurationParameterHandler
- Parameters:
paramName
- the name of the parameterparamValue
- the value for the parameter- See Also:
I_CmsConfigurationParameterHandler.addConfigurationParameter(java.lang.String, java.lang.String)
-
doPreAction
public abstract boolean doPreAction(CmsResource resource, CmsDialog dialog, java.lang.String originalParams) throws java.lang.Exception
Description copied from interface:I_CmsPreEditorActionDefinition
Returns if an action has to be performed before opening the editor depending on the resource to edit and eventual request parameter values.- Specified by:
doPreAction
in interfaceI_CmsPreEditorActionDefinition
- Parameters:
resource
- the resource to be editeddialog
- the dialog instanceoriginalParams
- the original request parameters as String passed to the editor- Returns:
- true if an action has to be performed before opening the editor
- Throws:
java.lang.Exception
- if something goes wrong- See Also:
I_CmsPreEditorActionDefinition.doPreAction(org.opencms.file.CmsResource, org.opencms.workplace.CmsDialog, java.lang.String)
-
getConfiguration
public CmsParameterConfiguration getConfiguration()
Description copied from interface:I_CmsConfigurationParameterHandler
Returns the parameters of this configurable class instance, ornull
if the class does not need any parameters.- Specified by:
getConfiguration
in interfaceI_CmsConfigurationParameterHandler
- Returns:
- the parameters of this configurable class instance,
or
null
if the class does not need any parameters - See Also:
I_CmsConfigurationParameterHandler.getConfiguration()
-
getResourceType
public I_CmsResourceType getResourceType()
Description copied from interface:I_CmsPreEditorActionDefinition
Returns the resource type for which the action should be performed.- Specified by:
getResourceType
in interfaceI_CmsPreEditorActionDefinition
- Returns:
- the resource type
- See Also:
I_CmsPreEditorActionDefinition.getResourceType()
-
getResourceTypeName
public java.lang.String getResourceTypeName()
Description copied from interface:I_CmsPreEditorActionDefinition
Returns the resource type name for which the action should be performed.- Specified by:
getResourceTypeName
in interfaceI_CmsPreEditorActionDefinition
- Returns:
- the resource type name
- See Also:
I_CmsPreEditorActionDefinition.getResourceTypeName()
-
initConfiguration
public final void initConfiguration()
Description copied from interface:I_CmsConfigurationParameterHandler
Initializes a configuration after all parameters have been added.- Specified by:
initConfiguration
in interfaceI_CmsConfigurationParameterHandler
- See Also:
I_CmsConfigurationParameterHandler.initConfiguration()
-
setResourceTypeName
public void setResourceTypeName(java.lang.String resourceTypeName)
Description copied from interface:I_CmsPreEditorActionDefinition
Sets the resource type name for which the action should be performed.- Specified by:
setResourceTypeName
in interfaceI_CmsPreEditorActionDefinition
- Parameters:
resourceTypeName
- the resource type name- See Also:
I_CmsPreEditorActionDefinition.setResourceTypeName(java.lang.String)
-
-