Class GrouperProvisioningService

java.lang.Object
edu.internet2.middleware.grouper.app.provisioning.GrouperProvisioningService

public class GrouperProvisioningService extends Object
  • Constructor Details

    • GrouperProvisioningService

      public GrouperProvisioningService()
  • Method Details

    • findAllGroupsForTarget

      public static Set<Group> findAllGroupsForTarget(String target)
      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

      public static List<GrouperProvisioningAttributeValue> getProvisioningAttributeValues(Member member)
      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

      public static AttributeAssign getAttributeAssign(GrouperObject grouperObject, String targetName)
      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

      public static long retrieveNumberOfGroupsInTargetInStem(String stemId, String targetName)
      get number of groups in a provisioning target that are in a given stem
      Parameters:
      stemId -
      targetName -
      Returns:
    • retrieveNumberOfGroupsInTargetInMember

      public static long retrieveNumberOfGroupsInTargetInMember(String memberId, String targetName)
      get number of groups in a provisioning target that also contain the given member
      Parameters:
      stemId -
      targetName -
      Returns:
    • retrieveNumberOfUsersInTargetInStem

      public static long retrieveNumberOfUsersInTargetInStem(String stemId, String targetName)
      get number of users in a provisioning target that are in a given stem
      Parameters:
      stemId -
      targetName -
      Returns:
    • retrieveNumberOfUsersInTargetInGroup

      public static long retrieveNumberOfUsersInTargetInGroup(String groupId, String targetName)
      get number of users in a provisioning target that are in a given group
      Parameters:
      stemId -
      targetName -
      Returns:
    • retrieveNumberOfMembershipsInTargetInStem

      public static long retrieveNumberOfMembershipsInTargetInStem(String stemId, String targetName)
      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

      public static List<Object[]> retrieveAssignments(String provisionerName)
    • retrieveGroupsProvisionable

      @Deprecated public static MultiKey retrieveGroupsProvisionable(String provisionerName)
      Deprecated.
      use retrieveGroupsProvisionable(String provisionerName, int limit)
      retrieve 100 groups that are provisionable for
      provisionerName
      Parameters:
      provisionerName -
      Returns:
    • retrieveGroupsProvisionable

      public static MultiKey retrieveGroupsProvisionable(String provisionerName, Integer limit)
      retrieve groups that are provisionable for
      provisionerName
      Parameters:
      provisionerName -
      limit - pass in limit of groups or null for all
      Returns:
      total record count and list of gc grouper sync groups
    • retrieveRecentActivityForGroup

      public static List<GcGrouperSyncGroup> retrieveRecentActivityForGroup(String provisionerName)
      retrieve recent activity for all the groups for a given provisioner name
      Parameters:
      provisionerName -
      Returns:
    • retrieveRecentActivityForMember

      public static List<GcGrouperSyncMember> retrieveRecentActivityForMember(String provisionerName)
      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

      public static List<GcGrouperSyncMember> retrieveGcGrouperSyncMembers(String memberId)
      get gc grouper sync members for a given member id
      Parameters:
      memberId -
      Returns:
    • retrieveGcGrouperGroup

      public static GcGrouperSyncGroup retrieveGcGrouperGroup(String groupId, String provsionerName)
      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

      public static List<GcGrouperSyncJob> retrieveGcGroupSyncJobs(String provisionerId)
      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

      public static void deleteAttributeAssign(GrouperObject grouperObject, String targetName)
      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)