Package org.opencms.workplace.editors
Class CmsEditorActionDefault
- java.lang.Object
-
- org.opencms.workplace.editors.CmsEditorActionDefault
-
- All Implemented Interfaces:
I_CmsEditorActionHandler
public class CmsEditorActionDefault extends java.lang.Object implements I_CmsEditorActionHandler
Provides a method to perform a user defined action when editing a page.- Since:
- 6.0.0
-
-
Field Summary
-
Fields inherited from interface org.opencms.workplace.editors.I_CmsEditorActionHandler
DIRECT_EDIT_AREA_END, DIRECT_EDIT_AREA_START, DIRECT_EDIT_INCLUDE_FILE_URI, DIRECT_EDIT_INCLUDE_FILE_URI_DEFAULT, DIRECT_EDIT_INCLUDES, DIRECT_EDIT_MODE_DISABLED, DIRECT_EDIT_MODE_ENABLED, DIRECT_EDIT_MODE_INACTIVE, DIRECT_EDIT_OPTION_DELETE, DIRECT_EDIT_OPTION_EDIT, DIRECT_EDIT_OPTION_NEW, DIRECT_EDIT_PARAM_BUTTONSTYLE, DIRECT_EDIT_PARAM_ELEMENT, DIRECT_EDIT_PARAM_LOCALE, DIRECT_EDIT_PARAM_NEWLINK, DIRECT_EDIT_PARAM_OPTIONS, DIRECT_EDIT_PARAM_TARGET
-
-
Constructor Summary
Constructors Constructor Description CmsEditorActionDefault()
Default constructor needed for editor action handler implementation.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
editorAction(CmsEditor editor, CmsJspActionElement jsp)
Performs an action which is configurable in the implementation of the interface, e.g.java.lang.String
getButtonName()
Returns the key name of the button displayed in the editor.java.lang.String
getButtonUrl(CmsJspActionElement jsp, java.lang.String resourceName)
Returns the URL of the button displayed in the editor.boolean
isButtonActive(CmsJspActionElement jsp, java.lang.String resourceName)
Returns true if the customized button should be active, otherwise false.
-
-
-
Constructor Detail
-
CmsEditorActionDefault
public CmsEditorActionDefault()
Default constructor needed for editor action handler implementation.
-
-
Method Detail
-
editorAction
public void editorAction(CmsEditor editor, CmsJspActionElement jsp) throws java.io.IOException, javax.servlet.jsp.JspException
Description copied from interface:I_CmsEditorActionHandler
Performs an action which is configurable in the implementation of the interface, e.g. save, exit, publish.- Specified by:
editorAction
in interfaceI_CmsEditorActionHandler
- Parameters:
editor
- the current editor instancejsp
- the JSP action element- Throws:
java.io.IOException
- if a redirection failsjavax.servlet.jsp.JspException
- if including a JSP fails- See Also:
I_CmsEditorActionHandler.editorAction(org.opencms.workplace.editors.CmsEditor, org.opencms.jsp.CmsJspActionElement)
-
getButtonName
public java.lang.String getButtonName()
Description copied from interface:I_CmsEditorActionHandler
Returns the key name of the button displayed in the editor.- Specified by:
getButtonName
in interfaceI_CmsEditorActionHandler
- Returns:
- the key name of the button
- See Also:
I_CmsEditorActionHandler.getButtonName()
-
getButtonUrl
public java.lang.String getButtonUrl(CmsJspActionElement jsp, java.lang.String resourceName)
Description copied from interface:I_CmsEditorActionHandler
Returns the URL of the button displayed in the editor.- Specified by:
getButtonUrl
in interfaceI_CmsEditorActionHandler
- Parameters:
jsp
- the JSP action elementresourceName
- the name of the edited resource- Returns:
- the URL of the button
- See Also:
I_CmsEditorActionHandler.getButtonUrl(CmsJspActionElement, java.lang.String)
-
isButtonActive
public boolean isButtonActive(CmsJspActionElement jsp, java.lang.String resourceName)
Description copied from interface:I_CmsEditorActionHandler
Returns true if the customized button should be active, otherwise false.- Specified by:
isButtonActive
in interfaceI_CmsEditorActionHandler
- Parameters:
jsp
- the JSP action elementresourceName
- the name of the edited resource- Returns:
- true if the customized button should be active, otherwise false
- See Also:
I_CmsEditorActionHandler.isButtonActive(CmsJspActionElement, java.lang.String)
-
-