Package org.apache.agila.services.user

Examples of org.apache.agila.services.user.UserID


            Thread.sleep( 1000 );
        } catch( InterruptedException e ) {
            fail( e.getMessage() );
        }

        List tasks = taskService.getTasksForUser( new UserID( 1 ), Task.TASK_INCOMPLETE );
        assertNotNull( tasks );
        assertEquals( 1, tasks.size() );
    }
View Full Code Here


            Thread.sleep( 1000 );
        } catch( InterruptedException e ) {
            fail( e.getMessage() );
        }

        List tasks = taskService.getTasksForUser( new UserID( 1 ), Task.TASK_INCOMPLETE );
        Task task = (Task)tasks.get( 0 );

        ResponseHandler handler = taskService.getResponseHandlerForTask( task.getTaskID(), null );
        assertNotNull( handler );
View Full Code Here

            Thread.sleep( 1000 );
        } catch( InterruptedException e ) {
            fail( e.getMessage() );
        }

        List tasks = taskService.getTasksForUser( new UserID( 1 ), Task.TASK_INCOMPLETE );
        Task task = (Task)tasks.get( 0 );

        ResponseHandler handler = taskService.getResponseHandlerForTask( task.getTaskID(), null );
        assertNotNull( handler );
View Full Code Here

            Thread.sleep( 1000 );
        } catch( InterruptedException e ) {
            fail( e.getMessage() );
        }

        List tasks = taskService.getTasksForUser( new UserID( 1 ), Task.TASK_INCOMPLETE );
        Task task = (Task)tasks.get( 0 );

        ResponseHandler handler = taskService.getResponseHandlerForTask( task.getTaskID(), null );
        assertNotNull( handler );

        HttpServletRequestImpl request = new HttpServletRequestImpl();
        HttpServletResponseImpl response = new HttpServletResponseImpl();

        // Supply the parameters
        request.addParameter( "numdays", "40" );
        request.addParameter( "reason", "Expedition to Mount Everest" );

        ResponseHandlerResponse rhr = ((HTTPResponseHandler)handler).processAction( request, response );
        assertNotNull( rhr );
        assertTrue( rhr.isAbleToContinue() );

        // The task has been submitted so let's transition to the next node
        EngineMessage engineMessage = new EngineMessageImpl();
        engineMessage.setMessageType( EngineMessage.TYPE_MOVE_TOKEN );
        engineMessage.setCurrentTokenID( rhr.getTokenID() );
        engineMessage.addAppData( rhr.getActivityDataName(), rhr.getActivityData() );

        queueService.enqueue( engineMessage );

        taskService.setTaskStatus( task.getTaskID(), Task.TASK_COMPLETE );

        try {
            Thread.sleep(1000);
        }
        catch( InterruptedException e) {
            fail( e.getMessage() );
        }

        // Instance variables should now reflect the new assigned values
        tasks = taskService.getTasksForUser( new UserID( 1 ), Task.TASK_INCOMPLETE );
        task = (Task)tasks.get( 0 );
        Token token = tokenService.getTokenByID( task.getSourceTokenID() );

        Instance instance = instanceService.getInstanceByID( token.getInstanceID() );
View Full Code Here

        userService = new UserServiceImpl();

        //for temporary user to test user preference
        UserInfo user = new UserInfo("user", "user","user", false);
        user.setUserID(new UserID( 1 ));
        userService.addUser(user);

        taskService.setTokenService(tokenService);
        taskService.setInstanceService( instanceService );
        taskService.setBusinessProcessService( businessProcessService );
View Full Code Here

        this.userService = new UserServiceImpl();

        //for temporary user to test user preference
        UserInfo user = new UserInfo("user", "user", "user",false);
        user.setUserID(new UserID( 1 ));
        this.userService.addUser(user);


        taskService.setTokenService(tokenService);
        taskService.setInstanceService(eiSvc);
View Full Code Here

            IOException {

        List notificationList = null;

        try {
            notificationList = notifyService.getNotificationsForUser( new UserID( 1 ) );
        } catch( Exception e ) {
            // Do nothing. notification list is empty
        }

        request.setAttribute( "list", notificationList );
View Full Code Here

    }

    public void show_user_preference( HttpServletRequest request, HttpServletResponse response ) throws ServletException,
    IOException {

        UserInfo user = userService.getUserInfo(new UserID (1));
        request.setAttribute( "email", user.getProperty("EMAIL_ADDRESS"));
        request.setAttribute( "graphManager", graphManager );
        request.setAttribute( "pageToDisplay", "/WEB-INF/view/userpreference.jsp" );
        doRender( request, response );
    }
View Full Code Here

    }

    public void save_user_preference( HttpServletRequest request, HttpServletResponse response ) throws ServletException,
    IOException {

        UserInfo user = userService.getUserInfo(new UserID (1));

        user.setProperty("EMAIL_ADDRESS",request.getParameter("txtEmail")) ;
        userService.saveUser(user);

        show_user_preference( request, response );
View Full Code Here

    public void show_task_list( HttpServletRequest request, HttpServletResponse response ) throws ServletException, IOException {

        List taskList = null;

        try {
            taskList = taskService.getTasksForUser( new UserID( 1 ), Task.TASK_INCOMPLETE );
        } catch( NullPointerException e ) {
            // Do nothing. task list is empty
        }

        request.setAttribute( "list", taskList );
View Full Code Here

TOP

Related Classes of org.apache.agila.services.user.UserID

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.