Package org.encuestame.persistence.domain.security

Examples of org.encuestame.persistence.domain.security.Account


     * @throws EnMeNoResultsFoundException
     */
    public UnitGroupBean createGroup(final UnitGroupBean groupBean, final String username) throws EnMeNoResultsFoundException {
        //log.info("Create Group");
        final Group groupDomain = new Group();
        final Account secUsers = getUserAccount(username).getAccount();
        groupDomain.setGroupDescriptionInfo(groupBean.getGroupDescription());
        groupDomain.setGroupName(groupBean.getGroupName());
        groupDomain.setIdState(null);
        groupDomain.setAccount(secUsers);
        getGroupDao().saveOrUpdate(groupDomain);
View Full Code Here


     * @throws EnMeExpcetion personalize exception
     * @return if password is not notified  is returned
     */
    public void createUser(final UserAccountBean userBean, final String username) throws EnMeExpcetion {
        final UserAccount userAccount = new UserAccount();
        final Account account = getUserAccount(username).getAccount();
        //validate email and password
        if (userBean.getEmail() != null && userBean.getUsername() != null) {
            userAccount.setUserEmail(userBean.getEmail());
            userAccount.setUsername(userBean.getUsername());
            userAccount.setAccount(account);
View Full Code Here

    /**
     *
     * @return
     */
    private Account createDefaultAccount(){
        final Account account = new Account();
        account.setCreatedAccount(Calendar.getInstance().getTime());
        account.setEnabled(Boolean.TRUE);
        getAccountDao().saveOrUpdate(account);
        return account;
    }
View Full Code Here

    public UserAccountBean createAdministrationUser(
            final AdministratorProfile administratorProfile) {
        log.debug("----------- create administration user ---------");
        final UserAccount userAccount = new UserAccount();
        try{
            final Account account = this.createDefaultAccount();
            // create directory account.
            // this.createDirectoryAccount(account);
            // create first user account.
            userAccount.setUsername(administratorProfile.getUsername());
            // generate password.
View Full Code Here

     */
    public UserAccount singupUser(final SignUpBean singUpBean, boolean disableEmail) throws EnMeNoResultsFoundException {
        //FIXME: Validate the email inside this service.
        log.debug("singupUser "+singUpBean.toString());
        //create account/
        final Account account = this.createDefaultAccount();
        //create directory account.
        createDirectoryAccount(account);
        //create first user account.
        final UserAccount userAccount = new UserAccount();
        userAccount.setUsername(singUpBean.getUsername());
View Full Code Here

        log.debug("Before date ----->" + expireDate.getTime());

        final List<UserAccount> accountWithoutConfirmation = getAccountDao().getUserAccountsbyStatus(status, expireDate.getTime(), currentDate.getTime());
        log.debug("Account without confirmation --->"+ accountWithoutConfirmation.size());
        for (UserAccount userAcc  : accountWithoutConfirmation) {
            final Account ownerAccount = getAccountDao().getUserById(userAcc.getAccount().getUid());
            log.debug("User account id ----> " + userAcc.getUid());
            log.debug("Owner account id ----> " + ownerAccount.getUid());
            if(ownerAccount!=null){
                ownerAccount.setEnabled(Boolean.FALSE);
                getAccountDao().saveOrUpdate(ownerAccount);
           }
        }
   }
View Full Code Here

     * Retrieve the number of user unconfirmed accounts by {@link Account}.
     * @return
     * @throws EnMeNoResultsFoundException
     */
    public Integer retrieveListUserUnconfirmedByAccount() throws EnMeNoResultsFoundException {
        final Account userAccount = this.getUserAccount(this.getUserPrincipalUsername()).getAccount();
        final List<UserAccount> unconfirmedAccounts = this.getAccountDao().retrieveListUserUnconfirmedByAccount(userAccount);
        return unconfirmedAccounts.size();
    }
View Full Code Here

    /**
     * Before.
     */
    @Before
    public void initTest() {
         Account account = createAccount();
        createUserAccount("jota", "jota@jota.com", account);
        createUserAccount("jota1", "jota1@jota.com", account);
        createUserAccount("jota2", "jota2@jota.com", account);
    }
View Full Code Here

        log.debug("new Project username "+username);
        if (projectBean != null) {
            try {
                final Project projectDomain = new Project();
                final UserAccount secondary = getAccountDao().getUserAccountById(projectBean.getLeader());
                final Account user = getUserAccount(username).getAccount();
                projectDomain.setProjectDateFinish(projectBean.getDateFinish());
                projectDomain.setProjectDateStart(projectBean.getDateInit());
                log.debug("new Project Leader "+projectBean.getName());
                projectDomain.setProjectDescription(projectBean.getDescription());
                projectDomain.setProjectName(projectBean.getName());
View Full Code Here

        if(project == null){
            throw new EnMeExpcetion("project not found");
        }
        else{
            final UserAccount secondary = getAccountDao().getUserAccountById(projectBean.getLeader());
            final Account user = getUserAccount(username).getAccount();
            project.setProjectName(projectBean.getName());
            project.setHideProject(projectBean.getHide());
            project.setLead(secondary);
            project.setNotifyMembers(projectBean.getNotify());
            project.setProjectDateFinish(projectBean.getDateFinish());
View Full Code Here

TOP

Related Classes of org.encuestame.persistence.domain.security.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.