public abstract class A_CmsDirectEditProvider extends java.lang.Object implements I_CmsDirectEditProvider
限定符和类型 | 字段和说明 |
---|---|
protected static java.lang.String |
INCLUDE_FILE_DEFAULT
Default direct edit include file URI for post 6.2.3 direct edit providers.
|
protected CmsObject |
m_cms
The current users OpenCms context.
|
protected CmsParameterConfiguration |
m_configurationParameters
The parameters form the configuration.
|
protected int |
m_editButtonStyle
The editor button style to use.
|
protected java.lang.String |
m_fileName
Value of the "fileName" parameter.
|
protected CmsMessages |
m_messages
Used to access the editor messages.
|
protected CmsDirectEditMode |
m_mode
Indicates which direct edit mode is used.
|
protected java.util.Random |
m_rnd
Used to generate the edit id's.
|
ATTRIBUTE_DIRECT_EDIT_PROVIDER, ATTRIBUTE_DIRECT_EDIT_PROVIDER_PARAMS
ADD_PARAMETER_METHOD, INIT_CONFIGURATION_METHOD
构造器和说明 |
---|
A_CmsDirectEditProvider() |
限定符和类型 | 方法和说明 |
---|---|
void |
addConfigurationParameter(java.lang.String paramName,
java.lang.String paramValue)
Adds a configuration parameter to this parameter configurable class instance.
|
CmsParameterConfiguration |
getConfiguration()
Returns the parameters of this configurable class instance,
or
null if the class does not need any parameters. |
protected java.lang.String |
getLink(java.lang.String target)
Returns the given link resolved according to the OpenCms context and export rules.
|
protected java.lang.String |
getNextDirectEditId()
Returns the next random edit id.
|
CmsDirectEditResourceInfo |
getResourceInfo(java.lang.String resourceName)
Calculates the direct edit resource information for the given VFS resource.
|
void |
init(CmsObject cms,
CmsDirectEditMode mode,
java.lang.String fileName)
Initialize method for a new instance of the direct edit provider.
|
void |
initConfiguration()
Initializes a configuration after all parameters have been added.
|
void |
insertDirectEditEmptyList(javax.servlet.jsp.PageContext context,
CmsDirectEditParams params)
Inserts the direct edit HTML for empty lists in the provided JSP page context.
|
boolean |
isManual(CmsDirectEditMode mode)
Returns
true if this provider (currently) operates in manual mode. |
protected void |
print(javax.servlet.jsp.PageContext context,
java.lang.String content)
Prints the given content string to the given page context.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
insertDirectEditEnd, insertDirectEditIncludes, insertDirectEditStart, newInstance
protected static final java.lang.String INCLUDE_FILE_DEFAULT
protected CmsObject m_cms
protected CmsParameterConfiguration m_configurationParameters
protected int m_editButtonStyle
protected java.lang.String m_fileName
protected CmsMessages m_messages
protected CmsDirectEditMode m_mode
protected java.util.Random m_rnd
public void addConfigurationParameter(java.lang.String paramName, java.lang.String paramValue)
I_CmsConfigurationParameterHandler
addConfigurationParameter
在接口中 I_CmsConfigurationParameterHandler
paramName
- the name of the parameterparamValue
- the value for the parameterI_CmsConfigurationParameterHandler.addConfigurationParameter(java.lang.String, java.lang.String)
public CmsParameterConfiguration getConfiguration()
I_CmsConfigurationParameterHandler
null
if the class does not need any parameters.getConfiguration
在接口中 I_CmsConfigurationParameterHandler
null
if the class does not need any parametersI_CmsConfigurationParameterHandler.getConfiguration()
public CmsDirectEditResourceInfo getResourceInfo(java.lang.String resourceName)
This includes the direct edit permissions.
If the permissions are not CmsDirectEditPermissions.INACTIVE
, then the resource and lock
information is also included in the result.
resourceName
- the name of the VFS resource to get the direct edit info forpublic void init(CmsObject cms, CmsDirectEditMode mode, java.lang.String fileName)
I_CmsDirectEditProvider
init
在接口中 I_CmsDirectEditProvider
cms
- the current users OpenCms contextmode
- the direct edit mode to usefileName
- link to a file that contains the direct edit HTML elements (optional)I_CmsDirectEditProvider.init(org.opencms.file.CmsObject, org.opencms.workplace.editors.directedit.CmsDirectEditMode, java.lang.String)
public void initConfiguration() throws CmsConfigurationException
I_CmsConfigurationParameterHandler
initConfiguration
在接口中 I_CmsConfigurationParameterHandler
CmsConfigurationException
- if something goes wrongI_CmsConfigurationParameterHandler.initConfiguration()
public void insertDirectEditEmptyList(javax.servlet.jsp.PageContext context, CmsDirectEditParams params) throws javax.servlet.jsp.JspException
I_CmsDirectEditProvider
insertDirectEditEmptyList
在接口中 I_CmsDirectEditProvider
context
- the JSP page context to insert the HTML toparams
- the parameters for the direct edit calljavax.servlet.jsp.JspException
- in case something goes wrongI_CmsDirectEditProvider.insertDirectEditEmptyList(javax.servlet.jsp.PageContext, org.opencms.workplace.editors.directedit.CmsDirectEditParams)
public boolean isManual(CmsDirectEditMode mode)
I_CmsDirectEditProvider
true
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
.
isManual
在接口中 I_CmsDirectEditProvider
mode
- the mode of the current direct edit elementtrue
if this provider (currently) operates in manual modeI_CmsDirectEditProvider.isManual(org.opencms.workplace.editors.directedit.CmsDirectEditMode)
protected java.lang.String getLink(java.lang.String target)
target
- the link target to resolveprotected java.lang.String getNextDirectEditId()
Random edit id's are used because to separate multiple direct edit buttons on one page.
protected void print(javax.servlet.jsp.PageContext context, java.lang.String content) throws javax.servlet.jsp.JspException
Does not print anything if the content is null
.
context
- the JSP page context to print the content tocontent
- the content to printjavax.servlet.jsp.JspException
- in case the content could not be written to the page conext