org.opencms.workplace.editors
Interface I_CmsEditorActionHandler

All Known Implementing Classes:
CmsEditorActionDefault

public interface I_CmsEditorActionHandler

Provides a method for performing an individual action if the user pressed a special button in the editor.

You can define the class of your own editor action method in the OpenCms XML configuration files. The class you enter must implement this interface to perform the editor action.

Since:
6.0.0
Version:
$Revision: 1.12 $
Author:
Andreas Zahner

Field Summary
static java.lang.String DIRECT_EDIT_AREA_END
          Deprecated. use CmsDirectEditJspIncludeProvider.DIRECT_EDIT_AREA_END
static java.lang.String DIRECT_EDIT_AREA_START
          Deprecated. use CmsDirectEditJspIncludeProvider.DIRECT_EDIT_AREA_END
static java.lang.String DIRECT_EDIT_INCLUDE_FILE_URI
          Deprecated. not longer used (the file URI is not longer stored in the page context)
static java.lang.String DIRECT_EDIT_INCLUDE_FILE_URI_DEFAULT
          Deprecated. use CmsDirectEditJspIncludeProvider.DIRECT_EDIT_INCLUDE_FILE_URI_DEFAULT
static java.lang.String DIRECT_EDIT_INCLUDES
          Deprecated. use CmsDirectEditJspIncludeProvider.DIRECT_EDIT_INCLUDES
static java.lang.String DIRECT_EDIT_MODE_DISABLED
          Deprecated. use CmsDirectEditPermissions.VALUE_DISABLED or better CmsDirectEditPermissions.DISABLED
static java.lang.String DIRECT_EDIT_MODE_ENABLED
          Deprecated. use CmsDirectEditPermissions.VALUE_ENABLED or better CmsDirectEditPermissions.ENABLED
static java.lang.String DIRECT_EDIT_MODE_INACTIVE
          Deprecated. use CmsDirectEditPermissions.VALUE_INACTIVE or better CmsDirectEditPermissions.INACTIVE
static java.lang.String DIRECT_EDIT_OPTION_DELETE
          Deprecated. use CmsDirectEditButtonSelection.VALUE_DELETE
static java.lang.String DIRECT_EDIT_OPTION_EDIT
          Deprecated. use CmsDirectEditButtonSelection.VALUE_EDIT or better CmsDirectEditButtonSelection.EDIT
static java.lang.String DIRECT_EDIT_OPTION_NEW
          Deprecated. use CmsDirectEditButtonSelection.VALUE_NEW
static java.lang.String DIRECT_EDIT_PARAM_BUTTONSTYLE
          Deprecated. use CmsDirectEditJspIncludeProvider.DIRECT_EDIT_PARAM_BUTTONSTYLE
static java.lang.String DIRECT_EDIT_PARAM_ELEMENT
          Deprecated. use CmsDirectEditJspIncludeProvider.DIRECT_EDIT_PARAM_ELEMENT
static java.lang.String DIRECT_EDIT_PARAM_LOCALE
          Deprecated. use CmsDirectEditJspIncludeProvider.DIRECT_EDIT_PARAM_LOCALE
static java.lang.String DIRECT_EDIT_PARAM_NEWLINK
          Deprecated. use CmsDirectEditJspIncludeProvider.DIRECT_EDIT_PARAM_NEWLINK
static java.lang.String DIRECT_EDIT_PARAM_OPTIONS
          Deprecated. use CmsDirectEditJspIncludeProvider.DIRECT_EDIT_PARAM_OPTIONS
static java.lang.String DIRECT_EDIT_PARAM_TARGET
          Deprecated. use CmsDirectEditJspIncludeProvider.DIRECT_EDIT_PARAM_TARGET
 
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.
 

Field Detail

DIRECT_EDIT_AREA_END

public static final java.lang.String DIRECT_EDIT_AREA_END
Deprecated. use CmsDirectEditJspIncludeProvider.DIRECT_EDIT_AREA_END

Prefix for direct edit end elements, used on JPS pages that supply the direct edit html.

See Also:
Constant Field Values

DIRECT_EDIT_AREA_START

public static final java.lang.String DIRECT_EDIT_AREA_START
Deprecated. use CmsDirectEditJspIncludeProvider.DIRECT_EDIT_AREA_END

Prefix for direct edit start elements, used on JPS pages that supply the direct edit html.

See Also:
Constant Field Values

DIRECT_EDIT_INCLUDE_FILE_URI

public static final java.lang.String DIRECT_EDIT_INCLUDE_FILE_URI
Deprecated. not longer used (the file URI is not longer stored in the page context)

Key to identify the direct edit configuration file.

See Also:
Constant Field Values

DIRECT_EDIT_INCLUDE_FILE_URI_DEFAULT

public static final java.lang.String DIRECT_EDIT_INCLUDE_FILE_URI_DEFAULT
Deprecated. use CmsDirectEditJspIncludeProvider.DIRECT_EDIT_INCLUDE_FILE_URI_DEFAULT

Default direct edit include file URI.

See Also:
Constant Field Values

DIRECT_EDIT_INCLUDES

public static final java.lang.String DIRECT_EDIT_INCLUDES
Deprecated. use CmsDirectEditJspIncludeProvider.DIRECT_EDIT_INCLUDES

Element name for direct edit includes.

See Also:
Constant Field Values

DIRECT_EDIT_MODE_DISABLED

public static final java.lang.String DIRECT_EDIT_MODE_DISABLED
Deprecated. use CmsDirectEditPermissions.VALUE_DISABLED or better CmsDirectEditPermissions.DISABLED

Constant for: direct edit mode disabled.

See Also:
Constant Field Values

DIRECT_EDIT_MODE_ENABLED

public static final java.lang.String DIRECT_EDIT_MODE_ENABLED
Deprecated. use CmsDirectEditPermissions.VALUE_ENABLED or better CmsDirectEditPermissions.ENABLED

Constant for: direct edit mode enabled.

See Also:
Constant Field Values

DIRECT_EDIT_MODE_INACTIVE

public static final java.lang.String DIRECT_EDIT_MODE_INACTIVE
Deprecated. use CmsDirectEditPermissions.VALUE_INACTIVE or better CmsDirectEditPermissions.INACTIVE

Constant for: direct edit mode inactive.

See Also:
Constant Field Values

DIRECT_EDIT_OPTION_DELETE

public static final java.lang.String DIRECT_EDIT_OPTION_DELETE
Deprecated. use CmsDirectEditButtonSelection.VALUE_DELETE

Option value that indicates the "delete" button should be displayed.

See Also:
Constant Field Values

DIRECT_EDIT_OPTION_EDIT

public static final java.lang.String DIRECT_EDIT_OPTION_EDIT
Deprecated. use CmsDirectEditButtonSelection.VALUE_EDIT or better CmsDirectEditButtonSelection.EDIT

Option value that indicates the "edit" button should be displayed.

See Also:
Constant Field Values

DIRECT_EDIT_OPTION_NEW

public static final java.lang.String DIRECT_EDIT_OPTION_NEW
Deprecated. use CmsDirectEditButtonSelection.VALUE_NEW

Option value that indicates the "new" button should be displayed.

See Also:
Constant Field Values

DIRECT_EDIT_PARAM_BUTTONSTYLE

public static final java.lang.String DIRECT_EDIT_PARAM_BUTTONSTYLE
Deprecated. use CmsDirectEditJspIncludeProvider.DIRECT_EDIT_PARAM_BUTTONSTYLE

Key to identify the edit button style, used on JPS pages that supply the direct edit html.

See Also:
Constant Field Values

DIRECT_EDIT_PARAM_ELEMENT

public static final java.lang.String DIRECT_EDIT_PARAM_ELEMENT
Deprecated. use CmsDirectEditJspIncludeProvider.DIRECT_EDIT_PARAM_ELEMENT

Key to identify the edit element, used on JPS pages that supply the direct edit html.

See Also:
Constant Field Values

DIRECT_EDIT_PARAM_LOCALE

public static final java.lang.String DIRECT_EDIT_PARAM_LOCALE
Deprecated. use CmsDirectEditJspIncludeProvider.DIRECT_EDIT_PARAM_LOCALE

Key to identify the edit language, used on JPS pages that supply the direct edit html.

See Also:
Constant Field Values

DIRECT_EDIT_PARAM_NEWLINK

public static final java.lang.String DIRECT_EDIT_PARAM_NEWLINK
Deprecated. use CmsDirectEditJspIncludeProvider.DIRECT_EDIT_PARAM_NEWLINK

Key to identify the link to use for the "new" button (if enabled).

See Also:
Constant Field Values

DIRECT_EDIT_PARAM_OPTIONS

public static final java.lang.String DIRECT_EDIT_PARAM_OPTIONS
Deprecated. use CmsDirectEditJspIncludeProvider.DIRECT_EDIT_PARAM_OPTIONS

Key to identify additional direct edit options, used e.g. to control which direct edit buttons are displayed

See Also:
Constant Field Values

DIRECT_EDIT_PARAM_TARGET

public static final java.lang.String DIRECT_EDIT_PARAM_TARGET
Deprecated. use CmsDirectEditJspIncludeProvider.DIRECT_EDIT_PARAM_TARGET

Key to identify the edit target, used on JPS pages that supply the direct edit html.

See Also:
Constant Field Values
Method Detail

editorAction

public void editorAction(CmsEditor editor,
                         CmsJspActionElement jsp)
                  throws java.io.IOException,
                         javax.servlet.jsp.JspException
Performs an action which is configurable in the implementation of the interface, e.g. save, exit, publish.

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

getButtonName

public java.lang.String getButtonName()
Returns the key name of the button displayed in the editor.

Returns:
the key name of the button

getButtonUrl

public java.lang.String getButtonUrl(CmsJspActionElement jsp,
                                     java.lang.String resourceName)
Returns the URL of the button displayed in the editor.

Parameters:
jsp - the JSP action element
resourceName - the name of the edited resource
Returns:
the URL of the button

isButtonActive

public boolean isButtonActive(CmsJspActionElement jsp,
                              java.lang.String resourceName)
Returns true if the customized button should be active, otherwise false.

Parameters:
jsp - the JSP action element
resourceName - the name of the edited resource
Returns:
true if the customized button should be active, otherwise false