com.evasion.common.controler.User Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of COMMON Show documentation
Show all versions of COMMON Show documentation
API de l'application modulaire evasion-en-ligne
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package com.evasion.common.controler;
import com.evasion.module.common.entity.AccountDTO;
import javax.annotation.ManagedBean;
import javax.faces.bean.RequestScoped;
/**
*
* @author sebastien.glon
*/
@ManagedBean
@RequestScoped
public class User {
private String username;
private String password;
private AccountDTO userEntity;
public AccountDTO getUserEntity() {
return userEntity;
}
public void setUserEntity(AccountDTO user) {
userEntity = user;
username = userEntity.getUsername();
password = userEntity.getPassword();
}
public void validUser() {
userEntity = new AccountDTO();
userEntity.setUsername(username);
userEntity.setPassword(password);
}
/**
* Action de sauvegarde d'un changement de password.
* Mise à jour de type update.
*/
public void changePassword() {
userEntity.setPassword(password);
}
/**
*
* @return
*/
/** public final String saveUser() {
userEntity = ejb.createUser(userEntity);
if (userEntity.getCreationDate() != null) {
return "Succes";
} else {
return "Fail";
}
}
**/
public String getUsername() {
return username;
}
public String getPassword() {
return password;
}
public void setUsername(String username) {
this.username = username;
}
public void setPassword(String password) {
this.password = password;
}
}