|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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.
Field Summary | |
static java.lang.String |
DIRECT_EDIT_AREA_END
Prefix for direct edit end elements, used on JPS pages that supply the direct edit html. |
static java.lang.String |
DIRECT_EDIT_AREA_START
Prefix for direct edit start elements, used on JPS pages that supply the direct edit html. |
static java.lang.String |
DIRECT_EDIT_INCLUDE_FILE_URI
Key to identify the direct edit configuration file. |
static java.lang.String |
DIRECT_EDIT_INCLUDE_FILE_URI_DEFAULT
Default direct edit include file URI. |
static java.lang.String |
DIRECT_EDIT_INCLUDES
Element name for direct edit includes. |
static java.lang.String |
DIRECT_EDIT_MODE_DISABLED
Constant for: direct edit mode disabled. |
static java.lang.String |
DIRECT_EDIT_MODE_ENABLED
Constant for: direct edit mode enabled. |
static java.lang.String |
DIRECT_EDIT_MODE_INACTIVE
Constant for: direct edit mode inactive. |
static java.lang.String |
DIRECT_EDIT_OPTION_DELETE
Option value that indicates the "delete" button should be displayed. |
static java.lang.String |
DIRECT_EDIT_OPTION_EDIT
Option value that indicates the "edit" button should be displayed. |
static java.lang.String |
DIRECT_EDIT_OPTION_NEW
Option value that indicates the "new" button should be displayed. |
static java.lang.String |
DIRECT_EDIT_PARAM_BUTTONSTYLE
Key to identify the edit button style, used on JPS pages that supply the direct edit html. |
static java.lang.String |
DIRECT_EDIT_PARAM_ELEMENT
Key to identify the edit element, used on JPS pages that supply the direct edit html. |
static java.lang.String |
DIRECT_EDIT_PARAM_LOCALE
Key to identify the edit language, used on JPS pages that supply the direct edit html. |
static java.lang.String |
DIRECT_EDIT_PARAM_NEWLINK
Key to identify the link to use for the "new" button (if enabled). |
static java.lang.String |
DIRECT_EDIT_PARAM_OPTIONS
Key to identify additional direct edit options, used e.g. to control which direct edit buttons are displayed |
static java.lang.String |
DIRECT_EDIT_PARAM_TARGET
Key to identify the edit target, used on JPS pages that supply the direct edit html. |
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. |
java.lang.String |
getEditMode(CmsObject cmsObject,
java.lang.String filename,
java.lang.String element,
javax.servlet.ServletRequest req)
Checks the current edit mode. |
boolean |
isButtonActive(CmsJspActionElement jsp,
java.lang.String resourceName)
Returns true if the customized button should be active, otherwise false. |
Field Detail |
public static final java.lang.String DIRECT_EDIT_AREA_END
public static final java.lang.String DIRECT_EDIT_AREA_START
public static final java.lang.String DIRECT_EDIT_INCLUDE_FILE_URI
public static final java.lang.String DIRECT_EDIT_INCLUDE_FILE_URI_DEFAULT
public static final java.lang.String DIRECT_EDIT_INCLUDES
public static final java.lang.String DIRECT_EDIT_MODE_DISABLED
public static final java.lang.String DIRECT_EDIT_MODE_ENABLED
public static final java.lang.String DIRECT_EDIT_MODE_INACTIVE
public static final java.lang.String DIRECT_EDIT_OPTION_DELETE
public static final java.lang.String DIRECT_EDIT_OPTION_EDIT
public static final java.lang.String DIRECT_EDIT_OPTION_NEW
public static final java.lang.String DIRECT_EDIT_PARAM_BUTTONSTYLE
public static final java.lang.String DIRECT_EDIT_PARAM_ELEMENT
public static final java.lang.String DIRECT_EDIT_PARAM_LOCALE
public static final java.lang.String DIRECT_EDIT_PARAM_NEWLINK
public static final java.lang.String DIRECT_EDIT_PARAM_OPTIONS
public static final java.lang.String DIRECT_EDIT_PARAM_TARGET
Method Detail |
public void editorAction(CmsEditor editor, CmsJspActionElement jsp) throws java.io.IOException, javax.servlet.jsp.JspException
editor
- the current editor instancejsp
- the JSP action element
java.io.IOException
- if a redirection fails
javax.servlet.jsp.JspException
- if including a JSP failspublic java.lang.String getButtonName()
public java.lang.String getButtonUrl(CmsJspActionElement jsp, java.lang.String resourceName)
jsp
- the JSP action elementresourceName
- the name of the edited resource
public java.lang.String getEditMode(CmsObject cmsObject, java.lang.String filename, java.lang.String element, javax.servlet.ServletRequest req)
The mode is used to select the appropriate elements for displaying the direct edit button. If the resource is displayed in online project -> editmode = null If the resource is temporary -> editmode = inactive If the resource does not belong to the current project -> editmode = inactive If the current user has no write permissions on the resource -> editmode = inactive If the resource is locked for another user -> editmode = disabled Otherwise -> editmode = enabled
cmsObject
- the cms objectfilename
- name of the resourceelement
- of the desired element or null
req
- the current request
public boolean isButtonActive(CmsJspActionElement jsp, java.lang.String resourceName)
jsp
- the JSP action elementresourceName
- the name of the edited resource
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |