com.ibm.mashups.enabler.ac.operation
Interface AllowedOperationsModel
- All Superinterfaces:
- Model
public AllowedOperationsModel
- extends Model
Interface for an allowed operations model. This model allows to check for operations that the user may execute. E.g. it can be used by context menus to determine the operations allowed for the current user. Operations can be registered in the ibmConfig object with "operations" or dynamically via the setOperations method.
Method Summary |
Boolean |
setOperation(String operationName,
Object callback)
Define a new operation and a handler for that operation. |
Methods inherited from interface com.ibm.mashups.enabler.model.Model |
getStrategy |
setOperation
Boolean setOperation(String operationName,
Object callback)
-
Define a new operation and a handler for that operation.
- Parameters:
operationName
-
name of the operationcallback
-
the callback funtion used to verify the operation in the format of Function(String operationName, JSON context, Boolean sync, Function finished)
. Must not be null
Callback Parameters
operationName
- name of the operation to be verified. Never null
.
context
- the JSON context passed to getOperation. Never null
.
sync
- sync indicates if the deferred action is executed synchronously or asynchronously. Nevernull
.
finished
- the function to be called once the operation has been loaded and the system can continue processing. Format is Function finished(Operation
operation).
.
Parameters for Function finished
operation
- the operation object. Must not be null
.
- Returns:
-
true
if the operation was added successfully, otherwise false
Copyright IBM Corp. 2010 All Rights Reserved.