public class StaticWfHelper
extends Object
implements RemoteAccess
Constructor and Description |
---|
StaticWfHelper() |
Modifier and Type | Method and Description |
---|---|
static void |
addPrincipalsToContainerRoles(List<String> containerOIDs,
List<String> roleNames,
List<String> principals,
boolean cleanCache) |
static void |
addPrincipalsToContainerRoles(WTContainer container,
List<String> roleNames,
List<String> principals,
boolean cleanCache) |
static void |
addPrincipalsToRole(WTContainer wtc,
ContainerTeam team,
Role role,
List<String> principals,
boolean cleanCache) |
static void |
addPrincipalToRole(String nameOfContainer,
String nameOfRole,
String nameOfWTPrincipal,
boolean cleanCache) |
static void |
addPrincipalToRole(WTContainer wtc,
ContainerTeam team,
Role role,
WTPrincipal principal,
boolean cleanCache) |
static void |
addPrincipalToRole(WTContainer container,
String nameOfRole,
WTPrincipal principal,
boolean cleanCache) |
static Persistable |
addToChangeActivity(Class linkClass,
Changeable2 changeable,
WTChangeActivity2 ca)
Deprecated.
moved to ext.sulis.change.ChangeHelper
|
static AffectedActivityData |
addToChangeActivityAffected(Changeable2 changeable,
WTChangeActivity2 ca)
Deprecated.
moved to ext.sulis.change.ChangeHelper
|
static ChangeRecord2 |
addToChangeActivityResulting(Changeable2 changeable,
WTChangeActivity2 ca)
Deprecated.
moved to ext.sulis.change.ChangeHelper
|
static WTChangeOrder2 |
addToChangeOrder(Object changeable,
Map meta)
Deprecated.
moved to ext.sulis.change.ChangeHelper
|
static void |
addUserToRole(Object to,
Role r,
String user)
add a user to a role in a team
|
static void |
addUserToRole(Object to,
Role r,
WTUser user)
add a user to a role in a team
|
static void |
addUserToRole(Object to,
String role,
String user)
add a user to a role in a team
|
static WTChangeActivity2 |
createChangeActivity(Changeable2 changeable,
WTChangeOrder2 co,
Map meta)
Deprecated.
moved to ext.sulis.change.ChangeHelper
|
static WTChangeOrder2 |
createChangeOrder(Object changeable,
Map meta)
Deprecated.
moved to ext.sulis.change.ChangeHelper
|
static WTChangeOrder2 |
createChangeOrder2(Object changeable,
Map meta)
Deprecated.
moved to ext.sulis.change.ChangeHelper
|
static void |
delegate(WorkItem w,
WTUser u,
String c)
delegate a workitem to another principal
|
static WTChangeActivity2 |
getLatestChangeActivityForChangeable(Changeable2 changeable)
Deprecated.
moved to ext.sulis.change.ChangeHelper
|
static WTUser |
getLdapUserByName(String name) |
static WfProcess |
getParentProcess(WfActivity wfa)
returns the parent process for a WfActivity
|
static Object |
getParentProcess(WorkItem wi)
return parent process of workitem (NOTE: switches off access control to get the WfProcess)
|
static Object |
getParentProcessVar(WorkItem wi,
String varName)
TODO javadoc
|
static Object |
getProcessDataVar(Object wfe,
String varName)
get variable from the ProcessData of a workflow execution object (e˙g˙, WorkItem, WfProcess) - NOTE: switches off access control to avoid access control problems!
|
static WTUser |
getUserByName(String name) |
static WTUser |
getUserByName(String name,
boolean ignoreCase) |
static WTPrincipal |
getWTPrincipalByName(String name,
boolean ignoreCase) |
static List<WTGroup> |
groupList(String username,
String groupname)
returns the list of groups of a given name where user is a member can be used to determine for example in which products user is a productmanager
|
static Boolean |
isAssignmentCompleted(WfAssignedActivity wfa)
tells if the WfAssignedActivity is complete
|
static boolean |
isUserInGroup(String u,
String g)
tell if user is a member of given group
|
static boolean |
isUserInGroup(String u,
WTGroup g)
tell if user is a member of given group
|
static boolean |
isUserInRole(String u,
String role,
ContainerTeam t)
tell if user is in given role of given team
|
static boolean |
isUserInRole(String u,
String role,
ContainerTeamReference tr)
tell if user is in given role of given team
|
static boolean |
isUserInRole(String u,
String role,
LifeCycleManaged l)
tell if user is in given role of the team the LifeCycleManaged object belongs to
|
static boolean |
isUserInRole(String u,
String role,
Team t)
tell if user is in given role of given team
|
static boolean |
isUserInRole(String u,
String role,
WfProcess p)
tell if user is in given role of the wfprocess' team
|
static boolean |
isUserInRoles(String u,
String[] roles,
boolean ignoreCase,
ContainerTeamReference tr)
TODO javadoc
|
static boolean |
isUserInRoles2(String u,
String[] roles,
boolean ignoreCase,
ContainerTeamReference tr) |
static <T> boolean |
isUserMemberOfRoles(ContainerTeam containerTeam,
Class<T> dummy,
String[] roles,
String userName) |
static <T> boolean |
isUserMemberOfRoles2(ContainerTeam containerTeam,
Class<T> dummy,
String[] roles,
String userName) |
static void |
loadChangesFromFile(String[] a)
Deprecated.
moved to ext.sulis.change.ChangeHelper
|
static void |
main(String[] a)
expose some functionality to command line, call without argument for help.
|
static List<WTGroup> |
memberGroups(WTGroup g)
return a List of nested group members (only the members that are themselves a WTGroup)
|
static Vector |
members(WTGroup g,
List<Persistable> alreadyChecked)
return a Vector with the group members - nested groups are resolved.
|
static Vector |
members2(WTGroup g,
List<Persistable> alreadyChecked) |
static <T> List<T> |
membersOfRole(ContainerTeam team,
Role role,
boolean resolveRecursive,
Class<T> dummy) |
static List<WTGroup> |
parentGroups(WTPrincipal p)
return the groups the principal is in
|
static List<WTPrincipal> |
principalsInGroup(WTGroup g)
get a map with user name/fullname|WTUser pairs of users in group - resolves groups in groups to users
|
static void |
removeAllFromContainerRoles(List<String> containerOIDs,
List<String> roleNames,
boolean cleanCache) |
static void |
removeAllFromContainerRoles(WTContainer container,
List<String> roleNames,
boolean cleanCache) |
static void |
removeAllFromRole(ContainerTeam team,
Role role,
boolean cleanCache) |
static void |
removePrincipalFromRole(ContainerTeam team,
Role role,
WTPrincipal principal,
boolean cleanCache) |
static void |
removePrincipalFromRole(String nameOfContainer,
String nameOfRole,
String nameOfWTPrincipal,
boolean cleanCache) |
static void |
removePrincipalFromRole(WTContainer container,
String nameOfRole,
WTPrincipal principal,
boolean cleanCache) |
static void |
removePrincipalsFromContainerRoles(List<String> containerOIDs,
List<String> roleNames,
List<String> principals,
boolean cleanCache) |
static void |
removePrincipalsFromContainerRoles(WTContainer container,
List<String> roleNames,
List<String> principals,
boolean cleanCache) |
static void |
removePrincipalsFromRole(ContainerTeam team,
Role role,
List<String> principals,
boolean cleanCache) |
static List<List<Object>> |
reportContainerRoleMembers(List<String> containerOIDs,
List<String> roleNames) |
static List<List<Object>> |
reportContainerRoleMembers(WTContainer container,
List<String> roleNames) |
static void |
setProcessDataVar(Object wfe,
String varName,
Object val)
set variable in the ProcessData of a workflow exection object (e˙g˙, WorkItem, WfProcess)
|
static void |
setProcessDataVars(Object wfe,
Map<String,Object> vals)
set variable[s] in the ProcessData of a workflow execution object (e˙g˙, WorkItem, WfProcess) - NOTE: switches off access control to avoid access control problems!
|
static HashMap<String,String> |
usersInGroup(String groupName)
get a map with user name/fullname pairs of users in group with given name
|
static HashMap<String,String> |
usersInGroup(String g,
boolean ignoreCase)
get a map with user name/fullname pairs of users in group with given name
|
static <T> HashMap<String,T> |
usersInGroup(String g,
Class<T> dummy,
boolean ignoreCase)
get a map with user name/fullname|WTUser pairs of users in group with given name
|
static HashMap<String,String> |
usersInGroup(WTGroup g)
get a map with user name/fullname pairs of users in group - resolves groups in groups to users
|
static <T> HashMap<String,T> |
usersInGroup(WTGroup g,
Class<T> dummy)
get a map with user name/fullname|WTUser pairs of users in group - resolves groups in groups to users
|
static <T> HashMap<String,T> |
usersInGroup2(WTGroup g,
Class<T> dummy) |
static HashMap<String,String> |
usersInRole(String role,
ContainerTeam containerTeam)
get a map with user name/fullname pairs of users in given role of given team
|
static HashMap<String,String> |
usersInRole(String role,
Team t)
get a map with user name/fullname pairs of users in given role of given team
|
static HashMap<String,HashMap<String,String>> |
usersInRoles(ContainerTeam t)
get a map with role/map user name/fullname roles of given container team
|
static <T> HashMap<String,HashMap<String,T>> |
usersInRoles(ContainerTeam t,
Class<T> dummy)
get a map with role/map user name/fullname|WTUser of roles of given containerteam
|
static HashMap<String,HashMap<String,String>> |
usersInRoles(Team t)
get a map with role/map user name/fullname roles of given team
|
static <T> HashMap<String,HashMap<String,T>> |
usersInRoles(Team t,
Class<T> dummy)
get a map with role/map user name/fullname|WTUser of roles of given team
|
static HashMap<String,HashMap<String,String>> |
usersInRoles2(ContainerTeam t) |
static <T> HashMap<String,HashMap<String,T>> |
usersInRoles2(ContainerTeam containerTeam,
Class<T> dummy) |
static HashMap<String,HashMap<String,String>> |
usersInRoles2(Team t) |
static <T> HashMap<String,HashMap<String,T>> |
usersInRoles2(Team t,
Class<T> dummy) |
public static final int MAJOR
public static final int MINOR
public static void main(String[] a) throws Exception
a
- commandline argumentsException
public static List<WTGroup> groupList(String username, String groupname) throws WTException
username
- groupname
- WTException
public static boolean isUserInGroup(String u, WTGroup g) throws WTException
u
- usernameg
- group to checkWTException
public static boolean isUserInGroup(String u, String g) throws WTException
u
- usernameg
- name of group to checkWTException
public static boolean isUserInRole(String u, String role, ContainerTeamReference tr) throws WTException
u
- usernamerole
- rolenametr
- ContainerTeamReference to ContainerTeam holding the rolesWTException
public static boolean isUserInRoles(String u, String[] roles, boolean ignoreCase, ContainerTeamReference tr) throws WTException
u
- role
- tr
- WTException
public static boolean isUserInRoles2(String u, String[] roles, boolean ignoreCase, ContainerTeamReference tr) throws WTRuntimeException, Exception
WTRuntimeException
Exception
public static boolean isUserInRole(String u, String role, ContainerTeam t) throws WTException
u
- usernamerole
- rolenamet
- ContainerTeam holding the rolesWTException
public static boolean isUserInRole(String u, String role, Team t) throws WTException
u
- usernamerole
- rolenamet
- Team holding the rolesWTException
public static boolean isUserInRole(String u, String role, LifeCycleManaged l) throws WTException
u
- usernamerole
- rolenamel
- lifecyclemanaged objectWTException
public static boolean isUserInRole(String u, String role, WfProcess p) throws WTException
u
- usernamerole
- rolenamep
- worflow processWTException
public static HashMap<String,String> usersInRole(String role, ContainerTeam containerTeam) throws WTException
role
- rolenamet
- container team with rolesWTException
public static HashMap<String,String> usersInRole(String role, Team t) throws WTException
role
- rolenamet
- team with rolesWTException
public static HashMap<String,HashMap<String,String>> usersInRoles(ContainerTeam t) throws WTException
t
- container team with rolesWTException
public static HashMap<String,HashMap<String,String>> usersInRoles2(ContainerTeam t) throws Exception
Exception
public static <T> HashMap<String,HashMap<String,T>> usersInRoles(ContainerTeam t, Class<T> dummy) throws WTException
t
- container team with rolesWTException
public static <T> HashMap<String,HashMap<String,T>> usersInRoles2(ContainerTeam containerTeam, Class<T> dummy) throws Exception
Exception
public static <T> boolean isUserMemberOfRoles(ContainerTeam containerTeam, Class<T> dummy, String[] roles, String userName) throws Exception
Exception
public static <T> boolean isUserMemberOfRoles2(ContainerTeam containerTeam, Class<T> dummy, String[] roles, String userName) throws Exception
Exception
public static HashMap<String,HashMap<String,String>> usersInRoles(Team t) throws WTException
t
- container team with rolesWTException
public static HashMap<String,HashMap<String,String>> usersInRoles2(Team t) throws Exception
Exception
public static <T> HashMap<String,HashMap<String,T>> usersInRoles(Team t, Class<T> dummy) throws WTException
t
- container team with rolesWTException
public static <T> HashMap<String,HashMap<String,T>> usersInRoles2(Team t, Class<T> dummy) throws Exception
Exception
public static void addUserToRole(Object to, String role, String user) throws WTException
to
- team to add to - can be obid-string or teamreference or teamrole
- name of role to add user touser
- name of user to addWTException
public static void addUserToRole(Object to, Role r, String user) throws WTException
to
- team to add to - can be obid-string or teamreference or teamr
- role to add user touser
- name of user to addWTException
public static void addUserToRole(Object to, Role r, WTUser user) throws WTException
to
- team to add to - can be obid-string or teamreference or teamr
- role to add user touser
- WTUser to addWTException
public static HashMap<String,String> usersInGroup(String groupName) throws WTException
g
- group namethrown
- if search with group name does not find exactly one group (case sensitive)WTException
public static HashMap<String,String> usersInGroup(String g, boolean ignoreCase) throws WTException
g
- group nameignoreCase
- true/false if search should be conducted case insensitivethrown
- if search with group name does not find exactly one goupWTException
public static <T> HashMap<String,T> usersInGroup(String g, Class<T> dummy, boolean ignoreCase) throws WTException
g
- group namedummy
- class of map values to return, can be String.class or WTUser.classignoreCase
- true/false if search should be conducted case insensitivethrown
- if search with group name does not find exactly one goupWTException
public static HashMap<String,String> usersInGroup(WTGroup g) throws WTException
g
- groupWTException
public static <T> HashMap<String,T> usersInGroup(WTGroup g, Class<T> dummy) throws WTException
g
- groupdummy
- class of map values to return, can be String.class or WTUser.classWTException
public static <T> HashMap<String,T> usersInGroup2(WTGroup g, Class<T> dummy) throws Exception
Exception
public static List<WTPrincipal> principalsInGroup(WTGroup g) throws WTException
g
- groupdummy
- class of map values to return, can be String.class or WTUser.classWTException
public static List<WTGroup> parentGroups(WTPrincipal p) throws Exception
p
- the principalException
public static Vector members(WTGroup g, List<Persistable> alreadyChecked) throws WTException
g
- Group to get members forWTException
public static Vector members2(WTGroup g, List<Persistable> alreadyChecked) throws Exception
Exception
public static List<WTGroup> memberGroups(WTGroup g) throws WTException
g
- Group to get members forWTException
public static void setProcessDataVars(Object wfe, Map<String,Object> vals) throws Exception
wfe
- the workflow objectvals
- Map with key/values to setException
public static void setProcessDataVar(Object wfe, String varName, Object val) throws Exception
wfe
- the workflow objectvarName
- name of variableval
- value of variableException
public static Object getProcessDataVar(Object wfe, String varName) throws Exception
wfe
- the workflow objectvarName
- name of variableException
public static void delegate(WorkItem w, WTUser u, String c) throws Exception
w
- the workitemu
- the new ownerc
- comment for delegationException
public static Object getParentProcess(WorkItem wi) throws Exception
wi
- thw workitemException
public static Object getParentProcessVar(WorkItem wi, String varName) throws Exception
wi
- varName
- Exception
public static WfProcess getParentProcess(WfActivity wfa) throws Exception
wfa
- the WfActivityException
public static Boolean isAssignmentCompleted(WfAssignedActivity wfa) throws Exception
wfa
- the WfAssignedActivityException
public static WTChangeActivity2 createChangeActivity(Changeable2 changeable, WTChangeOrder2 co, Map meta) throws Exception
Exception
public static AffectedActivityData addToChangeActivityAffected(Changeable2 changeable, WTChangeActivity2 ca) throws Exception
Exception
public static ChangeRecord2 addToChangeActivityResulting(Changeable2 changeable, WTChangeActivity2 ca) throws Exception
Exception
public static Persistable addToChangeActivity(Class linkClass, Changeable2 changeable, WTChangeActivity2 ca) throws Exception
Exception
public static WTChangeActivity2 getLatestChangeActivityForChangeable(Changeable2 changeable) throws Exception
Exception
public static WTChangeOrder2 createChangeOrder(Object changeable, Map meta) throws Exception
Exception
public static WTChangeOrder2 createChangeOrder2(Object changeable, Map meta) throws Exception
Exception
public static WTChangeOrder2 addToChangeOrder(Object changeable, Map meta) throws Exception
Exception
public static void loadChangesFromFile(String[] a) throws Exception
Exception
public static WTUser getLdapUserByName(String name) throws Exception
Exception
public static WTUser getUserByName(String name) throws Exception
Exception
public static WTUser getUserByName(String name, boolean ignoreCase) throws Exception
Exception
public static WTPrincipal getWTPrincipalByName(String name, boolean ignoreCase) throws Exception
name
- name of principla to searchignoreCase
- flag if search is case sensitiveException
public static void removePrincipalFromRole(String nameOfContainer, String nameOfRole, String nameOfWTPrincipal, boolean cleanCache) throws Exception
nameOfContainer
- nameOfRole
- nameOfWTPrincipal
- cleanCache
- Exception
public static void removePrincipalFromRole(WTContainer container, String nameOfRole, WTPrincipal principal, boolean cleanCache)
public static void removePrincipalFromRole(ContainerTeam team, Role role, WTPrincipal principal, boolean cleanCache)
public static void addPrincipalToRole(String nameOfContainer, String nameOfRole, String nameOfWTPrincipal, boolean cleanCache) throws Exception
Exception
public static void addPrincipalToRole(WTContainer container, String nameOfRole, WTPrincipal principal, boolean cleanCache)
public static void addPrincipalToRole(WTContainer wtc, ContainerTeam team, Role role, WTPrincipal principal, boolean cleanCache)
public static void addPrincipalsToContainerRoles(List<String> containerOIDs, List<String> roleNames, List<String> principals, boolean cleanCache)
public static void addPrincipalsToContainerRoles(WTContainer container, List<String> roleNames, List<String> principals, boolean cleanCache)
public static void addPrincipalsToRole(WTContainer wtc, ContainerTeam team, Role role, List<String> principals, boolean cleanCache)
public static void removePrincipalsFromContainerRoles(List<String> containerOIDs, List<String> roleNames, List<String> principals, boolean cleanCache)
public static void removePrincipalsFromContainerRoles(WTContainer container, List<String> roleNames, List<String> principals, boolean cleanCache)
public static void removePrincipalsFromRole(ContainerTeam team, Role role, List<String> principals, boolean cleanCache)
public static void removeAllFromContainerRoles(List<String> containerOIDs, List<String> roleNames, boolean cleanCache)
public static void removeAllFromContainerRoles(WTContainer container, List<String> roleNames, boolean cleanCache)
public static void removeAllFromRole(ContainerTeam team, Role role, boolean cleanCache)
public static List<List<Object>> reportContainerRoleMembers(List<String> containerOIDs, List<String> roleNames)
public static List<List<Object>> reportContainerRoleMembers(WTContainer container, List<String> roleNames)
public static <T> List<T> membersOfRole(ContainerTeam team, Role role, boolean resolveRecursive, Class<T> dummy)