|
Oracle BPEL Process Manager Workflow Services API Reference 10g Release 3 (10.1.3) B28985-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.bpel.services.workflow.assignment.dynamic.DynamicAssignmentUtils
This class provides a number of static utility methods that are useful to anyone writing implementations of IDynamicAssignmentFunctions. Methods are provided for getting users who are currently available for assignment (not on vacation), for querying the Workflow persistency store, and for interacting with the identity service.
Constructor Summary | |
DynamicAssignmentUtils() |
Method Summary | |
static void |
endTransaction(boolean startedTransaction) Handles transaction cleanip after querying from the workflow database tables. |
static java.sql.ResultSet |
executeQuery(java.lang.String query, boolean startedTransaction) Executes the specified query against the workflow persistency schema. |
static java.util.List |
getAvailableUsersFromGroup(java.lang.String group, java.lang.String realm) Method returns a list of users belonging to the specified group that are available for assignment. |
static java.util.List |
getAvailableUsersFromList(java.util.List usernames, java.lang.String realm) Method returns a list of users from the specified list that are available. |
static java.util.List |
getGroupsFromGroup(java.lang.String groupName, java.lang.String realm, boolean directsOnly) Method uses the specified group name to lookup the sub-groups belonging to that group using the identity service. |
static java.lang.String |
getIDServiceDefaultRealm() Gets the default realm for the identity service. |
static java.lang.String |
getSQLCommaSeperatedList(java.util.List list) Converts a list of objects into a comma seperated list of Strings suitable for use in SQL query |
static java.util.List |
getUsersFromGroup(java.lang.String groupName, java.lang.String realm) Method uses the specified group name to lookup the users belonging to that group using the identity service. |
static boolean |
isUserAvailable(java.lang.String username, java.lang.String realm) Method determine if the specified user is available for assignment. |
static boolean |
startTransaction() Ensures a transaction is open prior to querying from the workflow database tables. |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DynamicAssignmentUtils()
Method Detail |
public static java.util.List getUsersFromGroup(java.lang.String groupName, java.lang.String realm) throws DynamicAssignmentException
groupName
- String name of group to lookuprealm
- to lookup group in - if null, then use identity service default realmDynamicAssignmentException
- if group could not be foundpublic static java.util.List getGroupsFromGroup(java.lang.String groupName, java.lang.String realm, boolean directsOnly) throws DynamicAssignmentException
groupName
- name of group to lookuprealm
- to lookup group in - if null, then use identity service default realmdirectsOnly
- if true return only the direct sub-groups of this group. If false, return all groups belonging to this group.DynamicAssignmentException
- if group could not be foundpublic static java.lang.String getIDServiceDefaultRealm() throws DynamicAssignmentException
DynamicAssignmentException
- if error occurs accessing the IdentityServicepublic static boolean startTransaction() throws java.lang.Exception
true
, if there is a transaction already open, the method does nothing, and returns false
. This method should be called before calling the executeQuery method in this class.true
if new trasnaction was started, false
if a transaction was already open.java.lang.Exception
- if error occurs starting transactionpublic static void endTransaction(boolean startedTransaction) throws java.lang.Exception
startedTransaction
- if true
, close the current transaction, if false
, do nothing.java.lang.Exception
- if error occurs closing transactionpublic static java.sql.ResultSet executeQuery(java.lang.String query, boolean startedTransaction) throws java.lang.Exception
java.sql.ResultSet
. The method startTransaction() in this class should always be called prior to calling this method. The value returned by the call to startTransaction should be passed to the startedTransaction parameter of this method. The method endTransaction() in this class should always be called after calling this method.query
- String SQL Query to be executedstartedTransaction
- this should be the value returned from call to startTransaction()java.lang.Exception
- if error occurspublic static boolean isUserAvailable(java.lang.String username, java.lang.String realm) throws DynamicAssignmentException
username
- String name of userrealm
- String name of Identity Service realm user belongs to. If realm is null, then metho will use the default realm.true
if user is available, false
if they are on vacationDynamicAssignmentException
- if error occured querying user availability.public static java.util.List getAvailableUsersFromGroup(java.lang.String group, java.lang.String realm) throws DynamicAssignmentException
group
- - name of group to lookup users forrealm
- - Identity Service realm the group belongs to. If realm is null, method will use the default realm.DynamicAssignmentException
- if error encountered looking up group, or checking users.public static java.util.List getAvailableUsersFromList(java.util.List usernames, java.lang.String realm) throws DynamicAssignmentException
usernames
- - List of String usernames to checkrealm
- - realm that the users belong to. If realm is null, method will use the default realm.DynamicAssignmentException
- if error encountered looking up group, or checking users.public static java.lang.String getSQLCommaSeperatedList(java.util.List list)
list
- List of Objects (usually Strings)
|
Oracle BPEL Process Manager Workflow Services API Reference 10g Release 3 (10.1.3) B28985-02 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Copyright © 2006, Oracle. All rights reserved.