org.opencms.workplace.editors.directedit
Class CmsDirectEditDefaultProvider

java.lang.Object
  extended byorg.opencms.workplace.editors.directedit.A_CmsDirectEditProvider
      extended byorg.opencms.workplace.editors.directedit.CmsDirectEditDefaultProvider
All Implemented Interfaces:
java.lang.Cloneable, I_CmsConfigurationParameterHandler, I_CmsDirectEditProvider
Direct Known Subclasses:
CmsDirectEditJQueryProvider, CmsDirectEditTextButtonProvider

public class CmsDirectEditDefaultProvider
extends A_CmsDirectEditProvider
implements I_CmsDirectEditProvider

Provider for the OpenCms default graphical "direct edit" buttons.

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.

Since:
6.2.3
Version:
$Revision: 1.6 $
Author:
Alexander Kandzior

Field Summary
protected  int m_lastPermissionMode
          Indicates the permissions for the last element the was opened.
 
Fields inherited from class org.opencms.workplace.editors.directedit.A_CmsDirectEditProvider
INCLUDE_FILE_DEFAULT, m_cms, m_configurationParameters, m_editButtonStyle, m_fileName, m_messages, m_mode, m_rnd
 
Fields inherited from interface org.opencms.workplace.editors.directedit.I_CmsDirectEditProvider
ATTRIBUTE_DIRECT_EDIT_PROVIDER, ATTRIBUTE_DIRECT_EDIT_PROVIDER_PARAMS
 
Fields inherited from interface org.opencms.configuration.I_CmsConfigurationParameterHandler
ADD_PARAMETER_METHOD, INIT_CONFIGURATION_METHOD
 
Constructor Summary
CmsDirectEditDefaultProvider()
           
 
Method Summary
 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.
 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.
 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.
 
Methods inherited from class org.opencms.workplace.editors.directedit.A_CmsDirectEditProvider
addConfigurationParameter, getConfiguration, getLink, getNextDirectEditId, getResourceInfo, initConfiguration, print
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.opencms.configuration.I_CmsConfigurationParameterHandler
addConfigurationParameter, getConfiguration, initConfiguration
 

Field Detail

m_lastPermissionMode

protected int m_lastPermissionMode
Indicates the permissions for the last element the was opened.

Constructor Detail

CmsDirectEditDefaultProvider

public CmsDirectEditDefaultProvider()
Method Detail

endDirectEditDisabled

public java.lang.String endDirectEditDisabled()
Returns the end HTML for a disabled direct edit button.

Returns:
the end HTML for a disabled direct edit button

endDirectEditEnabled

public java.lang.String endDirectEditEnabled()
Returns the end HTML for an enabled direct edit button.

Returns:
the end HTML for an enabled direct edit button

getDirectEditIncludes

public java.lang.String getDirectEditIncludes(CmsDirectEditParams params)
Returns the direct edit include HTML to insert in the page beginning.

t

Parameters:
params - the parameters for the direct edit includes
Returns:
the direct edit include HTML to insert in the page beginning

init

public void init(CmsObject cms,
                 CmsDirectEditMode mode,
                 java.lang.String fileName)
Description copied from interface: I_CmsDirectEditProvider
Initialize method for a new instance of the direct edit provider.

Specified by:
init in interface I_CmsDirectEditProvider
Overrides:
init in class A_CmsDirectEditProvider
See Also:
A_CmsDirectEditProvider.init(org.opencms.file.CmsObject, org.opencms.workplace.editors.directedit.CmsDirectEditMode, java.lang.String)

insertDirectEditEnd

public void insertDirectEditEnd(javax.servlet.jsp.PageContext context)
                         throws javax.servlet.jsp.JspException
Description copied from interface: I_CmsDirectEditProvider
Inserts the "end direct edit" HTML in the provided JSP page context.

Specified by:
insertDirectEditEnd in interface I_CmsDirectEditProvider
Parameters:
context - the JSP page context to insert the HTML to
Throws:
javax.servlet.jsp.JspException - in case something goes wrong
See Also:
I_CmsDirectEditProvider.insertDirectEditEnd(javax.servlet.jsp.PageContext)

insertDirectEditIncludes

public void insertDirectEditIncludes(javax.servlet.jsp.PageContext context,
                                     CmsDirectEditParams params)
                              throws javax.servlet.jsp.JspException
Description copied from interface: I_CmsDirectEditProvider
Inserts the "direct edit header" HTML in the provided JSP page context.

Specified by:
insertDirectEditIncludes in interface I_CmsDirectEditProvider
Parameters:
context - the JSP page context to insert the HTML to
params - the parameters for the direct edit includes
Throws:
javax.servlet.jsp.JspException - in case something goes wrong
See Also:
I_CmsDirectEditProvider.insertDirectEditIncludes(javax.servlet.jsp.PageContext, org.opencms.workplace.editors.directedit.CmsDirectEditParams)

insertDirectEditStart

public boolean insertDirectEditStart(javax.servlet.jsp.PageContext context,
                                     CmsDirectEditParams params)
                              throws javax.servlet.jsp.JspException
Description copied from interface: I_CmsDirectEditProvider
Inserts the "start direct edit" HTML in the provided JSP page context.

Specified by:
insertDirectEditStart in interface I_CmsDirectEditProvider
Parameters:
context - the JSP page context to insert the HTML to
params - 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
See Also:
I_CmsDirectEditProvider.insertDirectEditStart(javax.servlet.jsp.PageContext, org.opencms.workplace.editors.directedit.CmsDirectEditParams)

isManual

public boolean isManual(CmsDirectEditMode mode)
Returns false because the default provider does not support manual button placement.

Specified by:
isManual in interface I_CmsDirectEditProvider
Overrides:
isManual in class A_CmsDirectEditProvider
See Also:
I_CmsDirectEditProvider.isManual(org.opencms.workplace.editors.directedit.CmsDirectEditMode)

newInstance

public I_CmsDirectEditProvider newInstance()
Description copied from interface: I_CmsDirectEditProvider
Creates a new instance of this direct edit provider with the same basic configuration.

Specified by:
newInstance in interface I_CmsDirectEditProvider
Returns:
a new instance of this direct edit provider with the same basic configuration
See Also:
I_CmsDirectEditProvider.newInstance()

startDirectEditDisabled

public java.lang.String startDirectEditDisabled(CmsDirectEditParams params,
                                                CmsDirectEditResourceInfo resourceInfo)
Returns the start HTML for a disabled direct edit button.

Parameters:
params - the direct edit parameters
resourceInfo - contains information about the resource to edit
Returns:
the start HTML for a disabled direct edit button

startDirectEditEnabled

public java.lang.String startDirectEditEnabled(CmsDirectEditParams params,
                                               CmsDirectEditResourceInfo resourceInfo)
Returns the start HTML for an enabled direct edit button.

Parameters:
params - the direct edit parameters
resourceInfo - contains information about the resource to edit
Returns:
the start HTML for an enabled direct edit button