Package com.evasion.module.common.entity

Examples of com.evasion.module.common.entity.AccountDTO


        user = new User();
    }

    public String valid() {
        String result = Constante.FAIL_ACTION;
        AccountDTO account = new AccountDTO();
        try {
            user.validUser();
            person.validPerson();
            account.setPerson(person.getPersonEntity());
            account.setEmail(person.getEmail());
            account.setUsername(user.getUserEntity().getUsername());
            account.setPassword(user.getUserEntity().getPassword());
            accountMan.createAccount(account);
            result = "confirmationAccount.xhtml";

        } catch (EvasionException ex) {
            FacesContext facesContext = FacesContext.getCurrentInstance();
View Full Code Here


        }
    }

    protected void aroundCreateAccount(InvocationContext ctx) {
        if (ctx.getMethod().getName().equals("createAccount")) {
            AccountDTO account = (AccountDTO) ctx.getParameters()[0];
            if (isSendEmailOnCreateAccount()) {
                LOGGER.debug("demande d'envoi de mail :" + account);
                Map<String, Object> properties = new HashMap<String, Object>();
                properties.put("account", account);
                if (account.getEmail() == null) {
                    LOGGER.error("Can not send email confirmation; for user {}", account.getUsername());
                } else {
                    mailEJB.sendEmailWithTemplate(account.getEmail(), Constante.SEND_EMAIL_ACCOUNT_CREATION, properties);
                }
            }
        }
    }
View Full Code Here

    public void setUser(User user) {
        this.user = user;
    }

    public static AccountDTO toDTO(Account account) {
        AccountDTO dto = new AccountDTO();
        dto.setId(account.getId());
        dto.setEmail(account.getUser().getEmail());
        dto.setPassword(account.getUser().getPassword());
        dto.setPerson(account.getPerson());
        dto.setUsername(account.getUser().getUsername());
        dto.setCreationDate(account.getUser().getCreationDate());
        dto.setLastLogin(account.getUser().getLastLogin());
        return dto;
    }
View Full Code Here

        }
    }

    protected void aroundCreateAccount(InvocationContext ctx) {
        if (ctx.getMethod().getName().equals("createAccount")) {
            AccountDTO account = (AccountDTO) ctx.getParameters()[0];
            if (isSendEmailOnCreateAccount()) {
                LOGGER.debug("demande d'envoi de mail :" + account);
                Map<String, Object> properties = new HashMap<String, Object>();
                properties.put("account", account);
                if (account.getEmail() == null) {
                    LOGGER.error("Can not send email confirmation; for user {}", account.getUsername());
                } else {
                    mailEJB.sendEmailWithTemplate(account.getEmail(), Constante.SEND_EMAIL_ACCOUNT_CREATION, properties);
                }
            }
        }
    }
View Full Code Here

    public void setUser(User user) {
        this.user = user;
    }

    public static AccountDTO toDTO(Account account) {
        AccountDTO dto = new AccountDTO();
        dto.setId(account.getId());
        dto.setEmail(account.getUser().getEmail());
        dto.setPassword(account.getUser().getPassword());
        dto.setPerson(account.getPerson());
        dto.setUsername(account.getUser().getUsername());
        dto.setCreationDate(account.getUser().getCreationDate());
        dto.setLastLogin(account.getUser().getLastLogin());
        dto.setEnabled(account.getUser().isEnabled());
        return dto;
    }
View Full Code Here

        username = userEntity.getUsername();
        password = userEntity.getPassword();
    }

    public void validUser() {
        userEntity = new AccountDTO();
        userEntity.setUsername(username);
        userEntity.setPassword(password);

    }
View Full Code Here

TOP

Related Classes of com.evasion.module.common.entity.AccountDTO

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.