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 rollback gate.
011 * @author Tobias Ruch
012 */
013 public class RollBackAction implements Action {
014
015 /**
016 * Changes to the callback gate. Called by an action listener, such as an button.
017 * The attribues are setted by the action listener.
018 * @param saleProcess - current {@link sale.SaleProecess}
019 * @param salePoint - current {@link sale.SalesPoint}
020 */
021 public void doAction(SaleProcess saleProcess, SalesPoint salePoint) throws Throwable {
022 UIGate currentGate = (UIGate)saleProcess.getCurrentGate();
023 currentGate.setNextTransition(GateChangeTransition.CHANGE_TO_ROLLBACK_GATE);
024
025 }
026
027 }