Page tree
Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Goal

The goal is to allow actions to act over more than one item, e.g. deleting multiple items at once etc. 

The restriction is to make it possible with minimal intervention to the current API.

Jira issue:  MGNLUI-1515 - Getting issue details... STATUS

Considerations

  • most of the actions will remain single-item restricted;
  • multi-item actions are to be used (mostly) in the workbench;
  • neither Action nor ActionDefinition interfaces specify anything about the items passed to the action - it's all done in the action's constructor;
  • the ActionExecutor interface already expects multiple items in the isAvailable(String actionName, Item... items) method, and virtually also in the execute(String actionName, Object... args) method;

Proposal

The action availability described in the Concept - Action availability and access control will be extended with an availability.multiple property, set by default to false.

The AbstractActionExecutor.isAvailable() method will be changed to take the availability.multiple property into account in the availability evaluation (ATM it just returns false if the items.length is bigger than 1).

The BrowserPresenter.executeAction() method will be changed to pass the whole item list to the actionExecutor in such case, instead of just the first selected item. (There is already a TODO note with the above issue ID.)

It is up to the action's developer to handle the possible problems and inform the user about the result, as well as to decide whether the action should be executed transactionally or not.

As an example (and a best-practices model), the DeleteItemAction will be made multi-item supporting.

 

 

 

 

  • No labels