com.sap.portal.admin.editor
Interface ILockingPolicy

All Known Subinterfaces:
IPessimisticLockPolicy

public interface ILockingPolicy

API for the locking policy of this editor.


Method Summary
 EditorLockingStatus getLock(IEditorContext context, com.sap.security.api.IPrincipal principal, boolean enforce, com.sapportals.common.PPLogger logger)
          Get lock for the current editor, using the concrete Algorythem, considaring the data type and the locking policy The editor framework maintains the locking flow, according to the status That this plugin return.
 

Method Detail

getLock

public EditorLockingStatus getLock(IEditorContext context,
                                   com.sap.security.api.IPrincipal principal,
                                   boolean enforce,
                                   com.sapportals.common.PPLogger logger)
                            throws EditorLockingException,
                                   EditorResourceException
Get lock for the current editor, using the concrete Algorythem, considaring the data type and the locking policy

The editor framework maintains the locking flow, according to the status That this plugin return.

Parameters:
context - The current context of the editor
principal - the security principal that trying to get the lock.
enforce - enforce getting lock- get a new lock, even if the resource is locked.
logger - to log messages.
Returns:
EditorLockingStatus reports the editor framework about the status of the lock
Throws:
EditorLockingException - get lock failed. An error occur while trying to get or refresh the lock. The editor framework presents an end user message that no specific error occur, and the exception will be logged.
EditorResourceException - an error occured regarding the resource that this editor deals with. This exception is a showstopper for the editor- The editor framework will present the given end user message instead of the regular editor UI.
See Also: