Class GrouperProvisioningLogic

java.lang.Object
edu.internet2.middleware.grouper.app.provisioning.GrouperProvisioningLogic
Direct Known Subclasses:
LdapSyncLogic

public class GrouperProvisioningLogic extends Object
does the logic to use the data from the DAOs and call the correct methods to synnc things up or dry run or send messages for async
  • Constructor Details

    • GrouperProvisioningLogic

      public GrouperProvisioningLogic()
  • Method Details

    • provision

      public void provision()
    • provisionFull

      public void provisionFull()
    • identifyTargetValuesThatExistInGrouper

      public void identifyTargetValuesThatExistInGrouper()
    • assignRecalcForGroupsAndEntities

      public void assignRecalcForGroupsAndEntities()
    • retrieveFullIndividualTargetGroupsAndEntities

      public void retrieveFullIndividualTargetGroupsAndEntities()
    • retrieveFullIndividualTargetMemberships

      public void retrieveFullIndividualTargetMemberships()
    • validateAndThrowExceptionIfInvalid

      public void validateAndThrowExceptionIfInvalid()
    • loadEntityAttributesDataToGrouper

      public void loadEntityAttributesDataToGrouper()
    • loadDataToGrouper

      public void loadDataToGrouper()
    • loadEntityDataToGrouper

      public void loadEntityDataToGrouper()
    • loadGroupDataToGrouper

      public void loadGroupDataToGrouper()
    • loadMembershipDataToGrouper

      public void loadMembershipDataToGrouper()
    • getRetrieveDataStartMillisSince1970

      public long getRetrieveDataStartMillisSince1970()
      when data was retrieved (i.e. when the group syncs start)
      Returns:
      when data retrieved
    • retrieveIndividualTargetEntitiesIfNeeded

      public List<ProvisioningEntity> retrieveIndividualTargetEntitiesIfNeeded()
    • retrieveIndividualTargetGroupsIfNeeded

      public List<ProvisioningGroup> retrieveIndividualTargetGroupsIfNeeded()
    • clearInvalidErrors

      public void clearInvalidErrors()
    • provisionIncremental

      public void provisionIncremental()
    • logCompareCalculationsHelper

      public void logCompareCalculationsHelper(String label, ProvisioningUpdatable provisioningUpdatable, List<ProvisioningMembership> membershipsForReplace)
    • logCompareCalculationsPreCompare

      public void logCompareCalculationsPreCompare()
    • logCompareCalculationsPostCompare

      public void logCompareCalculationsPostCompare()
    • errorHandlingHandleError

      public boolean errorHandlingHandleError(Map<MultiKey,Integer> objectTypeErrorCodeToCount, ProvisioningUpdatableWrapper provisioningUpdatableWrapper, GcGrouperSyncErrorCode gcGrouperSyncErrorCode, String errorMessage, Exception exception)
      Parameters:
      objectTypeErrorCodeToCount -
      gcGrouperSyncErrorCode -
      Returns:
      true if error
    • errorHandling

      public void errorHandling()
    • storeAllSyncObjects

      public void storeAllSyncObjects()
    • runFullSyncFromIncremental

      public void runFullSyncFromIncremental()
    • createMissingGroupsFull

      public void createMissingGroupsFull()
    • translateAndManipulateMembershipsForGroupsEntitiesCreate

      public void translateAndManipulateMembershipsForGroupsEntitiesCreate()
    • registerRetrievedGroups

      public void registerRetrievedGroups(List<ProvisioningGroup> grouperTargetGroups, List<ProvisioningGroup> targetProvisioningGroups)
      Parameters:
      grouperTargetGroups -
      targetProvisioningGroups -
    • registerRetrievedEntities

      public void registerRetrievedEntities(List<ProvisioningEntity> grouperTargetEntities, List<ProvisioningEntity> targetProvisioningEntities)
      Parameters:
      grouperTargetEntitiesToInsert -
      targetProvisioningEntities -
    • createMissingEntitiesFull

      public void createMissingEntitiesFull()
    • retrieveAllData

      public void retrieveAllData()
      retrieve all data from both sides, grouper and target, do this in a thread
    • enhanceGroupAttributesWithSqlResolver

      public void enhanceGroupAttributesWithSqlResolver(boolean isFullSync)
    • enhanceEntityAttributesWithSqlResolver

      public void enhanceEntityAttributesWithSqlResolver(boolean isFullSync)
    • enhanceEntityAttributesWithLdapResolver

      public void enhanceEntityAttributesWithLdapResolver(boolean isFullSync)
    • retrieveExtraTargetData

      public GrouperProvisioningLists retrieveExtraTargetData(GrouperProvisioningLists grouperProvisioningLists)
      override this method to do some logic after all target data is retrieved (e.g. if there are DN overrides)
      Parameters:
      grouperProvisioningLists - grouper data to get extra target data from
      Returns:
      newly selected data
    • processTargetDataGroups

      public void processTargetDataGroups(List<ProvisioningGroup> targetProvisioningGroups, boolean isExtra)
      take target data and add wrapper and add to data store. put them in wrappers irrespective of matching or whatever
      Parameters:
      targetProvisioningGroups -
      isExtra - true if this is like a dn override, an extra group that needs retrieved
      targetProvisioningLists -
    • processTargetDataEntities

      public void processTargetDataEntities(List<ProvisioningEntity> targetProvisioningEntities, boolean isExtra)
      take target data and add wrapper and add to data store. put them in wrappers irrespective of matching or whatever
      Parameters:
      targetProvisioningEntities -
      isExtra - true if this is an extra entity i.e. once not in the base ou with dn override
    • processTargetDataMemberships

      public void processTargetDataMemberships(List<ProvisioningMembership> targetProvisioningMemberships, boolean isExtra)
      take target data and add wrapper and add to data store. put them in wrappers irrespective of matching or whatever
      Parameters:
      targetProvisioningMemberships -
      isExtra - if these are from a group or entity with dn override or outside of normal search
    • retrieveGrouperDataIncrementalGroupsEntities

      public void retrieveGrouperDataIncrementalGroupsEntities(String logLabel)
    • retrieveGrouperDataIncrementalMemberships

      public void retrieveGrouperDataIncrementalMemberships()
    • countInsertsUpdatesDeletes

      protected void countInsertsUpdatesDeletes()
    • countAttributesFieldsInsertsUpdatesDeletes

      protected void countAttributesFieldsInsertsUpdatesDeletes(ProvisioningObjectChangeAction provisioningObjectChangeAction, List<? extends ProvisioningUpdatable> provisioningUpdatables)
    • getGrouperProvisioner

      public GrouperProvisioner getGrouperProvisioner()
      reference back up to the provisioner
      Returns:
      the provisioner
    • setGrouperProvisioner

      public void setGrouperProvisioner(GrouperProvisioner grouperProvisioner1)
      reference back up to the provisioner
      Parameters:
      grouperProvisioner1 -
    • calculateProvisioningDataToDelete

      public void calculateProvisioningDataToDelete()
    • calculateProvisioningEntitiesToDelete

      public void calculateProvisioningEntitiesToDelete()
      take the sync members and see which ones do not correspond to a grouper member
    • calculateProvisioningGroupsToDelete

      public void calculateProvisioningGroupsToDelete()
      take the sync groups and see which ones do not correspond to a grouper group
    • calculateProvisioningMembershipsToDelete

      public void calculateProvisioningMembershipsToDelete()
      take the sync groups and see which ones do not correspond to a grouper group
    • retrieveMissingObjectsIncremental

      public void retrieveMissingObjectsIncremental()
      if incremental, and there are missing groups or entities, then retrieve them
    • retrieveMissingGroupsIncremental

      public void retrieveMissingGroupsIncremental()
      if incremental, and there are missing groups or entities, then retrieve them
    • retrieveIndividualMissingGroups

      public void retrieveIndividualMissingGroups()
    • retrieveMissingEntitiesIncremental

      public void retrieveMissingEntitiesIncremental()
      if incremental, and there are missing groups or entities, then retrieve them
    • retrieveIndividualMissingEntities

      public void retrieveIndividualMissingEntities()
    • retrieveIndividualTargetMembershipsIfNeeded

      public List<ProvisioningMembership> retrieveIndividualTargetMembershipsIfNeeded()