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

Compare with Current View Page History

« Previous Version 4 Next »

Goal

  • To define new (more logical?) structure of where commands are implemented and defined.
  • Allow easier use of commands by the App developers.

Further (future) goals:

  • Better documentation (list of commands with description, and for each command a list of parameters).
  • Remove command pooling.
  • Get rid of the Commons Chain library (see Greg's comment).
  • Allow commands to be injected.
  • Allow configuration-by-code for commands.

Current Status

The above class diagram represents the current distribution of the command classes into the (basic) packages. As we want to get rid of the Admin Interface module, we need to move the MessageCommand class and the whole tree of the BaseRepositoryCommand class to the another package(s).

Proposal

The command classes related to the activation (marked green on the above image) will be moved to the Activation module (package i.m.module.activation.commands), the rest will be moved to the Core module, to the i.m.commands.impl package.

The command definition will be kept at its current location (/modules/adminInterface/commands), and will be defined by the Legacy module.

The CommandsManager class will be extended with a method executeCommand(String catalog, String command, Map<String,Object> parameters) , that will allow to run commands without need to handle Context etc.

 

Proposals for future goals (not to be implemented in this sprint):

Getting rid of the Commons Chain library:

New interface Command (a 'copy' of the one from the Commons Chain library) will be defined in the info.magnolia.commands package. (Option: simply remove 'implements Command' from the MgnlCommand class definition.)

This will also require to remove the dependency to org.apache.commons.chain.Context interface from the interface info.magnolia.context.Context, and cross-check for this dependency throughout the code.

...

  • No labels