// Path: src/main/java/org/vaadin/spring/sample/security/account/Account.java
// public class Account {
// 
// 	@NotEmpty(message="Username is required")
// 	private String username;
// 
// 	@Size(min = 6, message = "Password must be at least 6 characters")
// 	private String password;
// 
// 	@NotEmpty(message="First name is required")
// 	private String firstName;
// 
// 	@NotEmpty(message="Last name is required")
// 	private String lastName;
// 	
// 	private String role;
// 
// 	public Account(String username, String password, String firstName, String lastName, String role) {
// 		this.username = username;
// 		this.password = password;
// 		this.firstName = firstName;
// 		this.lastName = lastName;
// 		this.role = role;
// 	}
// 
// 	public String getUsername() {
// 		return username;
// 	}
// 
// 	public String getPassword() {
// 		return password;
// 	}
// 
// 	public String getFirstName() {
// 		return firstName;
// 	}
// 
// 	public String getLastName() {
// 		return lastName;
// 	}
// 	
// 	public String getRole() {
// 		return role;
// 	}
// 
// 	public void setUsername(String username) {
// 		this.username = username;
// 	}
// 
// 	public void setPassword(String password) {
// 		this.password = password;
// 	}
// 
// 	public void setFirstName(String firstName) {
// 		this.firstName = firstName;
// 	}
// 
// 	public void setLastName(String lastName) {
// 		this.lastName = lastName;
// 	}
// 
// 	public void setRole(String role) {
// 		this.role = role;
// 	}
// 	
// 	
// }
// 
// Path: src/main/java/org/vaadin/spring/sample/security/ui/UserSignedInEvent.java
// public class UserSignedInEvent implements Serializable {
// 	
// 	private static final long serialVersionUID = -8843033010472505451L;
// 
// 	public UserSignedInEvent() {
// 		
// 	}
// 
// }
// 
// Path: src/main/java/org/vaadin/spring/sample/security/ui/ViewToken.java
// public interface ViewToken extends Serializable {
// 	
// 	public static final String HOME="";
// 	public static final String USER="/user";	
// 	public static final String ADMIN="/admin";
// 	public static final String ADMIN_HIDDEN="/hidden";
// 	public static final String SIGNIN="/signin";
// 	public static final String SIGNUP="/signup";
// 	
// 	public static final List<String> VALID_TOKENS = Arrays.asList(new String[] {HOME, USER, ADMIN, ADMIN_HIDDEN, SIGNIN, SIGNUP});		
// 
// }


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.AuthenticationException;
import org.vaadin.spring.UIScope;
import org.vaadin.spring.events.EventBus;
import org.vaadin.spring.events.EventScope;
import org.vaadin.spring.mvp.MvpHasPresenterHandlers;
import org.vaadin.spring.mvp.MvpView;
import org.vaadin.spring.mvp.presenter.AbstractMvpPresenterView;
import org.vaadin.spring.navigator.VaadinView;
import org.vaadin.spring.sample.security.account.Account;
import org.vaadin.spring.sample.security.account.AccountRepository;
import org.vaadin.spring.sample.security.account.UsernameAlreadyInUseException;
import org.vaadin.spring.sample.security.ui.UserSignedInEvent;
import org.vaadin.spring.sample.security.ui.ViewToken;
import org.vaadin.spring.security.Security;
import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent;
import com.vaadin.ui.UI;
package org.vaadin.spring.sample.security.ui.signup;



@SuppressWarnings("serial")
@UIScope
// Path: src/main/java/org/vaadin/spring/sample/security/account/Account.java
// public class Account {
// 
// 	@NotEmpty(message="Username is required")
// 	private String username;
// 
// 	@Size(min = 6, message = "Password must be at least 6 characters")
// 	private String password;
// 
// 	@NotEmpty(message="First name is required")
// 	private String firstName;
// 
// 	@NotEmpty(message="Last name is required")
// 	private String lastName;
// 	
// 	private String role;
// 
// 	public Account(String username, String password, String firstName, String lastName, String role) {
// 		this.username = username;
// 		this.password = password;
// 		this.firstName = firstName;
// 		this.lastName = lastName;
// 		this.role = role;
// 	}
// 
// 	public String getUsername() {
// 		return username;
// 	}
// 
// 	public String getPassword() {
// 		return password;
// 	}
// 
// 	public String getFirstName() {
// 		return firstName;
// 	}
// 
// 	public String getLastName() {
// 		return lastName;
// 	}
// 	
// 	public String getRole() {
// 		return role;
// 	}
// 
// 	public void setUsername(String username) {
// 		this.username = username;
// 	}
// 
// 	public void setPassword(String password) {
// 		this.password = password;
// 	}
// 
// 	public void setFirstName(String firstName) {
// 		this.firstName = firstName;
// 	}
// 
// 	public void setLastName(String lastName) {
// 		this.lastName = lastName;
// 	}
// 
// 	public void setRole(String role) {
// 		this.role = role;
// 	}
// 	
// 	
// }
// 
// Path: src/main/java/org/vaadin/spring/sample/security/ui/UserSignedInEvent.java
// public class UserSignedInEvent implements Serializable {
// 	
// 	private static final long serialVersionUID = -8843033010472505451L;
// 
// 	public UserSignedInEvent() {
// 		
// 	}
// 
// }
// 
// Path: src/main/java/org/vaadin/spring/sample/security/ui/ViewToken.java
// public interface ViewToken extends Serializable {
// 	
// 	public static final String HOME="";
// 	public static final String USER="/user";	
// 	public static final String ADMIN="/admin";
// 	public static final String ADMIN_HIDDEN="/hidden";
// 	public static final String SIGNIN="/signin";
// 	public static final String SIGNUP="/signup";
// 	
// 	public static final List<String> VALID_TOKENS = Arrays.asList(new String[] {HOME, USER, ADMIN, ADMIN_HIDDEN, SIGNIN, SIGNUP});		
// 
// }


// Path: src/main/java/org/vaadin/spring/sample/security/ui/signup/SignUpPresenter.java
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.core.AuthenticationException;
import org.vaadin.spring.UIScope;
import org.vaadin.spring.events.EventBus;
import org.vaadin.spring.events.EventScope;
import org.vaadin.spring.mvp.MvpHasPresenterHandlers;
import org.vaadin.spring.mvp.MvpView;
import org.vaadin.spring.mvp.presenter.AbstractMvpPresenterView;
import org.vaadin.spring.navigator.VaadinView;
import org.vaadin.spring.sample.security.account.Account;
import org.vaadin.spring.sample.security.account.AccountRepository;
import org.vaadin.spring.sample.security.account.UsernameAlreadyInUseException;
import org.vaadin.spring.sample.security.ui.UserSignedInEvent;
import org.vaadin.spring.sample.security.ui.ViewToken;
import org.vaadin.spring.security.Security;
import com.vaadin.navigator.ViewChangeListener.ViewChangeEvent;
import com.vaadin.ui.UI;

package org.vaadin.spring.sample.security.ui.signup;



@SuppressWarnings("serial")
@UIScope
@VaadinView(name=ViewToken.SIGNUP)