ResolvableAction Class
A resolvable action implementation. Handles the resolution of a source object performing an action on a target object. Resolvable action logic is attached to and primarily related to the target. Methods on this object should only be called by the {{#crossLink "ResolvableActionInterface"}}{{/crosslink}}
If any of the functions on this object should always return true
or false
it can be set to a Boolean
value that will be used
instead of the value returned by calling the function.
Item Index
Methods
Methods
canResolveAction
-
action
-
source
-
[settings]
Checks if the entity with this ResolvableAction
can currently resolve the action given source and settings.
Instead of a function this.canPerformAction
can be set to a boolean value if the check should always be true or false.
If this functions should always return true
or false
it can be set to a Boolean
value that will be used
instead of the value returned by calling the function.
Parameters:
-
action
String- The action being performed on this target to resolve.
-
source
Object- The source object performing the action on this target.
-
[settings]
Object optional- Settings for the action.
Returns:
resolveAction
-
action
-
source
-
[settings]
Resolves an action on target from source with given settings.
Parameters:
-
action
String- The action being performed on this target to resolve.
-
source
Object- The source object performing the action on this target.
-
[settings]
Object optional- Settings for the action.
Returns:
true
if the action was successfully resolved.