Package org.apache.agila.services.user

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


        return retVal;
    }

    public UserID addUser(UserInfo newUser) {
        UserID retVal = null;

        Connection connection = null;

        try {
            String sql = "insert into bpm_userinfo values( ?, ?, ?, ?, ? )";

            int userID = generateKey();

            connection = getConnection();
            connection.setAutoCommit(false);

            PreparedStatement statement = connection.prepareStatement( sql );
            statement.setInt( 1, userID );
            statement.setString( 2, newUser.getUserName() );
            statement.setString( 3, newUser.getUserPassword() );
            statement.setString( 4, newUser.getUserPrincipal() );
            statement.setBoolean( 5, newUser.isAdmin() );
            statement.execute();

            connection.commit();
            statement.close();

            retVal = new UserID( userID );
        } catch( SQLException e ) {
            throw new RuntimeException( e );
        }
        finally {
            if (connection != null) {
View Full Code Here


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

            retVal = new ArrayList();
            while( result.next() ) {
                retVal.add( getUserInfo( new UserID( result.getInt( "userid" ) ) ) );
            }
        } catch( SQLException e ) {
            throw new RuntimeException( e );
        }
        finally {
View Full Code Here

        TaskService ts = ctx.getTaskService();
        NotificationService ns = ctx.getNotificationService();

        ts.assignTask(ctx.getNextExecutionToken().getTokenID(), "Leave Approval",
                new UserID(1), new Date());

        return false;
    }
View Full Code Here

    public boolean doStart(NodeContext ctx) {

        TaskService ts = ctx.getTaskService();

        ts.assignTask(ctx.getNextExecutionToken().getTokenID(), "Enter leave details",
                new UserID(1), new Date());

        return false;
    }
View Full Code Here

     */
    public Connection[] doEnd(NodeContext ctx) {

        String val = (String) ctx.getBoundValue("message");

        ctx.getNotificationService().notify(new UserID(1), val);
        return this.getOutboundConnections();
    }
View Full Code Here

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

    public UserID getUserID() {
        return userKey != null ? new UserID(userKey.intValue()) : null;
    }
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.