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 * ID for Serialization. 018 */ 019 private static final long serialVersionUID = -8898487693729860732L; 020 021 /** 022 * Redirects to the initial gate of the current process. 023 * @param sp - {@link sale.SaleProcess} on which to perform Transition 024 * @param user - {@link users.User} with which to perform Transition 025 */ 026 public Gate perform(SaleProcess sp, User user) { 027 SaleProcessLogOn processLogOn = (SaleProcessLogOn) sp; 028 return processLogOn.restart(); 029 } 030 031 }