Package org.arquillian.example.model

Examples of org.arquillian.example.model.User


  public String register() {
    String username = credentials.getUsername();
    String password = credentials.getPassword();

    User user;

    if (username != null && password != null) {
      user = new User();
      user.setUsername(username);
      user.setPassword(password);
      if (authentizator.register(user)) {
        return "login.xhtml";
      } else {
        return "register.xhtml";
      }
View Full Code Here


          new FacesMessage(FacesMessage.SEVERITY_WARN,
              FAILURE_MESSAGE, FAILURE_MESSAGE));
      return null;
    }
   
    User user = new User();
    user.setPassword(password);
    user.setUsername(username);
   
    if (authentizator.login(user)) {
      currentUser = new User(username);
      FacesContext.getCurrentInstance().addMessage(null,
          new FacesMessage(SUCCESS_MESSAGE));
      return "home.xhtml";
    } else {
      FacesContext.getCurrentInstance().addMessage(null,
View Full Code Here

TOP

Related Classes of org.arquillian.example.model.User

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.