Package com.evasion.plugin.common.entity

Examples of com.evasion.plugin.common.entity.Account


        getEventManager().addEvent(plugin, entityName, entityId, code, this.getPrinciaplUserName());
    }

    @Override
    public AccountDTO createAccount(AccountDTO extAccount) throws EvasionException {
        Account account = new Account();
        account.mergeFromDTO(extAccount);
        personEJB.createPerson(account.getPerson()); // @TODO à transférer dans l'accountManager une fois supprimé le mode EJB.
        getAccountManager().createAccount(account);
        return Account.toDTO(account);
    }
View Full Code Here


        getAccountManager().deleteAccount(u.getId());
    }

    @Override
    public AccountDTO updateAccount(AccountDTO u) {
        Account account = getAccountManager().findAccountById(u.getId());
        account.mergeFromDTO(u);
        return Account.toDTO(getAccountManager().updateAccount(account));
    }
View Full Code Here

        return auth;
    }

    public Account findOrCreateAdminAccount() throws EvasionException {

        Account acc = accountDAO.findAccountByUsername("admin");
        if (acc == null) {
            User admin = userDAO.findById("admin");
            if (admin == null) {
                admin = new User();
                admin.setEnabled(true);
                admin.setUsername("admin");
                admin.setPassword("adminadmin");
                admin.setEmail("admin@localhost");
            }
            Person person = new Individual("", Civilite.monsieur, "admin", "admin", new Date());
            defaultDAO.persist(person);
            acc = new Account(admin, person);
            createAccount(acc);
        }
        return acc;
    }
View Full Code Here

        getEventManager().addEvent(plugin, entityName, entityId, code, this.getPrinciaplUserName());
    }

    @Override
    public AccountDTO createAccount(AccountDTO extAccount) throws EvasionException {
        Account account = new Account();
        account.mergeFromDTO(extAccount);
        personEJB.createPerson(account.getPerson()); // @TODO à transférer dans l'accountManager une fois supprimé le mode EJB.
        getAccountManager().createAccount(account);
        return Account.toDTO(account);
    }
View Full Code Here

        getAccountManager().deleteAccount(u.getId());
    }

    @Override
    public AccountDTO updateAccount(AccountDTO u) {
        Account account = getAccountManager().findAccountById(u.getId());
        account.mergeFromDTO(u);
        return Account.toDTO(getAccountManager().updateAccount(account));
    }
View Full Code Here

        return auth;
    }

    public Account findOrCreateAdminAccount() throws EvasionException {

        Account acc = accountDAO.findAccountByUsername("admin");
        if (acc == null) {
            User admin = userDAO.findById("admin");
            if (admin == null) {
                admin = new User();
                admin.setEnabled(true);
                admin.setUsername("admin");
                admin.setPassword("adminadmin");
                admin.setEmail("admin@localhost");
            }
            Person person = new Individual("", Civilite.monsieur, "admin", "admin", new Date());
            defaultDAO.persist(person);
            acc = new Account(admin, person);
            createAccount(acc);
        }
        return acc;
    }
View Full Code Here

        return auth;
    }

    public Account findOrCreateAdminAccount() throws EvasionException {

        Account acc = accountDAO.findAccountByUsername("admin");
        if (acc == null) {
            User admin = userDAO.findById("admin");
            if (admin == null) {
                admin = new User();
                admin.setEnabled(true);
                admin.setUsername("admin");
                admin.setPassword("adminadmin");
                admin.setEmail("admin@localhost");
            }
            Person person = new Individual("", Civilite.monsieur, "admin", "admin", new Date());
            defaultDAO.persist(person);
            acc = new Account(admin, person);
            createAccount(acc);
        }
        return acc;
    }
View Full Code Here

TOP

Related Classes of com.evasion.plugin.common.entity.Account

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.