Package br.com.visualmidia.business

Examples of br.com.visualmidia.business.User


        Person person = system.getPeople().get(idPerson);
       
        if (person == null)
            person = new Person(idPerson, name);
       
        User user = new User(userName, passWord, null);
        for (String groupName : groupNameList) {
          if(system.getGroups().containsKey(groupName))
            user.addGroup(system.getGroups().get(groupName));
        }
       
        if(person.getPersonType("user") != null){
          person.removePersonType("user");
        }
View Full Code Here


        person.setPersonType("employee", new Employee(system.getEmployeePosition() .get(i), walletWorkNumber, workTimeMap, beginDate, observation, registerDate, dismissedDate, paymentDate, lastCompanyName, lastCompanyAddress, lastCompanyPhone, lastWage, lastJobFunction, lastRegisteredWage, motiveToLeave, ifRegistered, lastJobTime, experiences, knowledgement, finantialInfo, responsableName, responsableRelation, responsableCPF, responsableRG, responsablePhone));

        if (userName.equals("")){
          person.removePersonType("user");
        } else {
          User user;
         
          List<Group> groupsList = new ArrayList<Group>();
          for (String groupName : groupsNames) {
            groupsList.add(system.getGroups().get(groupName));
          }
         
          if(person.getPersonType("user") == null) {
            user = new User(userName, password, groupsList);
          }else{
            user = (User)person.getPersonType("user");
            user.setPassWord(password);
            user.setUserName(userName);
            user.getGroups().clear();
            user.getGroups().addAll(groupsList);
          }
          person.setPersonType("user", user);
        }
       
        if(!system.getPeople().containsKey(id))//caso ja existir na prevalencia, ja foi alterado no c�digo acima
View Full Code Here

    protected void execute(PrevalentSystem system) throws BusinessException {
        Group group = system.getGroups().get(nameGroup);
       
        for (String idUser : this.idUsers) {
             Person person = system.getPeople().get(idUser);
             User user = (User) person.getPersonType("user");
             if(groupAlreadyExistInUser(group, user))//se o usuario ja tiver o grupo, n�o fazer nada
               return;
             user.getGroups().add(group); //caso contrario adicionar
        }
    }
View Full Code Here

                    passwordText.setEnabled((account.getPerson() == null)? (false) : (true));
                    if(account.getPerson() == null){
                        passwordText.setEnabled(false);
                    }else{
                        passwordText.setEnabled(true);
                        User user = (User) account.getPerson().getPersonType("user");
                        personPassword = user.getPassword();
                    }
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
View Full Code Here

TOP

Related Classes of br.com.visualmidia.business.User

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.