001    package videoautomat;
002    import sale.FormSheet;
003    import sale.Gate;
004    import sale.SaleProcess;
005    import sale.UIGate;
006    import videoautomat.contentcreator.RegisterContentCreator;
007    
008    /**
009     * A {@link SaleProcess} to register new users.
010     *
011     * @author Tobias Ruch
012     */
013    public class SaleProcessRegister extends SaleProcess {
014    
015       /**
016             * ID for Serialization.
017             */
018            private static final long serialVersionUID = -609214820437461076L;
019    
020    /**
021        * Constructs the new process
022        *
023        */
024       public SaleProcessRegister() {
025          super("Register Process");
026       }
027    
028       /**
029        * Overridden from SalePrecess to initialize and start the process.
030        * This is the only user defined gate. Further gates are only commit and rollback gates.
031        */
032       
033       protected Gate getInitialGate() {
034          
035          FormSheet register = new FormSheet("Register", 
036                                     new RegisterContentCreator("Please type in your data!"), 
037                                     false);
038          return new UIGate(register, null);
039       }
040    
041    }