Package org.apache.agila.services.user

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


                    System.out.println("nudging token id = " + s);
                    engine.nudge(new TokenID(Integer.parseInt(s)));
                }
                else
                    if (line.startsWith("t")){
                        List l =  taskService.getTasksForUser(new UserID(1), Task.TASK_INCOMPLETE);

                        Iterator it = l.iterator();

                        while(it.hasNext()) {
                            Task task = (Task) it.next();
View Full Code Here


        renderTemplate(req, res, ctx, "processlist.vm");
    }

    public void show_task_list(HttpServletRequest req, HttpServletResponse res, VelocityContext ctx) throws ServletException, IOException {

        List l = taskService.getTasksForUser(new UserID(1), Task.TASK_ALL);

        ctx.put("list", l);

        renderTemplate(req, res, ctx, "tasklist.vm");
View Full Code Here

    /**
     * Add or update a task.
     */
    protected void internalSave(Task ti) {

        UserID userID = ti.getUserID();
        List taskList = (List) bucket.get( userID );
        if( taskList == null ) {
            taskList = new ArrayList();
        }

View Full Code Here

    protected UserID internalAddUser(UserInfo newUser) {

        //System.out.println("Adding user " + newUser);

        UserID id = new UserID(++counter);

        newUser.setUserID(id);

        idMap.put(id, newUser);
        principalMap.put(newUser.getUserPrincipal(), newUser);
View Full Code Here

    public boolean doStart(NodeContext ctx) {

        TaskService ts = ctx.getTaskService();

        ts.assignTask(ctx.getNextExecutionToken().getTokenID(), "Approve site visit",
                new UserID(1), new Date());

        return false;
    }
View Full Code Here

            connection.setAutoCommit(false);

            PreparedStatement statement = connection.prepareStatement( sql );
            statement.setInt( 1, taskID );
            UserID userID = task.getUserID();
            if (userID == null) {
                statement.setNull( 2, Types.INTEGER);
            }
            else {
                statement.setInt( 2, userID.getID() );
            }
            GroupID groupID = task.getGroupID();
            if (groupID == null) {
                statement.setNull( 3, Types.INTEGER);
            }
View Full Code Here

            connection = getConnection();

            connection.setAutoCommit(false);

            PreparedStatement statement = connection.prepareStatement( sql );
            UserID userID = task.getUserID();
            if (userID == null) {
                statement.setNull( 1, Types.INTEGER);
            }
            else {
                statement.setInt( 1, userID.getID() );
            }
            GroupID groupID = task.getGroupID();
            if (groupID == null) {
                statement.setNull( 2, Types.INTEGER);
            }
View Full Code Here

            result.next();

            retVal = new TaskImpl();

            retVal.setTaskID( new TaskID( result.getInt( "ID" ) ) );
            retVal.setUserID( new UserID( result.getInt( "userid" ) ) );
            retVal.setTeamID( new GroupID( result.getInt( "groupid" ) ) );
            retVal.setTaskDescription( result.getString( "description" ) );
            retVal.setTaskExpirationDate( result.getDate( "expiration" ) );
            retVal.setSourceTokenID( new TokenID(
                result.getInt( "tokenid" ) ) );
View Full Code Here

            Statement statement = connection.createStatement();
            ResultSet result = statement.executeQuery( sql );
            result.next();

            retVal = getUserInfo( new UserID( result.getInt( "userid" ) ) );

            result.close();
            statement.close();
        } catch( SQLException e ) {
            throw new RuntimeException( e );
View Full Code Here

            retVal.setUserName( result.getString( "name" ) );
            retVal.setUserPrincipal( result.getString( "principal" ) );
            retVal.setUserPassword( result.getString( "password" ) );
            retVal.setAdmin(result.getBoolean("isadmin"));
            retVal.setUserID( new UserID( result.getInt( "userid" ) ) );

            result.close();
            statement.close();
        } catch( SQLException e ) {
            throw new RuntimeException( e );
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.