com.sap.portal.admin.editor

Class GenericEventsHandler

java.lang.Object
  extended by com.sap.portal.admin.editor.GenericEventsHandler
All Implemented Interfaces:
IGenericEventsHandler

public class GenericEventsHandler
extends Object
implements IGenericEventsHandler

The class that contains the default implementation for the generic events handler.
Generic events are triggered when an administrator clicks a button in the generic toolbar at the top of the editor. These events are triggered and captured automatically by the editor framework.
The following lists the generic events that are triggered when the corresponding button is clicked in the generic toolbar at the top of the editor, and describes the default handling of the events:

You can override the default handling of the generic events by creating an event handler that either: To include a custom event handler, specify the event handler class in the com.sap.portal.admin.editorframework.eventsHandler property of the component-config element for the editor component in the portalapp.xml file.


Constructor Summary
GenericEventsHandler()
           
 
Method Summary
 void handleCloseEvent(IEditorContext context, ILockingPolicy lockingPolicy, PPLogger logger)
          Handles a close event.
 void handleEditModeEvent(IEditorContext context, PPLogger logger)
          Handles an edit mode event.
 void handlePreviewEvent(IEditorContext context, PPLogger logger)
          Handles a preview event.
 void handleRefreshEvent(IEditorContext context, PPLogger logger)
          Handles a refresh event.
 void handleSaveEvent(IEditorContext context, IDataHandler dataHandler, ILockingPolicy lockingPolicy, PPLogger logger)
          Handles a save event.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenericEventsHandler

public GenericEventsHandler()
Method Detail

handleCloseEvent

public void handleCloseEvent(IEditorContext context,
                             ILockingPolicy lockingPolicy,
                             PPLogger logger)
Description copied from interface: IGenericEventsHandler
Handles a close event. The editor framework attempts to release the lock after this method runs successfully.

Specified by:
handleCloseEvent in interface IGenericEventsHandler
Parameters:
context - the current editor context
lockingPolicy - the locking policy to use to release the lock
logger - a logger for logging messages

handleEditModeEvent

public void handleEditModeEvent(IEditorContext context,
                                PPLogger logger)
Description copied from interface: IGenericEventsHandler
Handles an edit mode event.

Specified by:
handleEditModeEvent in interface IGenericEventsHandler
Parameters:
context - the current editor context
logger - a logger for logging messages

handlePreviewEvent

public void handlePreviewEvent(IEditorContext context,
                               PPLogger logger)
Description copied from interface: IGenericEventsHandler
Handles a preview event.

Specified by:
handlePreviewEvent in interface IGenericEventsHandler
Parameters:
context - the current editor context
logger - a logger for logging messages

handleRefreshEvent

public void handleRefreshEvent(IEditorContext context,
                               PPLogger logger)
Description copied from interface: IGenericEventsHandler
Handles a refresh event.

Specified by:
handleRefreshEvent in interface IGenericEventsHandler
Parameters:
context - the current editor context
logger - a logger for logging messages

handleSaveEvent

public void handleSaveEvent(IEditorContext context,
                            IDataHandler dataHandler,
                            ILockingPolicy lockingPolicy,
                            PPLogger logger)
Description copied from interface: IGenericEventsHandler
Handles a save event. The editor framework attempts to save data after this method runs successfully.

Specified by:
handleSaveEvent in interface IGenericEventsHandler
Parameters:
context - the current editor context
dataHandler - the handler of the data
lockingPolicy - the locking policy to use for the save operation
logger - a logger for logging messages
Access Rights

This class can be accessed from:


SC DC Public Part ACH
[sap.com] EP-RUNTIME [sap.com] tc/ep/admin/api api EP-PIN


Copyright 2011 SAP AG Complete Copyright Notice