001    package videoautomat.contentcreator.stdactions;
002    
003    import sale.Action;
004    import sale.GateChangeTransition;
005    import sale.SaleProcess;
006    import sale.SalesPoint;
007    import sale.UIGate;
008    
009    /**
010     * Standart action to change next to commit gate.
011     *
012     * @author Tobias Ruch
013     */
014    public class CommitAction implements Action {
015    
016       /**
017        * Changes to the commit gate. Called by an action listener, such as an button.
018        * The attribues are setted by the action listener.
019        * @param saleProcess - current {@link sale.SaleProecess}
020        * @param salePoint   - current {@link sale.SalesPoint}
021        */
022       public void doAction(SaleProcess saleProcess, SalesPoint salePoint) throws Throwable {
023          UIGate currentGate = (UIGate)saleProcess.getCurrentGate();
024          currentGate.setNextTransition(GateChangeTransition.CHANGE_TO_COMMIT_GATE);
025    
026       }
027    
028    }