Examples of UserRoles


Examples of org.intalio.tempo.workflow.auth.UserRoles

                     "http://hellonico.net"));
             String someJapanese = "\u201e\u00c5\u00c7\u201e\u00c7\u00e4\u201e\u00c5\u00e5\u201e\u00c5\u00ae\u201e\u00c5\u00dc";
             task1.setInput(someJapanese);
             task1.getUserOwners().add(someJapanese);
             persist(task1);
             UserRoles ur = new UserRoles(someJapanese,
                     new String[] { "examples\\employee" });
             final TaskFetcher taskFetcher = new TaskFetcher(em);
             Task[] t1 = taskFetcher.fetchAvailableTasks(ur, PATask.class, "");
             Assert.assertEquals(1, t1.length);
             checkRemoved(new Task[] { task1 });
View Full Code Here

Examples of org.intalio.tempo.workflow.auth.UserRoles

                    new URI("http://hellonicoUnique2.net"), new URI(
                            "http://hellonico2.net"), "initOperationSOAPAction");
            task2.getUserOwners().add("niko");
            persist(task2);
          
            UserRoles ur = new UserRoles("niko",
                    new String[] { "examples\\employee" });
            final TaskFetcher taskFetcher = new TaskFetcher(em);
            Task[] ts = taskFetcher.fetchAvailableTasks(ur, PIPATask.class, "");
            Assert.assertEquals(2, ts.length);
          
View Full Code Here

Examples of org.intalio.tempo.workflow.auth.UserRoles

                    "http://hellonico.net"));
            task2.setDescription("hello");
            task2.getUserOwners().add("niko");
            persist(task2);
          
            UserRoles ur = new UserRoles("niko",
                    new String[] { "examples\\employee" });
            final TaskFetcher taskFetcher = new TaskFetcher(em);
            Task[] t1 = taskFetcher.fetchAvailableTasks(ur, PATask.class, query);
            Assert.assertEquals(1, t1.length);
          
View Full Code Here

Examples of org.intalio.tempo.workflow.auth.UserRoles

            for (String role : assignedRoles)
                task1.getRoleOwners().add(role);
            task1.getUserOwners().add("niko");
            persist(task1);
          
            UserRoles ur = new UserRoles("niko", assignedRoles);
            final TaskFetcher taskFetcher = new TaskFetcher(em);
            Task[] t1 = taskFetcher.fetchAvailableTasks(ur, PATask.class, "");
          
            Assert.assertEquals(1, t1.length);
            checkRemoved(new Task[] { task1 });
View Full Code Here

Examples of org.intalio.tempo.workflow.auth.UserRoles

            persist(task1);
            persist(task2);
            persist(task3);
          
            final TaskFetcher taskFetcher = new TaskFetcher(em);
            UserRoles ur = new UserRoles("niko",
                    new String[] { "examples\\employee" });
            Task[] t1 = taskFetcher.fetchAvailableTasks(ur, PATask.class, "");
            Task[] t2 = taskFetcher.fetchAvailableTasks(ur, PATask.class,
                    "T._state = TaskState.READY OR T._state = TaskState.CLAIMED");
            UserRoles ur2 = new UserRoles("alex",
                    new String[] { "examples\\employee2" });
            Task[] t3 = taskFetcher.fetchAvailableTasks(ur2, PATask.class,
                    "T._state = TaskState.READY OR T._state = TaskState.CLAIMED");
          
            Assert.assertEquals(3, t1.length);
View Full Code Here

Examples of org.intalio.tempo.workflow.auth.UserRoles

            task1.getRoleOwners().add("examples\\employee");
            task1.getRoleOwners().add("examples\\manager");
            persist(task1);
          
            final TaskFetcher taskFetcher = new TaskFetcher(em);
            UserRoles ur = new UserRoles("niko", new String[] {
                    "examples\\employee", "examples\\manager" });
            Task[] list = taskFetcher.fetchAllAvailableTasks(ur);
            Assert.assertEquals(1, list.length);
           }
View Full Code Here

Examples of org.intalio.tempo.workflow.auth.UserRoles

          
            task1.getUserOwners().add("intalio\\admin");
            persist(task1);
          
            final TaskFetcher taskFetcher = new TaskFetcher(em);
            final UserRoles user = new UserRoles("intalio\\admin", new String[] {
                    "examples\\manager", "examples\\employee" });
            task2 = (PATask) taskFetcher.fetchAllAvailableTasks(user)[0];
            TaskEquality.areTasksEquals(task1, task2);
          
            checkRemoved(task2);
View Full Code Here

Examples of org.intalio.tempo.workflow.auth.UserRoles

            Query q = em.createNamedQuery(Task.FIND_BY_ID).setParameter(1, id);
            PATask task2 = (PATask) (q.getResultList()).get(0);
          
            TaskEquality.areTasksEquals(task1, task2);
          
            final UserRoles credentials = new UserRoles("user1",
                    new String[] { "role1" });
            final UserRoles credentials2 = new UserRoles("user2",
                    new String[] { "role2" });
            final UserRoles credentials3 = new UserRoles("user3",
                    new String[] { "role3" });
          
            Assert.assertTrue(task2.isAvailableTo(credentials));
            Assert.assertTrue(task2.isAvailableTo(credentials2));
            Assert.assertFalse(task2.isAvailableTo(credentials3));
View Full Code Here

Examples of org.intalio.tempo.workflow.auth.UserRoles

        ITaskDAOConnection dao=null;
      try {
        dao=_taskDAOFactory.openConnection();
            OMElementQueue rootQueue = new OMElementQueue(requestElement);
            String participantToken = requireElementValue(rootQueue, "participantToken");
            final UserRoles user = _server.getUserRoles(participantToken);
      Task[] tasks = _server.getTaskList(dao,participantToken);
            OMElement result = marshalTasksList(user, tasks, "getTaskListResponse");
            return result;
        } catch (Exception e) {
          throw makeFault(e);
View Full Code Here

Examples of org.intalio.tempo.workflow.auth.UserRoles

      try {
        dao=_taskDAOFactory.openConnection();
            OMElementQueue rootQueue = new OMElementQueue(requestElement);
            String taskID = requireElementValue(rootQueue, "taskId");
            String participantToken = requireElementValue(rootQueue, "participantToken");
            final UserRoles user = _server.getUserRoles(participantToken);
            Task task = _server.getTask(dao,taskID, participantToken);
            OMElement response = new TMSResponseMarshaller(OM_FACTORY) {
                public OMElement marshalResponse(Task task) {
                    OMElement response = createElement("getTaskResponse");
                    response.addChild(new TaskMarshaller().marshalFullTask(task, user));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.