public class CmsDirectEditDefaultProvider extends A_CmsDirectEditProvider
Since OpenCms version 6.2.3, this provider is configured as the standard direct edit provider in a common OpenCms installation.
This provider DOES NOT support CmsDirectEditMode.MANUAL mode.
| 限定符和类型 | 字段和说明 |
|---|---|
protected int |
m_lastPermissionMode
Indicates the permissions for the last element the was opened.
|
INCLUDE_FILE_DEFAULT, m_cms, m_configurationParameters, m_editButtonStyle, m_fileName, m_messages, m_mode, m_rndATTRIBUTE_DIRECT_EDIT_PROVIDER, ATTRIBUTE_DIRECT_EDIT_PROVIDER_PARAMSADD_PARAMETER_METHOD, INIT_CONFIGURATION_METHOD| 构造器和说明 |
|---|
CmsDirectEditDefaultProvider() |
| 限定符和类型 | 方法和说明 |
|---|---|
java.lang.String |
endDirectEditDisabled()
Returns the end HTML for a disabled direct edit button.
|
java.lang.String |
endDirectEditEnabled()
Returns the end HTML for an enabled direct edit button.
|
protected java.lang.String |
getContentAsString(CmsFile file)
Helper method to convert the content of a resource to a string.
|
java.lang.String |
getDirectEditIncludes(CmsDirectEditParams params)
Returns the direct edit include HTML to insert in the page beginning.
|
void |
init(CmsObject cms,
CmsDirectEditMode mode,
java.lang.String fileName)
Initialize method for a new instance of the direct edit provider.
|
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.
|
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)
Returns
false because the default provider does not support manual button placement. |
I_CmsDirectEditProvider |
newInstance()
Creates a new instance of this direct edit provider with the same basic configuration.
|
protected CmsMacroResolver |
prepareMacroResolverForIncludes(CmsDirectEditParams params)
Prepares the macro resolver which is used to process the included text file.
|
java.lang.String |
startDirectEditDisabled(CmsDirectEditParams params,
CmsDirectEditResourceInfo resourceInfo)
Returns the start HTML for a disabled direct edit button.
|
java.lang.String |
startDirectEditEnabled(CmsDirectEditParams params,
CmsDirectEditResourceInfo resourceInfo)
Returns the start HTML for an enabled direct edit button.
|
addConfigurationParameter, getConfiguration, getLink, getNextDirectEditId, getResourceInfo, initConfiguration, insertDirectEditEmptyList, printprotected int m_lastPermissionMode
public java.lang.String endDirectEditDisabled()
public java.lang.String endDirectEditEnabled()
public java.lang.String getDirectEditIncludes(CmsDirectEditParams params)
t
params - the parameters for the direct edit includespublic void init(CmsObject cms, CmsDirectEditMode mode, java.lang.String fileName)
I_CmsDirectEditProviderinit 在接口中 I_CmsDirectEditProviderinit 在类中 A_CmsDirectEditProvidercms - the current users OpenCms contextmode - the direct edit mode to usefileName - link to a file that contains the direct edit HTML elements (optional)A_CmsDirectEditProvider.init(org.opencms.file.CmsObject, org.opencms.workplace.editors.directedit.CmsDirectEditMode, java.lang.String)public void insertDirectEditEnd(javax.servlet.jsp.PageContext context)
throws javax.servlet.jsp.JspException
I_CmsDirectEditProvidercontext - the JSP page context to insert the HTML tojavax.servlet.jsp.JspException - in case something goes wrongI_CmsDirectEditProvider.insertDirectEditEnd(javax.servlet.jsp.PageContext)public void insertDirectEditIncludes(javax.servlet.jsp.PageContext context,
CmsDirectEditParams params)
throws javax.servlet.jsp.JspException
I_CmsDirectEditProvidercontext - the JSP page context to insert the HTML toparams - the parameters for the direct edit includesjavax.servlet.jsp.JspException - in case something goes wrongI_CmsDirectEditProvider.insertDirectEditIncludes(javax.servlet.jsp.PageContext, org.opencms.workplace.editors.directedit.CmsDirectEditParams)public boolean insertDirectEditStart(javax.servlet.jsp.PageContext context,
CmsDirectEditParams params)
throws javax.servlet.jsp.JspException
I_CmsDirectEditProvidercontext - the JSP page context to insert the HTML toparams - the parameters for the direct edit calltrue in case a direct edit element was opened, false otherwisejavax.servlet.jsp.JspException - in case something goes wrongI_CmsDirectEditProvider.insertDirectEditStart(javax.servlet.jsp.PageContext, org.opencms.workplace.editors.directedit.CmsDirectEditParams)public boolean isManual(CmsDirectEditMode mode)
false because the default provider does not support manual button placement.isManual 在接口中 I_CmsDirectEditProviderisManual 在类中 A_CmsDirectEditProvidermode - the mode of the current direct edit elementtrue if this provider (currently) operates in manual modeI_CmsDirectEditProvider.isManual(org.opencms.workplace.editors.directedit.CmsDirectEditMode)public I_CmsDirectEditProvider newInstance()
I_CmsDirectEditProviderI_CmsDirectEditProvider.newInstance()public java.lang.String startDirectEditDisabled(CmsDirectEditParams params, CmsDirectEditResourceInfo resourceInfo)
params - the direct edit parametersresourceInfo - contains information about the resource to editpublic java.lang.String startDirectEditEnabled(CmsDirectEditParams params, CmsDirectEditResourceInfo resourceInfo)
params - the direct edit parametersresourceInfo - contains information about the resource to editprotected java.lang.String getContentAsString(CmsFile file) throws CmsException
file - the fileCmsException - if something goes wrongprotected CmsMacroResolver prepareMacroResolverForIncludes(CmsDirectEditParams params)
params - the direct edit parameters