Base
pentaho.action Base
The action.Base
class represents a certain model of actions.
Synchronous or Asynchronous
An action can be synchronous or asynchronous, as determined by the type property, pentaho.action.Base.isSync
. The execution of a synchronous action is completed synchronously, while that of an asynchronous action only completes asynchronously.
Execution
Actions are executed at and by target objects, which implement the interface ITarget
, by being passed as the argument to the ITarget#act
method.
Targets control the exact implementation of the execution of an action, which is returned from the act
method, in the form of an Execution
. However, it is the action that imposes whether execution is synchronous or not, and the phases by which execution goes through, which are, for all action types:
- "init" - the execution is being initialized and a chance is given to mutate the action and change what will be done;
- "will" - action is now frozen and the action can be canceled based on what will be done;
- "do" - the action is executed;
- "finally" - the action execution has finished successfully or not.
For more information, see Execution
.
AMD Module
require(["pentaho/action/Base"], function(Base) { /* code goes here */ });
Extends
Constructor
Name | Description |
---|---|
new Base() Abstract |
Members
Name | Description |
---|---|
id : string Static Abstract | Gets the identifier of the action type module. |
isSync : boolean Static | Indicates if the action is synchronous. |
eventName : string | Gets the event name of the action. |
Methods
Name | Description |
---|---|
clone() : pentaho.action.Base | Creates a shallow clone of this action. |
validate() : Array.<pentaho.lang.UserError> | Determines if the given action is valid. |
Constructor Details
new Base() Abstract |
---|
Members Details
id: string Static Abstract |
---|
Gets the identifier of the action type module. |
isSync: boolean Static |
---|
Indicates if the action is synchronous. Source: javascript/web/pentaho/action/Base.js, line 115 Default Value: true |
eventName: string |
---|
Gets the event name of the action. The default implementation returns the value of |
Methods Details
clone() : pentaho.action.Base | ||||
---|---|---|---|---|
Creates a shallow clone of this action. Source: javascript/web/pentaho/action/Base.js, line 103
|
validate() : Array.<pentaho.lang.UserError> | ||||
---|---|---|---|---|
Determines if the given action is valid. The default implementation does nothing and considers the instance valid. Override to implement an action's specific validation logic. Source: javascript/web/pentaho/action/Base.js, line 94
|