Package org.apache.agila.services.user

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


        assertNotNull( "Tasks should not be null", tasks );
        assertTrue( tasks.size() > 0 );
    }

    public void testGetTasksForTeams() {
        GroupID groupID = new GroupID( 1 );
        TaskImpl task = new TaskImpl();

        task.setTeamID( groupID );
        task.setTaskDescription( "Task Description" );
        task.setTaskExpirationDate( new Date() );
        task.setSourceTokenID( new TokenID( 1 ) );
        task.setTaskStatus( Task.TASK_INCOMPLETE );
        task.setInstanceID( new InstanceID( 1 ) );

        dao.insertTask( task );

        List tasks = dao.getTasksForGroups(new GroupID[] { groupID, new GroupID( 2 )}, Task.TASK_INCOMPLETE );
        assertNotNull( "Tasks should not be null", tasks );
        assertTrue("No tasks found for team!", tasks.size() > 0);
    }
View Full Code Here


        assertNotNull( "Tasks should not be null", tasks );
        assertTrue("No tasks found for team!", tasks.size() > 0);
    }

    public void testLockAndThenUnlockTask() {
        GroupID groupID = new GroupID( 1 );

        TaskImpl task = new TaskImpl();

        task.setTeamID( groupID );
        task.setTaskDescription( "Task Description" );
View Full Code Here

        assertNotNull( "Tasks should not be null", tasks );
        assertTrue( tasks.size() > 0 );
    }

    public void testGetTasksForTeams() {
        GroupID groupID = new GroupID( 1 );
        TaskImpl task = new TaskImpl();

        task.setTeamID( groupID );
        task.setTaskDescription( "Task Description" );
        task.setTaskExpirationDate( new Date() );
        task.setSourceTokenID( new TokenID( 1 ) );
        task.setTaskStatus( Task.TASK_INCOMPLETE );
        task.setInstanceID( new InstanceID( 1 ) );

        dao.insertTask( task );

        List tasks = dao.getTasksForGroups(new GroupID[] { groupID, new GroupID( 2 )}, Task.TASK_INCOMPLETE );
        assertNotNull( "Tasks should not be null", tasks );
        assertTrue("No tasks found for team!", tasks.size() > 0);
    }
View Full Code Here

        assertNotNull( "Tasks should not be null", tasks );
        assertTrue("No tasks found for team!", tasks.size() > 0);
    }

    public void testLockAndThenUnlockTask() {
        GroupID groupID = new GroupID( 1 );

        TaskImpl task = new TaskImpl();

        task.setTeamID( groupID );
        task.setTaskDescription( "Task Description" );
View Full Code Here

    }

    public List getTasksForGroups(GroupID[] groupIDs, int status) {
        StringBuffer buffer = new StringBuffer("from TaskImpl t where t.groupKey in (");
        for (int i = 0; i < groupIDs.length; i++) {
            GroupID groupID = groupIDs[i];
            if (i > 0) {
                buffer.append(", ");
            }
            buffer.append(Integer.toString(groupID.getID()));
        }
        buffer.append(")");
        if (status != Task.TASK_ALL) {
            buffer.append(" and t.status = " + status);
        }
View Full Code Here

                statement.setNull( 2, Types.INTEGER);
            }
            else {
                statement.setInt( 2, userID.getID() );
            }
            GroupID groupID = task.getGroupID();
            if (groupID == null) {
                statement.setNull( 3, Types.INTEGER);
            }
            else {
                statement.setInt( 3, groupID.getID() );
            }
            statement.setString( 4, task.getTaskDescription() );
            statement.setDate( 5, new java.sql.Date(
                task.getTaskExpirationDate().getTime() ) );
            statement.setInt( 6, task.getSourceTokenID().getID() );
View Full Code Here

                statement.setNull( 1, Types.INTEGER);
            }
            else {
                statement.setInt( 1, userID.getID() );
            }
            GroupID groupID = task.getGroupID();
            if (groupID == null) {
                statement.setNull( 2, Types.INTEGER);
            }
            else {
                statement.setInt( 2, groupID.getID() );
            }
            statement.setString( 3, task.getTaskDescription() );
            statement.setDate( 4, new java.sql.Date(
                task.getTaskExpirationDate().getTime() ) );
            statement.setInt( 5, task.getSourceTokenID().getID() );
View Full Code Here

            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" ) ) );
            retVal.setTaskStatus( result.getInt( "status" ) );
View Full Code Here

            Connection connection = null;

            try {
                StringBuffer buffer = new StringBuffer("select id from bpm_task where groupid in (");
                for (int i = 0; i < groupIDs.length; i++) {
                    GroupID groupID = groupIDs[i];
                    if (i > 0) {
                        buffer.append(", ");
                    }
                    buffer.append(Integer.toString(groupID.getID()));
                }
                buffer.append(")");
                if (status != Task.TASK_ALL) {
                    buffer.append(" and status = ");
                    buffer.append(Integer.toString(status));
View Full Code Here

            this.userKey = new Integer(id.getID());
        }
    }

    public GroupID getGroupID() {
        return groupKey != null ? new GroupID(groupKey.intValue()) : null;
    }
View Full Code Here

TOP

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

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.