kaos.core.service.ontology.request
Interface ActionRequest


public interface ActionRequest

Defines the methods to request an action with the specified properties.


Method Summary
 java.lang.Object requestAction(java.lang.String actionName, java.util.HashMap properties, ActionStatusCallback statusCallback)
          Request an action whose name and properties are specified.
 

Method Detail

requestAction

java.lang.Object requestAction(java.lang.String actionName,
                               java.util.HashMap properties,
                               ActionStatusCallback statusCallback)
                               throws java.lang.Exception
Request an action whose name and properties are specified. Before the action is executed, permissions are checked to see whether the requested action is authorized. If the action is not authorized, an Exception is thrown.

Parameters:
actionName - String indicating the name of the action as it is defined in an ontology supporting the action. Also, a corresponding method (exactly the same as the actionName) has to be implemented in the class, whose instance is executing the action.
properties - HashMap containing action properties and values. The name of properties have to be the same as defined in the action's ontology. Each method implemented should document the available properties, their type and range of values.
statusCallback - ActionStatusCallback to be called to pass back to the action requestor info about progression of action execution and final result.
Returns:
Object containing the result of action execution, or an exception if one occurred during action execution.
Throws:
java.lang.Exception - if the action is not authorized, the Guard is not available, or an exception is thrown during the execution of the action.