SalesPoint Framework v3.0

sale
Interface Action

All Known Implementing Classes:
ActionActionListener, MultiWindow.MultiWindowAction, ActionCapability

public interface Action
extends Serializable

An action that can be associated with a MenuSheetItem or FormSheet button.

Actions are triggered when there associated control is clicked. They can run in the context of a Shop, possibly a SalesPoint, and also maybe a SaleProcess.

Hooks:
Define an Action
Since:
v2.0
Version:
2.0 21/05/1999
Author:
Steffen Zschaler

Method Summary
 void doAction(SaleProcess p, SalesPoint sp)
          Perform the actual action.
 

Method Detail

doAction

public void doAction(SaleProcess p,
                     SalesPoint sp)
              throws Throwable
Perform the actual action.

The parameters define the context in which the action is performed:

  1. It will always be performed in the context of the Shop. The Shop can be retrieved via Shop.getTheShop().
  2. If sp != null, sp will define the SalesPoint that is the context of this action.
  3. If p != null, p will define the SaleProcess that is the context of this action.

Note, that virtually any combination of the parameters makes sense.

Override:
Always.
Parameters:
p - the SaleProcess context of the action.
sp - the SalesPoint context of the action.
Throws:
Throwable - on any error that shall be reported and lead to cancellation of the action.
Hooks:
Define an Action

SalesPoint Framework v3.0