Customizing existing task commands
There are two standard ways to modify existing WebSphere Commerce task commands.
- Add new business logic to a task command
Suppose there is an existing WebSphere Commerce task command, called ExistingTaskCmd. Following the WebSphere Commerce naming conventions, this task command would have an interface class named ExistingTaskCmd and an implementation class named ExistingTaskCmdImpl. Now assume that a business requirement arises and add new business logic to this existing command. One portion of the logic must be executed before the existing command logic and another portion must be executed after the existing command logic.- Replacing business logic of an existing task command
To replace the business logic of an existing task command, you must create a new implementation class for the task command. This new implementation class must extend from the existing task command but it should not implement the existing interface. Additionally, in the new implementation class, do not call the performExecute method of the superclass.Related concepts
Task command programming model