diff --git a/platform/core/src/actions/ActionAggregator.js b/platform/core/src/actions/ActionAggregator.js index 319fdf684d..9f7edaedc7 100644 --- a/platform/core/src/actions/ActionAggregator.js +++ b/platform/core/src/actions/ActionAggregator.js @@ -5,8 +5,14 @@ define( "use strict"; /** - * An action service factory which aggregates - * multiple other action services. + * The ActionAggregator makes several actionService + * instances act as those they were one. When requesting + * actions for a given context, results from all + * services will be assembled and concatenated. + * + * @constructor + * @param {ActionProvider[]} actionProviders an array + * of action services */ function ActionAggregator(actionProviders) { @@ -21,6 +27,24 @@ define( } return { + /** + * Get a list of actions which are valid in a given + * context. + * + * @param {ActionContext} the context in which + * the action will occur; this is a + * JavaScript object containing key-value + * pairs. Typically, this will contain a + * field "domainObject" which refers to + * the domain object that will be acted + * upon, but may contain arbitrary information + * recognized by specific providers. + * @return {Action[]} an array of actions which + * may be performed in the provided context. + * + * @method + * @memberof ActionAggregator + */ getActions: getActions }; }