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     * Standard action to change to stop gate.
011     * 
012     * @author Alexander Herrmann
013     *
014     */
015    public class StopAction implements Action {
016        
017        /**
018             * ID for Serialization.
019             */
020            private static final long serialVersionUID = -8719336755565989807L;
021    
022            /**
023         * Changes to the stop gate. Called by an action listener, such as an button.
024         * The attribues are set by the action listener.
025         * @param saleProcess - current {@link sale.SaleProcess}
026         * @param salePoint   - current {@link sale.SalesPoint}
027         */
028        public void doAction(SaleProcess saleProcess, SalesPoint salePoint) throws Throwable {
029            UIGate currentGate = (UIGate)saleProcess.getCurrentGate();
030            currentGate.setNextTransition(GateChangeTransition.CHANGE_TO_STOP_GATE);
031         }
032        
033    }