Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migration of unmigrated content due to installation of a new plugin

...

The pooling capabilities were removed from the MgnlCommand base class, and the CommandsManager has been changed to create new instance for each getCommand() or executeCommand() call.

...

AbstractCommandAction

info.magnolia.ui.modelframework.action.CommandActionBase and AbstractCommandAction and its definition counterpart counterpart info.magnolia.ui.api.action.CommandActionDefinition allows for easy use of commands by the App developers by handling much of the boilerplate code they would otherwise need to write. 

...

In most cases it's just a matter of configuration. You define a marker interface extending CommandActionDefinition and bind CommandActionBase to AbstractCommandAction to it. The CommandActionDefinition needs to define at least the name of the command to execute, optionally it can define a catalog, otherwise it uses the default value, meaning that the command to be executed will be looked up in the registered default catalog of commands. Further parameters can be added in the param subfolder and/or my subclassing CommandActionDefinition as the example below illustrates

CommandActionBaseAbstractCommandAction provides a Map<String, Object> buildParams(final Node node) method which builds a map of parameters which will be passed to the current command for execution. It is called by the constructor.

...