com.sap.portal.admin.editor
Interface IEditModeEnabler


public interface IEditModeEnabler

IEditModeEnabler A plugin that defines whether the current event is an edit mode event (i.e. the event require to open the editor for write mode) and responsible to check if the edit mode is allowed.


Method Summary
 boolean enableEditMode(IEditorContext ctx)
          Indicates whether the editor must open in edit mode or read only.
 boolean isEditModeEvent(IEditorContext ctx)
          Indicates whether the current request is an edit mode triggered (=the event requires to switch read only mode to edit mode).
 

Method Detail

enableEditMode

public boolean enableEditMode(IEditorContext ctx)
Indicates whether the editor must open in edit mode or read only.
Parameters:
ctx - the current editor context
Returns:
true if the editor must be opned in edit mode, or false if the editor must be opened in read only mode.

isEditModeEvent

public boolean isEditModeEvent(IEditorContext ctx)
Indicates whether the current request is an edit mode triggered (=the event requires to switch read only mode to edit mode). If the previous state was read only mode and the current request(event) is "edit mode", the editor framework should operate all the needed steps in order to try and switch the editor to edit mode. This includes: {link #enableEditMode} and locking mechanism.
Parameters:
ctx - the current context.
Returns:
true if the current request (event) is edit mode triggered, false if the event is not edit mode event