Examples of HashedMap


Examples of org.apache.commons.collections.map.HashedMap

        client.disconnect();
        server.stop();
    }

    public void testAddRemoveComment() {
        Map  vars = new HashedMap();    
        vars.put( "users", users );
        vars.put( "groups", groups );       
        vars.put( "now", new Date() );
       
        String str = "(with (new Task()) { priority = 55, taskData = (with( new TaskData()) { createdOn = now, activationTime = now}), ";
        str += "deadlines = new Deadlines(),";
        str += "delegation = new Delegation(),";
        str += "peopleAssignments = new PeopleAssignments(),";
View Full Code Here

Examples of org.apache.commons.collections.map.HashedMap

       
        assertEquals( "This is my comment1!!!!!", comments2.get( 0 ).getText() );
    }
   
    public void testAddRemoveAttachment() throws Exception {
        Map  vars = new HashedMap();    
        vars.put( "users", users );
        vars.put( "groups", groups );
        vars.put( "now", new Date() );       
       
        String str = "(with (new Task()) { priority = 55, taskData = (with( new TaskData()) { createdOn = now, activationTime = now}), ";
        str += "deadlines = new Deadlines(),";
        str += "delegation = new Delegation(),";
        str += "peopleAssignments = new PeopleAssignments(),";
View Full Code Here

Examples of org.apache.commons.collections.map.HashedMap

       
        wiser.stop();
    }
   
    public void testDelayedEmailNotificationOnDeadline() throws Exception {
        Map  vars = new HashedMap();    
        vars.put( "users", users );
        vars.put( "groups", groups );
        vars.put( "now", new Date() );
       
        DefaultEscalatedDeadlineHandler notificationHandler = new DefaultEscalatedDeadlineHandler( conf );
        WorkItemManager manager = new DefaultWorkItemManager( null );
        notificationHandler.setManager( manager );
       
View Full Code Here

Examples of org.apache.commons.collections.map.HashedMap

        assertEquals( "tony@domain.com", ((InternetAddress)msg.getRecipients( RecipientType.TO )[0]).getAddress() );
        assertEquals( "darth@domain.com", ((InternetAddress)msg.getRecipients( RecipientType.TO )[1]).getAddress() );       
    }
   
    public void testDelayedReassignmentOnDeadline() throws Exception {
        Map  vars = new HashedMap();    
        vars.put( "users", users );
        vars.put( "groups", groups );
        vars.put( "now", new Date() );
       
        DefaultEscalatedDeadlineHandler notificationHandler = new DefaultEscalatedDeadlineHandler(conf);
        WorkItemManager manager = new DefaultWorkItemManager( null );
        notificationHandler.setManager( manager );
       
View Full Code Here

Examples of org.apache.commons.collections.map.HashedMap

        server.stop();
    }   
   
    @SuppressWarnings("unchecked")
  public void testLifeCycle() throws Exception {     
        Map<String, Object> vars = new HashedMap();    
        vars.put( "users", users );
        vars.put( "groups", groups );       
        vars.put( "now", new Date() );               

        // One potential owner, should go straight to state Reserved
        String str = "(with (new Task()) { priority = 55, taskData = (with( new TaskData()) { workItemId = 1 } ), ";
        str += "peopleAssignments = (with ( new PeopleAssignments() ) { potentialOwners = [users['bobba']], }),";                       
        str += "descriptions = [ new I18NText( 'en-UK', 'This is my description')], ";
View Full Code Here

Examples of org.apache.commons.collections.map.HashedMap

        assertEquals( Status.Completed , task1.getTaskData().getStatus() );        
    }
 
    @SuppressWarnings("unchecked")
  public void testLifeCycleMultipleTasks() throws Exception {     
        Map<String, Object> vars = new HashedMap();    
        vars.put( "users", users );
        vars.put( "groups", groups );       
        vars.put( "now", new Date() );               

        // One potential owner, should go straight to state Reserved
        String str = "(with (new Task()) { priority = 55, taskData = (with( new TaskData()) { workItemId = 1 } ), ";
        str += "peopleAssignments = (with ( new PeopleAssignments() ) { potentialOwners = [users['bobba']], }),";                       
        str += "descriptions = [ new I18NText( 'en-UK', 'This is my description')], ";
View Full Code Here

Examples of org.apache.commons.collections.map.HashedMap

  public static void main(String[] args) {
    EntityManagerFactory emf = Persistence.createEntityManagerFactory("org.drools.task");
        TaskService taskService = new TaskService(emf, SystemEventListenerFactory.getSystemEventListener());
        TaskServiceSession taskSession = taskService.createSession();
        // Add users
        Map vars = new HashedMap();
        Reader reader = new InputStreamReader( BaseTest.class.getResourceAsStream( "LoadUsers.mvel" ) );    
        Map<String, User> users = ( Map<String, User> ) eval( reader, vars );  
        for ( User user : users.values() ) {
            taskSession.addUser( user );
        }          
View Full Code Here

Examples of org.apache.commons.collections.map.HashedMap

public class QueryTest extends BaseTest {

    public void testUnescalatedDeadlines() throws Exception {
        MockEscalatedDeadlineHandler handler = new MockEscalatedDeadlineHandler();
        taskService.setEscalatedDeadlineHandler( handler );      
        Map vars = new HashedMap();
        vars.put( "users",
                  users );
        vars.put( "groups",
                  groups );


        //Reader reader;
        Reader reader = new InputStreamReader( getClass().getResourceAsStream( "QueryData_UnescalatedDeadlines.mvel" ) );
        List<Task> tasks = (List<Task>) eval( reader,
                                              vars );
        for ( Task task : tasks ) {
            taskSession.addTask( task, null );
        }
        long now = ((Date)vars.get( "now" )).getTime();
       
        // should be three, one is marked as escalated
        List<DeadlineSummary> list = taskSession.getUnescalatedDeadlines();
       
        assertEquals( 3,
View Full Code Here

Examples of org.apache.commons.collections.map.HashedMap

                       task2 );
        assertEquals( task1,
                      task2 );
       
        Reader reader = new InputStreamReader( getClass().getResourceAsStream( "FullyPopulatedTask.mvel" ) );
        Map  vars = new HashedMap();
        vars.put( "users", users );
        vars.put( "groups", groups );         
        vars.put( "bytes1", new byte[]{1, 0, 0, 1} );
        Task task3= (Task) eval( reader, vars );              
       
        assertNotSame( task1,
                       task3 );
        assertEquals( task1,
View Full Code Here

Examples of org.apache.commons.collections.map.HashedMap

    taskService = new TaskService(emf, SystemEventListenerFactory.getSystemEventListener());
    taskSession = taskService.createSession();
    MockUserInfo userInfo = new MockUserInfo();
    taskService.setUserinfo(userInfo);
    Map<String, Object> vars = new HashedMap();

    Reader reader = new InputStreamReader(RunTaskService.class.getResourceAsStream("LoadUsers.mvel"));
    Map<String, User> users = (Map<String, User>) eval(reader, vars);
    for (User user : users.values()) {
      taskSession.addUser(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.