Package com.identityworksllc.iiq.common
Class BaseIdentityUtilities
- java.lang.Object
-
- com.identityworksllc.iiq.common.AbstractBaseUtility
-
- com.identityworksllc.iiq.common.BaseIdentityUtilities
-
public class BaseIdentityUtilities extends AbstractBaseUtility
Utilities for handling Identity operationsTODO javadocs
-
-
Field Summary
-
Fields inherited from class com.identityworksllc.iiq.common.AbstractBaseUtility
context, debug, log
-
-
Constructor Summary
Constructors Constructor Description BaseIdentityUtilities(sailpoint.api.SailPointContext context)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description sailpoint.object.Attributes<String,Object>
getDefaultRefreshOptions(boolean shouldProcessEvents)
Gets the default set of refresh options, with or without process-eventsboolean
hasDetectedRole(sailpoint.object.Identity identity, String roleName)
Returns true if the user has at least one of the detected roleboolean
hasMultiple(sailpoint.object.Identity identity, String roleName)
Returns true if the user has the given role more than one time (either via assignment or detection or both)void
maskSecretAttributes(Map<String,Object> attributes)
Transforms the existing Map in place by replacing attributes of type Secret with asterisksList<Object[]>
recursivelyExplodeHierarchy(String parent, String attribute)
List<Object[]>
recursivelyExplodeHierarchy(sailpoint.object.Identity parent)
List<sailpoint.object.Identity>
recursivelyExplodeWorkgroup(sailpoint.object.Identity possibleWorkgroup)
void
refresh(sailpoint.object.Identity id)
Performs a refresh with default options on the identityvoid
refresh(sailpoint.object.Identity id, boolean shouldProcessEvents)
Performs a refresh with mostly-default options on the identityvoid
refresh(sailpoint.object.Identity id, Map<String,Object> args)
Performs a refresh against the identity with the given argumentsvoid
rename(sailpoint.object.Identity target, String newName)
Attempt to do a best effort rename of a user.-
Methods inherited from class com.identityworksllc.iiq.common.AbstractBaseUtility
inject, isDebug, setDebug
-
-
-
-
Constructor Detail
-
BaseIdentityUtilities
public BaseIdentityUtilities(sailpoint.api.SailPointContext context)
-
-
Method Detail
-
getDefaultRefreshOptions
public sailpoint.object.Attributes<String,Object> getDefaultRefreshOptions(boolean shouldProcessEvents)
Gets the default set of refresh options, with or without process-events- Parameters:
shouldProcessEvents
- True if we should also process events, false if not- Returns:
- A new Attributes with the default set of refresh options
-
hasDetectedRole
public boolean hasDetectedRole(sailpoint.object.Identity identity, String roleName)
Returns true if the user has at least one of the detected role- Parameters:
identity
- The identity to checkroleName
- The role name to look for- Returns:
- true if the user has at least one detected role of this name
-
hasMultiple
public boolean hasMultiple(sailpoint.object.Identity identity, String roleName)
Returns true if the user has the given role more than one time (either via assignment or detection or both)- Parameters:
identity
- The identity to checkroleName
- The role name to look for- Returns:
- true if the user has at least two assigned/detected roles of this name
-
maskSecretAttributes
public void maskSecretAttributes(Map<String,Object> attributes)
Transforms the existing Map in place by replacing attributes of type Secret with asterisks- Parameters:
attributes
- The attribute map to modify
-
recursivelyExplodeHierarchy
public List<Object[]> recursivelyExplodeHierarchy(sailpoint.object.Identity parent) throws sailpoint.tools.GeneralException
- Throws:
sailpoint.tools.GeneralException
-
recursivelyExplodeHierarchy
public List<Object[]> recursivelyExplodeHierarchy(String parent, String attribute) throws sailpoint.tools.GeneralException
- Throws:
sailpoint.tools.GeneralException
-
recursivelyExplodeWorkgroup
public List<sailpoint.object.Identity> recursivelyExplodeWorkgroup(sailpoint.object.Identity possibleWorkgroup) throws sailpoint.tools.GeneralException
- Throws:
sailpoint.tools.GeneralException
-
refresh
public void refresh(sailpoint.object.Identity id) throws sailpoint.tools.GeneralException
Performs a refresh with default options on the identity- Parameters:
id
- The identity in question- Throws:
sailpoint.tools.GeneralException
- if any IIQ failure occurs
-
refresh
public void refresh(sailpoint.object.Identity id, boolean shouldProcessEvents) throws sailpoint.tools.GeneralException
Performs a refresh with mostly-default options on the identity- Parameters:
id
- The identity to targetshouldProcessEvents
- if true, processEvents will also be added- Throws:
sailpoint.tools.GeneralException
- if any IIQ failure occurs
-
refresh
public void refresh(sailpoint.object.Identity id, Map<String,Object> args) throws sailpoint.tools.GeneralException
Performs a refresh against the identity with the given arguments- Parameters:
id
- The target identityargs
- the refresh arguments- Throws:
sailpoint.tools.GeneralException
- if any IIQ failure occurs
-
rename
public void rename(sailpoint.object.Identity target, String newName) throws sailpoint.tools.GeneralException
Attempt to do a best effort rename of a user.Note that this will not catch usernames stored in:
(1) ProvisioningPlan objects (2) Running workflow variables (3)
- Parameters:
target
- The Identity object to renamenewName
- The new name of the identity- Throws:
sailpoint.tools.GeneralException
- if any renaming failures occur
-
-