Interface I_CmsDirectEditProvider
-
- All Superinterfaces:
java.lang.Cloneable
,I_CmsConfigurationParameterHandler
- All Known Implementing Classes:
A_CmsDirectEditProvider
,CmsAdvancedDirectEditProvider
,CmsDirectEditDefaultProvider
,CmsDirectEditJQueryProvider
,CmsDirectEditJspIncludeProvider
,CmsDirectEditTextButtonProvider
,CmsToolbarDirectEditProvider
public interface I_CmsDirectEditProvider extends I_CmsConfigurationParameterHandler, java.lang.Cloneable
Provides the methods to generate the "direct edit" HTML fragments that are inserted in the generated pages in offline mode.In case you want to implement this, it's a good idea to extend from
A_CmsDirectEditProvider
orCmsDirectEditDefaultProvider
as these already contain the required low level logic.The default direct edit provider used can be configured in
opencms-workplace.xml
in the<directeditprovider class="..." />
node. The standard provider is theCmsDirectEditDefaultProvider
.- Since:
- 6.2.3
- See Also:
CmsDirectEditDefaultProvider
,CmsDirectEditTextButtonProvider
,CmsDirectEditJspIncludeProvider
,CmsJspTagEditable
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ATTRIBUTE_DIRECT_EDIT_PROVIDER
Key to identify the direct edit provider instance.static java.lang.String
ATTRIBUTE_DIRECT_EDIT_PROVIDER_PARAMS
Key to identify the direct edit provider parameteres.-
Fields inherited from interface org.opencms.configuration.I_CmsConfigurationParameterHandler
ADD_PARAMETER_METHOD, INIT_CONFIGURATION_METHOD
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
init(CmsObject cms, CmsDirectEditMode mode, java.lang.String fileName)
Initialize method for a new instance of the direct edit provider.void
insertDirectEditEmptyList(javax.servlet.jsp.PageContext context, CmsDirectEditParams params)
Inserts the direct edit HTML for empty lists in the provided JSP page context.void
insertDirectEditEnd(javax.servlet.jsp.PageContext context)
Inserts the "end direct edit" HTML in the provided JSP page context.void
insertDirectEditIncludes(javax.servlet.jsp.PageContext context, CmsDirectEditParams params)
Inserts the "direct edit header" HTML in the provided JSP page context.void
insertDirectEditListMetadata(javax.servlet.jsp.PageContext context, I_CmsContentLoadCollectorInfo info)
Inserts HTML used as metadata for a collector list in the current JSP context.boolean
insertDirectEditStart(javax.servlet.jsp.PageContext context, CmsDirectEditParams params)
Inserts the "start direct edit" HTML in the provided JSP page context.boolean
isManual(CmsDirectEditMode mode)
Returnstrue
if this provider (currently) operates in manual mode.I_CmsDirectEditProvider
newInstance()
Creates a new instance of this direct edit provider with the same basic configuration.-
Methods inherited from interface org.opencms.configuration.I_CmsConfigurationParameterHandler
addConfigurationParameter, getConfiguration, initConfiguration
-
-
-
-
Field Detail
-
ATTRIBUTE_DIRECT_EDIT_PROVIDER
static final java.lang.String ATTRIBUTE_DIRECT_EDIT_PROVIDER
Key to identify the direct edit provider instance.- See Also:
- Constant Field Values
-
ATTRIBUTE_DIRECT_EDIT_PROVIDER_PARAMS
static final java.lang.String ATTRIBUTE_DIRECT_EDIT_PROVIDER_PARAMS
Key to identify the direct edit provider parameteres.- See Also:
- Constant Field Values
-
-
Method Detail
-
init
void init(CmsObject cms, CmsDirectEditMode mode, java.lang.String fileName)
Initialize method for a new instance of the direct edit provider.- Parameters:
cms
- the current users OpenCms contextmode
- the direct edit mode to usefileName
- link to a file that contains the direct edit HTML elements (optional)
-
insertDirectEditEmptyList
void insertDirectEditEmptyList(javax.servlet.jsp.PageContext context, CmsDirectEditParams params) throws javax.servlet.jsp.JspException
Inserts the direct edit HTML for empty lists in the provided JSP page context.- Parameters:
context
- the JSP page context to insert the HTML toparams
- the parameters for the direct edit call- Throws:
javax.servlet.jsp.JspException
- in case something goes wrong
-
insertDirectEditEnd
void insertDirectEditEnd(javax.servlet.jsp.PageContext context) throws javax.servlet.jsp.JspException
Inserts the "end direct edit" HTML in the provided JSP page context.- Parameters:
context
- the JSP page context to insert the HTML to- Throws:
javax.servlet.jsp.JspException
- in case something goes wrong
-
insertDirectEditIncludes
void insertDirectEditIncludes(javax.servlet.jsp.PageContext context, CmsDirectEditParams params) throws javax.servlet.jsp.JspException
Inserts the "direct edit header" HTML in the provided JSP page context.- Parameters:
context
- the JSP page context to insert the HTML toparams
- the parameters for the direct edit includes- Throws:
javax.servlet.jsp.JspException
- in case something goes wrong
-
insertDirectEditListMetadata
void insertDirectEditListMetadata(javax.servlet.jsp.PageContext context, I_CmsContentLoadCollectorInfo info) throws javax.servlet.jsp.JspException
Inserts HTML used as metadata for a collector list in the current JSP context.- Parameters:
context
- the current JSP contextinfo
- the collector lsit information- Throws:
javax.servlet.jsp.JspException
- if something goes wrong
-
insertDirectEditStart
boolean insertDirectEditStart(javax.servlet.jsp.PageContext context, CmsDirectEditParams params) throws javax.servlet.jsp.JspException
Inserts the "start direct edit" HTML in the provided JSP page context.- Parameters:
context
- the JSP page context to insert the HTML toparams
- the parameters for the direct edit call- Returns:
true
in case a direct edit element was opened,false
otherwise- Throws:
javax.servlet.jsp.JspException
- in case something goes wrong
-
isManual
boolean isManual(CmsDirectEditMode mode)
Returnstrue
if this provider (currently) operates in manual mode.In manual mode the direct edit HTML is inserted with
<cms:enditable mode="manual" />
tags. Otherwise the direct edit HTML is automatically inserted in the current page.Some providers may not be able to operate in manual mode. These will always return
false
.- Parameters:
mode
- the mode of the current direct edit element- Returns:
true
if this provider (currently) operates in manual mode
-
newInstance
I_CmsDirectEditProvider newInstance()
Creates a new instance of this direct edit provider with the same basic configuration.- Returns:
- a new instance of this direct edit provider with the same basic configuration
-
-