org.opencms.workplace.editors
Class CmsEditorActionDefault

java.lang.Object
  extended by 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
Version:
$Revision: 1.27 $
Author:
Andreas Zahner

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
CmsEditorActionDefault()
          Default constructor needed for editor action handler implementation.
 
Method Summary
 void editorAction(CmsEditor editor, CmsJspActionElement jsp)
          Performs an action which is configurable in the implementation of the interface, e.g. save, exit, publish.
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

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 interface I_CmsEditorActionHandler
Parameters:
editor - the current editor instance
jsp - the JSP action element
Throws:
java.io.IOException - if a redirection fails
javax.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 interface I_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 interface I_CmsEditorActionHandler
Parameters:
jsp - the JSP action element
resourceName - 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 interface I_CmsEditorActionHandler
Parameters:
jsp - the JSP action element
resourceName - 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)