001 package videoautomat.transition;
002
003 import sale.Gate;
004 import sale.SaleProcess;
005 import sale.Transition;
006 import users.User;
007 import videoautomat.SaleProcessLogOn;
008
009 /**
010 * Transition that redirects to the process' initial gate.
011 * @author Alexander Herrmann
012 *
013 */
014 public class LogOnFailTransition implements Transition {
015
016 /**
017 * Redirects to the initial gate of the current process.
018 * @param sp - {@link sale.SaleProcess} on which to perform Transition
019 * @param user - {@link users.User} with which to perform Transition
020 */
021 public Gate perform(SaleProcess sp, User user) {
022 SaleProcessLogOn processLogOn = (SaleProcessLogOn) sp;
023 return processLogOn.restart();
024 }
025
026 }