Package org.intalio.tempo.workflow.auth

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


  }

  private Task[] testFetchForUserRolesWithCriteria(String userId,
      String[] roles, Class taskClass, String subQuery, int size)
      throws Exception {
    Task[] tasks = new TaskFetcher(em).fetchAvailableTasks(new UserRoles(
        userId, roles), taskClass, subQuery);
    Assert.assertEquals(size, tasks.length);
    return tasks;
  }
View Full Code Here


  }

  private Task[] testFetchForUserRolesWithCriteria(String userId,
      String[] roles, Class taskClass, String subQuery, int size,
      boolean optionalMarshalling) throws Exception {
    Task[] tasks = new TaskFetcher(em).fetchAvailableTasks(new UserRoles(
        userId, roles), taskClass, subQuery);
    Assert.assertEquals(size, tasks.length);

    if (optionalMarshalling) {
      TaskMarshaller marshaller = new TaskMarshaller();
View Full Code Here

  }

  private Task[] testFecthForUserRoles(String userId, String[] roles, int size)
      throws Exception {
    Task[] tasks = new TaskFetcher(em)
        .fetchAllAvailableTasks(new UserRoles(userId, roles));
    Assert.assertEquals(size, tasks.length);
    return tasks;
  }
View Full Code Here

  }

     @Test
          public void testNativeQueryForAllPATasks() throws Exception {
         
           UserRoles ur = new UserRoles("niko",
                   new String[] { "examples\\employee" });
           final TaskFetcher taskFetcher = new TaskFetcher(em);
         
           // get your query from here
           Task[] list1 = taskFetcher.fetchAvailableTasks(ur, PATask.class, "");
View Full Code Here

           PATask task1 = new PATask(getUniqueTaskID(), new URI(
                   "http://hellonico.net"));
           task1.setInput("OR true; DELETE * FROM tempo_task;");
           task1.getUserOwners().add("niko");
           persist(task1);
           UserRoles ur = new UserRoles("niko",
                   new String[] { "examples\\employee" });
           final TaskFetcher taskFetcher = new TaskFetcher(em);
           Task[] t1 = taskFetcher.fetchAvailableTasks(ur, PATask.class, "");
         
           Assert.assertEquals(1, t1.length);
View Full Code Here

          Attachment att3 = new Attachment(attMetadata2, new URL(
                  "file:///thisisadocument3.txt"));
          task2.addAttachment(att3);
          persist(task2);
        
          UserRoles ur = new UserRoles("niko",
                  new String[] { "examples\\employee" });
          final TaskFetcher taskFetcher = new TaskFetcher(em);
        
          // test task1 has two attachments
          String query = "(T._id = '" + task1.getID() + "')";
View Full Code Here

                     "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

                    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

                    "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

            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

TOP

Related Classes of org.intalio.tempo.workflow.auth.UserRoles

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.