SalesPoint Framework v3.1

sale
Interface Action

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

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.

Since:
v2.0
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.

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.
Override:
Always

SalesPoint Framework v3.1