Package au.edu.qut.yawl.authentication

Examples of au.edu.qut.yawl.authentication.User


        {
            try {
                Set users = _engineManagement.getUsers();
                Iterator iter = users.iterator();
                while (iter.hasNext()) {
                    User user = (User) iter.next();
                    attemptToCreateWorklist(user.getUserID());
                }
            } catch (Exception e) {
                logError("Failure to load specifications", e);
                System.exit(99);
            }
View Full Code Here


    }


    private void attemptToCreateWorklist(String userName) throws YPersistenceException, YAuthenticationException {
        Set users = _engineManagement.getUsers();
        User user = null;
        boolean userfound = false;
        for (Iterator iterator = users.iterator(); iterator.hasNext();) {
            user = (User) iterator.next();
            if (user.getUserID().equals(userName)) {
                userfound = true;
            }
        }
        if (!userfound) {
            user = UserList.getInstance().addUser(userName, "password", false);
View Full Code Here

                List userElems = doc.getRootElement().getChildren();
                for (int i = 0; i < userElems.size(); i++) {
                    Element element = (Element) userElems.get(i);
                    String id = element.getChildText("id");
                    String isAdmin = element.getChildText("isAdmin");
                    User u = new User(id, null);
                    if (isAdmin.equals("true")) {
                        u.setAdmin(true);
                    }
                    users.add(u);
                }
            } catch (JDOMException e) {
                e.printStackTrace();
View Full Code Here

  boolean founduser = false;
        try {
      List resultlist = new LinkedList();
      resultlist = iaClient.getUsers(sessionHandle);
      for (int i = 0; i < resultlist.size();i++) {
    User user = (User) resultlist.get(i);
    if (user.getUserID().equalsIgnoreCase(resourceID)) {
        founduser = true;
    }
      }
     
      System.out.println("deleting user: " + resourceID);
View Full Code Here

  boolean founduser = false;
        try {
      List resultlist = new LinkedList();
      resultlist = iaClient.getUsers(sessionHandle);
      for (int i = 0; i < resultlist.size();i++) {
    User user = (User) resultlist.get(i);
    if (user.getUserID().equalsIgnoreCase(resourceID)) {
        founduser = true;
    }
      }

            if (founduser) {
View Full Code Here

            return OPEN_FAILURE + e.getMessage() + CLOSE_FAILURE;
        }
        Set users = _userList.getUsers();
        StringBuffer result = new StringBuffer();
        for (Iterator iterator = users.iterator(); iterator.hasNext();) {
            User user = (User) iterator.next();
            result.append(user.toXML());
        }
        return result.toString();
    }
View Full Code Here

            if (result.size() == 0) {
                return new Resource[0];
            }

            for (int i = 0; i < result.size(); i++) {
                User user = (User) result.get(i);
                HumanResource human = new HumanResource(user.getUserID());
                human.setPassword(user.getPassword());
                human.setIsAdministrator(user.getIsAdmin());
                human.setGivenName("");
                human.setSurname("");
                human.setDescription("");
                res[i] = human;
            }
View Full Code Here

                if (result.size() == 0) {
                    return human;
                }

                for (int i = 0; i < result.size(); i++) {
                    User user = (User) result.get(i);
                    if (user.getUserID().equalsIgnoreCase(resourceID)) {
                        human = new HumanResource(resourceID);
                        human.setPassword(user.getPassword());
                        human.setIsAdministrator(user.getIsAdmin());
                    }

                }
                return human;
            }
View Full Code Here

        // check if service is a registered user
        ArrayList users = (ArrayList) _interfaceAClient.getUsers(_sessionHandle);

        Iterator itr = users.iterator();
           while (itr.hasNext()) {
           User u = (User) itr.next() ;
           if ( u.getUserID().equals(user) ) return true ;      // user in list
        }
        return false;                                       // user not in list
    }
View Full Code Here

            objectType = PT_SERVICE_REF;
            YAWLServiceReference obj2 = (YAWLServiceReference) obj;
            key = objectType + "/" + obj2.get_yawlServiceID();
        } else if (obj instanceof User) {
            objectType = PT_USER;
            User obj2 = (User) obj;
            key = obj2.getUserID();
        } else {
            logger.error("Unknown object type [" + obj.getClass().getName() + "]");
            throw new YPersistenceException("Unknown object type [" + obj.getClass().getName() + "]");
        }
View Full Code Here

TOP

Related Classes of au.edu.qut.yawl.authentication.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.