All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.evasion.common.controler.User Maven / Gradle / Ivy

There is a newer version: 2.0.0.2
Show newest version
/*
 * 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; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy