Class GrouperProvisioningService
java.lang.Object
edu.internet2.middleware.grouper.app.provisioning.GrouperProvisioningService
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbuildGrouperProvisioningAttributeValue
(AttributeAssign attributeAssign) build provisioning attribute object from underlying infocalculateProvisioningAttributes
(GrouperProvisioner grouperProvisioner, Set<GrouperProvisioningObjectAttributes> grouperProvisioningObjectAttributesToProcess, Map<String, GrouperProvisioningObjectAttributes> grouperProvisioningFolderAttributes) static void
deleteAttributeAssign
(GrouperObject grouperObject, String targetName) delete provisioning attributes from a given grouper object and targetstatic int
delete all the attribute assigns where the config doesn't existstatic void
findAllGroupIdsFromAttributeAssignIdsOnIds
(Set<String> attributeAssignIdsOnIdInput) find all groups provisionable in targetfindAllGroupsForTarget
(String target) find all groups provisionable in targetfindAllGroupsForTargetAndGroupIds
(String target, Collection<String> groupIds) find all groups provisionable in targetstatic AttributeAssign
getAttributeAssign
(GrouperObject grouperObject, String targetName) get provisioning attributes for a given grouper object and target namegetProvisioningAttributeValue
(Group group, Member member, String targetName) retrieve type setting for a given membership and target name.getProvisioningAttributeValue
(Member member, String targetName) retrieve type setting for a given member and target name.getProvisioningAttributeValue
(GrouperObject grouperObject, String targetName) retrieve provisioning settings for a given grouper object (group/stem) and target name.getProvisioningAttributeValue
(GrouperObject grouperObject, String targetName, boolean onlyCalculateParent) retrieve provisioning setting for a given grouper object (group/stem) and target name.getProvisioningAttributeValues
(Group group, Member member) retrieve all the configured provisioning attributes for a given membershipgetProvisioningAttributeValues
(Member member) retrieve all the configured provisioning attributes for a given membergetProvisioningAttributeValues
(GrouperObject grouperObject) retrieve all the configured provisioning attributes for a given grouper object (group/stem)static boolean
isTargetEditable
(GrouperProvisioningTarget target, Subject subject, GrouperObject grouperObject) is given target editable for given subject and grouper objectstatic boolean
isTargetViewable
(GrouperProvisioningTarget target, Subject subject, GrouperObject grouperObject) is given target viewable for given subject and grouper objectretrieveAssignments
(String provisionerName) static GcGrouperSyncGroup
retrieveGcGrouperGroup
(String groupId, String provsionerName) retrieve grouper sync groupstatic List<GrouperSyncLogWithOwner>
retrieveGcGrouperSyncLogs
(String provisionerId, QueryOptions queryOptions) retrieve gc grouper sync logs for a provisioner idstatic List<GcGrouperSyncLog>
retrieveGcGrouperSyncLogs
(String provisionerId, String groupId, QueryOptions queryOptions) retrieve gc grouper sync logsstatic List<GcGrouperSyncMember>
retrieveGcGrouperSyncMembers
(String memberId) get gc grouper sync members for a given member idstatic List<GcGrouperSyncMembership>
retrieveGcGrouperSyncMemberships
(String memberId, String groupId) get gc grouper sync memberships for a given member id and group idstatic List<GcGrouperSyncMembership>
retrieveGcGrouperSyncMembershipsByMemberIdAndInTargetEndTimeRange
(String memberId, Timestamp inTargetEndTimeFrom, Timestamp inTargetEndTimeTo) static List<GcGrouperSyncMembership>
retrieveGcGrouperSyncMembershipsByMemberIdAndInTargetStartTimeRange
(String memberId, Timestamp inTargetStartTimeFrom, Timestamp inTargetStartTimeTo) static List<GcGrouperSyncJob>
retrieveGcGroupSyncJobs
(String provisionerId) retrieve gc grouper sync jobs for a provisioner idstatic MultiKey
retrieveGroupsProvisionable
(String provisionerName) Deprecated.use retrieveGroupsProvisionable(String provisionerName, int limit)static MultiKey
retrieveGroupsProvisionable
(String provisionerName, Integer limit) retrieve groups that are provisionable forstatic long
retrieveNumberOfGroupsInTargetInMember
(String memberId, String targetName) get number of groups in a provisioning target that also contain the given memberstatic long
retrieveNumberOfGroupsInTargetInStem
(String stemId, String targetName) get number of groups in a provisioning target that are in a given stemstatic long
retrieveNumberOfMembershipsInTargetInStem
(String stemId, String targetName) get number of memberships in a provisioning target that are in a given stemstatic long
retrieveNumberOfUsersInTargetInGroup
(String groupId, String targetName) get number of users in a provisioning target that are in a given groupstatic long
retrieveNumberOfUsersInTargetInStem
(String stemId, String targetName) get number of users in a provisioning target that are in a given stemstatic List<GrouperProvisioningError>
retrieveProvisioningErrors
(String provisionerName, String objectType, GcGrouperSyncErrorCode errorCode, String errorDuration) retrieve list of errorsstatic List<GrouperProvisioningError>
retrieveProvisioningErrors
(String provisionerName, String objectType, GcGrouperSyncErrorCode errorCode, String errorDuration, String groupFilter, String entityFilter) retrieve list of errorsretrieveProvisioningErrorSummary
(String provisionerName, String objectType, GcGrouperSyncErrorCode errorCode, String errorDuration) retrieveProvisioningErrorSummary
(String provisionerName, String objectType, GcGrouperSyncErrorCode errorCode, String errorDuration, String groupFilter, String entityFilter) static List<GcGrouperSyncGroup>
retrieveRecentActivityForGroup
(String provisionerName) retrieve recent activity for all the groups for a given provisioner namestatic List<GcGrouperSyncMember>
retrieveRecentActivityForMember
(String provisionerName) retrieve recent activity for all the members for a given provisioner namestatic List<GcGrouperSyncMembership>
retrieveRecentActivityForMembership
(String provisionerName) retrieve recent activity for all the memberships for a given provisioner namestatic void
saveOrUpdateProvisioningAttributes
(GrouperProvisioningAttributeValue grouperProvisioningAttributeValue, Group group, Member member) save or update provisioning config for a given group, memberstatic void
saveOrUpdateProvisioningAttributes
(GrouperProvisioningAttributeValue grouperProvisioningAttributeValue, Member member) save or update provisioning config for a given memberstatic boolean
saveOrUpdateProvisioningAttributes
(GrouperProvisioningAttributeValue grouperProvisioningAttributeValue, GrouperObject grouperObject) save or update provisioning config for a given grouper object (group/stem)
-
Constructor Details
-
GrouperProvisioningService
public GrouperProvisioningService()
-
-
Method Details
-
findAllGroupsForTarget
find all groups provisionable in target- Parameters:
target
-- Returns:
- the groups
-
findAllGroupsForTargetAndGroupIds
public static Map<String,Group> findAllGroupsForTargetAndGroupIds(String target, Collection<String> groupIds) find all groups provisionable in target- Parameters:
target
-groupIds
-- Returns:
- the groupId to group map
-
findAllGroupIdsFromAttributeAssignIdsOnIds
public static Set<String> findAllGroupIdsFromAttributeAssignIdsOnIds(Set<String> attributeAssignIdsOnIdInput) find all groups provisionable in target- Parameters:
target
-attributeAssignIdsOnId
-- Returns:
- the groups
-
getProvisioningAttributeValue
public static GrouperProvisioningAttributeValue getProvisioningAttributeValue(GrouperObject grouperObject, String targetName) retrieve provisioning settings for a given grouper object (group/stem) and target name.- Parameters:
grouperObject
-targetName
-- Returns:
-
getProvisioningAttributeValue
public static GrouperProvisioningAttributeValue getProvisioningAttributeValue(GrouperObject grouperObject, String targetName, boolean onlyCalculateParent) retrieve provisioning setting for a given grouper object (group/stem) and target name.- Parameters:
grouperObject
-targetName
-onlyCalculateParent
-- Returns:
-
getProvisioningAttributeValue
public static GrouperProvisioningAttributeValue getProvisioningAttributeValue(Member member, String targetName) retrieve type setting for a given member and target name.- Parameters:
member
-targetName
-- Returns:
-
getProvisioningAttributeValues
retrieve all the configured provisioning attributes for a given member- Parameters:
member
-- Returns:
-
getProvisioningAttributeValue
public static GrouperProvisioningAttributeValue getProvisioningAttributeValue(Group group, Member member, String targetName) retrieve type setting for a given membership and target name.- Parameters:
group
-member
-targetName
-- Returns:
-
getProvisioningAttributeValues
public static List<GrouperProvisioningAttributeValue> getProvisioningAttributeValues(Group group, Member member) retrieve all the configured provisioning attributes for a given membership- Parameters:
group
-member
-- Returns:
-
getProvisioningAttributeValues
public static List<GrouperProvisioningAttributeValue> getProvisioningAttributeValues(GrouperObject grouperObject) retrieve all the configured provisioning attributes for a given grouper object (group/stem)- Parameters:
grouperObject
-- Returns:
-
getAttributeAssign
get provisioning attributes for a given grouper object and target name- Parameters:
grouperObject
-targetName
-- Returns:
-
buildGrouperProvisioningAttributeValue
public static GrouperProvisioningAttributeValue buildGrouperProvisioningAttributeValue(AttributeAssign attributeAssign) build provisioning attribute object from underlying info- Parameters:
attributeAssign
-- Returns:
-
saveOrUpdateProvisioningAttributes
public static void saveOrUpdateProvisioningAttributes(GrouperProvisioningAttributeValue grouperProvisioningAttributeValue, Member member) save or update provisioning config for a given member- Parameters:
grouperProvisioningAttributeValue
-member
-
-
saveOrUpdateProvisioningAttributes
public static void saveOrUpdateProvisioningAttributes(GrouperProvisioningAttributeValue grouperProvisioningAttributeValue, Group group, Member member) save or update provisioning config for a given group, member- Parameters:
grouperProvisioningAttributeValue
-membership
-
-
saveOrUpdateProvisioningAttributes
public static boolean saveOrUpdateProvisioningAttributes(GrouperProvisioningAttributeValue grouperProvisioningAttributeValue, GrouperObject grouperObject) save or update provisioning config for a given grouper object (group/stem)- Parameters:
grouperProvisioningAttributeValue
-grouperObject
-- Returns:
- if made changes
-
isTargetEditable
public static boolean isTargetEditable(GrouperProvisioningTarget target, Subject subject, GrouperObject grouperObject) is given target editable for given subject and grouper object- Parameters:
target
-subject
-grouperObject
-- Returns:
-
isTargetViewable
public static boolean isTargetViewable(GrouperProvisioningTarget target, Subject subject, GrouperObject grouperObject) is given target viewable for given subject and grouper object- Parameters:
target
-subject
-grouperObject
-- Returns:
-
deleteInvalidConfigs
public static int deleteInvalidConfigs()delete all the attribute assigns where the config doesn't exist -
deleteInvalidIndirectProvisioningAssignments
public static void deleteInvalidIndirectProvisioningAssignments() -
retrieveNumberOfGroupsInTargetInStem
get number of groups in a provisioning target that are in a given stem- Parameters:
stemId
-targetName
-- Returns:
-
retrieveNumberOfGroupsInTargetInMember
get number of groups in a provisioning target that also contain the given member- Parameters:
stemId
-targetName
-- Returns:
-
retrieveNumberOfUsersInTargetInStem
get number of users in a provisioning target that are in a given stem- Parameters:
stemId
-targetName
-- Returns:
-
retrieveNumberOfUsersInTargetInGroup
get number of users in a provisioning target that are in a given group- Parameters:
stemId
-targetName
-- Returns:
-
retrieveNumberOfMembershipsInTargetInStem
get number of memberships in a provisioning target that are in a given stem- Parameters:
stemId
-targetName
-- Returns:
-
retrieveProvisioningErrorSummary
public static GrouperProvisioningErrorSummary retrieveProvisioningErrorSummary(String provisionerName, String objectType, GcGrouperSyncErrorCode errorCode, String errorDuration) - Parameters:
provisionerName
-objectType
-errorCode
-errorDuration
-- Returns:
-
retrieveProvisioningErrorSummary
public static GrouperProvisioningErrorSummary retrieveProvisioningErrorSummary(String provisionerName, String objectType, GcGrouperSyncErrorCode errorCode, String errorDuration, String groupFilter, String entityFilter) - Parameters:
provisionerName
-objectType
-errorCode
-errorDuration
-groupFilter
-entityFilter
-- Returns:
-
retrieveProvisioningErrors
public static List<GrouperProvisioningError> retrieveProvisioningErrors(String provisionerName, String objectType, GcGrouperSyncErrorCode errorCode, String errorDuration) retrieve list of errors- Parameters:
provisionerName
-objectType
-errorCode
-errorDuration
-- Returns:
-
retrieveProvisioningErrors
public static List<GrouperProvisioningError> retrieveProvisioningErrors(String provisionerName, String objectType, GcGrouperSyncErrorCode errorCode, String errorDuration, String groupFilter, String entityFilter) retrieve list of errors- Parameters:
provisionerName
-objectType
-errorCode
-errorDuration
-groupFilter
-entityFilter
-- Returns:
-
retrieveAssignments
-
retrieveGroupsProvisionable
Deprecated.use retrieveGroupsProvisionable(String provisionerName, int limit)retrieve 100 groups that are provisionable forprovisionerName
- Parameters:
provisionerName
-- Returns:
-
retrieveGroupsProvisionable
retrieve groups that are provisionable forprovisionerName
- Parameters:
provisionerName
-limit
- pass in limit of groups or null for all- Returns:
- total record count and list of gc grouper sync groups
-
retrieveRecentActivityForGroup
retrieve recent activity for all the groups for a given provisioner name- Parameters:
provisionerName
-- Returns:
-
retrieveRecentActivityForMember
retrieve recent activity for all the members for a given provisioner name- Parameters:
provisionerName
-- Returns:
-
retrieveRecentActivityForMembership
public static List<GcGrouperSyncMembership> retrieveRecentActivityForMembership(String provisionerName) retrieve recent activity for all the memberships for a given provisioner name- Parameters:
provisionerName
-- Returns:
-
retrieveGcGrouperSyncMembers
get gc grouper sync members for a given member id- Parameters:
memberId
-- Returns:
-
retrieveGcGrouperGroup
retrieve grouper sync group- Parameters:
groupId
-provsionerName
-- Returns:
-
retrieveGcGrouperSyncMemberships
public static List<GcGrouperSyncMembership> retrieveGcGrouperSyncMemberships(String memberId, String groupId) get gc grouper sync memberships for a given member id and group id- Parameters:
memberId
-groupId
-- Returns:
-
retrieveGcGrouperSyncLogs
public static List<GcGrouperSyncLog> retrieveGcGrouperSyncLogs(String provisionerId, String groupId, QueryOptions queryOptions) retrieve gc grouper sync logs- Parameters:
provisionerId
-groupId
-queryOptions
-- Returns:
-
retrieveGcGroupSyncJobs
retrieve gc grouper sync jobs for a provisioner id- Parameters:
provisionerId
-- Returns:
-
retrieveGcGrouperSyncLogs
public static List<GrouperSyncLogWithOwner> retrieveGcGrouperSyncLogs(String provisionerId, QueryOptions queryOptions) retrieve gc grouper sync logs for a provisioner id- Parameters:
provisionerId
-queryOptions
-- Returns:
-
deleteAttributeAssign
delete provisioning attributes from a given grouper object and target- Parameters:
grouperObject
-targetName
-
-
calculateProvisioningAttributes
public static Map<String,GrouperProvisioningObjectAttributes> calculateProvisioningAttributes(GrouperProvisioner grouperProvisioner, Set<GrouperProvisioningObjectAttributes> grouperProvisioningObjectAttributesToProcess, Map<String, GrouperProvisioningObjectAttributes> grouperProvisioningFolderAttributes) - Parameters:
grouperProvisioner
-grouperProvisioningObjectAttributesToProcess
-grouperProvisioningFolderAttributes
-policyGroupIds
-- Returns:
- calculated provisioning attributes
-
retrieveGcGrouperSyncMembershipsByMemberIdAndInTargetStartTimeRange
public static List<GcGrouperSyncMembership> retrieveGcGrouperSyncMembershipsByMemberIdAndInTargetStartTimeRange(String memberId, Timestamp inTargetStartTimeFrom, Timestamp inTargetStartTimeTo) -
retrieveGcGrouperSyncMembershipsByMemberIdAndInTargetEndTimeRange
public static List<GcGrouperSyncMembership> retrieveGcGrouperSyncMembershipsByMemberIdAndInTargetEndTimeRange(String memberId, Timestamp inTargetEndTimeFrom, Timestamp inTargetEndTimeTo)
-