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 sales.salesProcess} to register new users.
010     *
011     * @author Tobias Ruch
012     */
013    public class SaleProcessRegister extends SaleProcess {
014    
015       /**
016        * Constructs the new process
017        *
018        */
019       public SaleProcessRegister() {
020          super("Register Proecess");
021       }
022    
023       /**
024        * Overridden from SalePrecess to initialize and start the process.
025        * This is the only user defined gate. Further gates are only commit and rollback gates.
026        */
027       
028       protected Gate getInitialGate() {
029          
030          FormSheet register = new FormSheet("Register", 
031                                     new RegisterContentCreator("Please type in your data!"), 
032                                     false);
033          return new UIGate(register, null);
034       }
035    
036    }