Package icc.util
Class WorkgroupsUtil
- java.lang.Object
-
- icc.util.WorkgroupsUtil
-
public class WorkgroupsUtil extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
LEANIX_WORKGROUP_INCLUDED_CATEGORIES
-
Constructor Summary
Constructors Constructor Description WorkgroupsUtil()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addWorkgroupMemberships(java.lang.String wgName, java.util.List<java.lang.String> membersNamesToRemove, java.lang.String comment, boolean lcmWorkflow)
Add Workgroup Memberships for given Workgroup Name and List of Members Cubes Namesjava.lang.String
calcWgName(java.lang.String prefix, java.lang.String displayName)
Calculate Workgroup Name with Prefix and Display Name so that the resulting name is not exceeding a length of 128 Charactersvoid
createWorkgroupForLeanixApplications(sailpoint.api.SailPointContext context, sailpoint.object.ResourceObject resObj)
Create Workgroups for Leanix Applications.void
deleteWorkgroup(java.lang.String wgName)
Delete a Workgroup specified by Workgroup Name using the Terminatorvoid
flagWorkgroupForDeletion(java.lang.String wgName, int offset)
Write deletionFlag to Workgroup specified by Workgroup Namestatic WorkgroupsUtil
getInstance()
sailpoint.object.Identity
getOrCreateLeanIxWorkgroup(java.lang.String prefix, java.lang.String displayName, java.lang.String workgroupEntRef)
Creates a workgroup and if there is one for the Managed Attribute Reference already the ownerships and memberships will be transferedsailpoint.object.Identity
getOrCreateWorkgroup(sailpoint.object.Identity owner, java.lang.String name, java.lang.String displayName, java.lang.String source, java.lang.String workgroupEntRef)
Get or create Workgroup for given namejava.util.List<java.lang.String>
getWorkgroupIdsRelatedToApplication(sailpoint.api.SailPointContext context, java.lang.String appName)
Get a list of IDs of Workgroups related (workgroupSource) to an Applicationjava.util.List<sailpoint.object.Identity>
getWorkgroupMembers(sailpoint.api.SailPointContext context, sailpoint.object.Identity workgroup)
Get List of Members of a Workgroup The Feature ObjectUtil.getEffectiveEmails() was not used here because this would return Workgroups Emails as well.java.util.List<java.lang.String>
getWorkgroupMembersEmails(sailpoint.api.SailPointContext context, sailpoint.object.Identity workgroup)
Get Emails of the Members of a Workgroupjava.util.List<java.lang.String>
getWorkgroupMembersNames(sailpoint.api.SailPointContext context, sailpoint.object.Identity workgroup)
Get List of Cube Names of Members of a Workgroupvoid
removeWorkgroupMemberships(java.lang.String wgName, java.util.List<java.lang.String> membersNamesToRemove, java.lang.String comment, boolean lcmWorkflow)
Remove Workgroup Memberships for given Workgroup Name and List of Members Cubes Namesvoid
transferOwnerships(sailpoint.object.Identity oldWorkgroup, sailpoint.object.Identity newWorkgroup)
Tansfers the ownerships of WorkItems, Bundles and ManagedAttributes from the oldWorkgroup to the newWorkgroup<T extends sailpoint.object.SailPointObject>
voidtransferOwnershipsForObjectType(sailpoint.object.Identity oldWorkgroup, sailpoint.object.Identity newWorkgroup, java.lang.Class<T> clazz)
Tansfers the ownerships of the given Class from the oldWorkgroup to the newWorkgroup
-
-
-
Field Detail
-
LEANIX_WORKGROUP_INCLUDED_CATEGORIES
public static final java.lang.String LEANIX_WORKGROUP_INCLUDED_CATEGORIES
- See Also:
- Constant Field Values
-
-
Method Detail
-
getInstance
public static WorkgroupsUtil getInstance()
-
createWorkgroupForLeanixApplications
public void createWorkgroupForLeanixApplications(sailpoint.api.SailPointContext context, sailpoint.object.ResourceObject resObj) throws sailpoint.tools.GeneralException
Create Workgroups for Leanix Applications. Creates a TPV and FPV Workgroup for each Application delivered by LeanIX, Workgroup Name derived from the Display Name of the Application.- Parameters:
resObj
- Resource Objects, as processed during Aggregation- Throws:
sailpoint.tools.GeneralException
-
getOrCreateLeanIxWorkgroup
public sailpoint.object.Identity getOrCreateLeanIxWorkgroup(java.lang.String prefix, java.lang.String displayName, java.lang.String workgroupEntRef) throws sailpoint.tools.GeneralException
Creates a workgroup and if there is one for the Managed Attribute Reference already the ownerships and memberships will be transfered- Parameters:
prefix
-displayName
- of the Managed AttributeworkgroupEntRef
- Managed Attribute Reference- Returns:
- Throws:
sailpoint.tools.GeneralException
-
transferOwnerships
public void transferOwnerships(sailpoint.object.Identity oldWorkgroup, sailpoint.object.Identity newWorkgroup) throws sailpoint.tools.GeneralException
Tansfers the ownerships of WorkItems, Bundles and ManagedAttributes from the oldWorkgroup to the newWorkgroup- Parameters:
oldWorkgroup
-newWorkgroup
-- Throws:
sailpoint.tools.GeneralException
-
transferOwnershipsForObjectType
public <T extends sailpoint.object.SailPointObject> void transferOwnershipsForObjectType(sailpoint.object.Identity oldWorkgroup, sailpoint.object.Identity newWorkgroup, java.lang.Class<T> clazz) throws sailpoint.tools.GeneralException
Tansfers the ownerships of the given Class from the oldWorkgroup to the newWorkgroup- Type Parameters:
T
-- Parameters:
oldWorkgroup
-newWorkgroup
-class1
-- Throws:
sailpoint.tools.GeneralException
-
calcWgName
public java.lang.String calcWgName(java.lang.String prefix, java.lang.String displayName)
Calculate Workgroup Name with Prefix and Display Name so that the resulting name is not exceeding a length of 128 Characters- Parameters:
prefix
- Prefix for the Workgroup Name, e.g. "SI_TPV_WG_"displayName
- Display Name, to be appended after the prefix and cut off at 128 Characters overall Length of the result- Returns:
- Workgroup Name
-
getOrCreateWorkgroup
public sailpoint.object.Identity getOrCreateWorkgroup(sailpoint.object.Identity owner, java.lang.String name, java.lang.String displayName, java.lang.String source, java.lang.String workgroupEntRef) throws sailpoint.tools.GeneralException
Get or create Workgroup for given name- Parameters:
owner
- The Owner Identity. Can be null, if it is null, Workgroup is created without ownername
- Name of the Workgroup to be found or createddisplayName
- DisplayName of the Workgroup to be found or created. If this is null, the name is used as displayName as wellsource
- Source of this Workgroup. Specifies a relation to a IIQ Application or other Use CasesworkgroupEntRef
- Managed Attribute Reference. The 'value' of the Managed Attribute for which this workgroup was created.- Returns:
- Returns the Workgroup found or created
- Throws:
sailpoint.tools.GeneralException
- Throws Exception if name is empty
-
getWorkgroupMembers
public java.util.List<sailpoint.object.Identity> getWorkgroupMembers(sailpoint.api.SailPointContext context, sailpoint.object.Identity workgroup) throws sailpoint.tools.GeneralException
Get List of Members of a Workgroup The Feature ObjectUtil.getEffectiveEmails() was not used here because this would return Workgroups Emails as well. We specifically want to have only the Members Emails, not the Workgroup Email- Parameters:
context
- SailPointContextworkgroup
- Workgroup Identity- Returns:
- returns a List of Identities containing the Members of the Workgroup
- Throws:
sailpoint.tools.GeneralException
-
getWorkgroupMembersNames
public java.util.List<java.lang.String> getWorkgroupMembersNames(sailpoint.api.SailPointContext context, sailpoint.object.Identity workgroup) throws sailpoint.tools.GeneralException
Get List of Cube Names of Members of a Workgroup- Parameters:
context
- SailPointContextworkgroup
- Workgroup Identity- Returns:
- returns a List of Identities containing the Members of the Workgroup
- Throws:
sailpoint.tools.GeneralException
-
getWorkgroupMembersEmails
public java.util.List<java.lang.String> getWorkgroupMembersEmails(sailpoint.api.SailPointContext context, sailpoint.object.Identity workgroup) throws sailpoint.tools.GeneralException
Get Emails of the Members of a Workgroup- Parameters:
context
- SailPointContextworkgroup
- Workgroup Identity- Returns:
- List of Email Adresses of the Members of the Workgroup
- Throws:
sailpoint.tools.GeneralException
-
getWorkgroupIdsRelatedToApplication
public java.util.List<java.lang.String> getWorkgroupIdsRelatedToApplication(sailpoint.api.SailPointContext context, java.lang.String appName) throws sailpoint.tools.GeneralException
Get a list of IDs of Workgroups related (workgroupSource) to an Application- Parameters:
context
- SailPointContextappName
- The Name of the Application (w.g. LeanIX)- Returns:
- returns the List of Workgroup (Identity) Object IDs
- Throws:
sailpoint.tools.GeneralException
-
flagWorkgroupForDeletion
public void flagWorkgroupForDeletion(java.lang.String wgName, int offset)
Write deletionFlag to Workgroup specified by Workgroup Name- Parameters:
wgName
- Name of Workgroupoffset
- Offset in Days - deletion Flad will be calculated from today + offset
-
deleteWorkgroup
public void deleteWorkgroup(java.lang.String wgName) throws sailpoint.tools.GeneralException
Delete a Workgroup specified by Workgroup Name using the Terminator- Parameters:
wgName
- Name of Workgroup- Throws:
sailpoint.tools.GeneralException
-
removeWorkgroupMemberships
public void removeWorkgroupMemberships(java.lang.String wgName, java.util.List<java.lang.String> membersNamesToRemove, java.lang.String comment, boolean lcmWorkflow) throws sailpoint.tools.GeneralException
Remove Workgroup Memberships for given Workgroup Name and List of Members Cubes Names- Parameters:
wgName
-membersNamesToRemove
-comment
- Will be written to the Access RequestslcmWorkflow
- If true the lcm workflow will be used to provision the removal, if false it will be provisioned directly- Throws:
sailpoint.tools.GeneralException
-
addWorkgroupMemberships
public void addWorkgroupMemberships(java.lang.String wgName, java.util.List<java.lang.String> membersNamesToRemove, java.lang.String comment, boolean lcmWorkflow) throws sailpoint.tools.GeneralException
Add Workgroup Memberships for given Workgroup Name and List of Members Cubes Names- Parameters:
wgName
-membersNamesToRemove
-comment
- Will be written to the Access RequestslcmWorkflow
- If true the lcm workflow will be used to provision the removal, if false it will be provisioned directly- Throws:
sailpoint.tools.GeneralException
-
-