Class GrouperDataProviderLogic
java.lang.Object
edu.internet2.middleware.grouper.app.dataProvider.GrouperDataProviderLogic
-
Field Summary
FieldsModifier and TypeFieldDescriptionlast debug map from the most recent full sync, for testing purposes only. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic Stringstatic Stringstatic voiddeleteOldDataFieldRowHistory(StringBuilder jobMessage, Hib3GrouperLoaderLog hib3GrouploaderLog) delete old data field and data row history records based on configured retention.voidsetGrouperDataProvider(GrouperDataProvider grouperDataProvider) voidsetGrouperDataProviderSync(GrouperDataProviderSync grouperDataProviderSync) voidsyncFull()run a full sync for this data provider.voidrun an incremental sync for this data provider.voidsyncSubjects(Set<String> subjectIds, Set<String> subjectIdentifiers, Map<String, Set<String>> sourceToSubjectIds, Map<String, Set<String>> sourceToSubjectIdentifiers) sync specific subjects for this data provider (e.g. from a web service call).
-
Field Details
-
testingDebugMap
last debug map from the most recent full sync, for testing purposes only. set at the end of syncFull() so tests can inspect accumulated counts and change examples.
-
-
Constructor Details
-
GrouperDataProviderLogic
public GrouperDataProviderLogic()
-
-
Method Details
-
setGrouperDataProviderSync
-
setGrouperDataProvider
-
dataProviderStemName
- Returns:
- the stem name
-
dataProviderSubjectListSyncAllowedGroupName
- Returns:
- the group name
-
syncFull
public void syncFull()run a full sync for this data provider. retrieves distinct subject ids from all source queries and from grouper, unions them into one sorted list, and processes in batches of configurable size. each batch loads source data and grouper data for that range, compares, and writes changes. after all batches, any missed subject ids are processed as a straggler pass. -
syncIncremental
public void syncIncremental()run an incremental sync for this data provider. queries the change log to find subjects that changed since the last sync, then loads and processes only those subjects. -
syncSubjects
public void syncSubjects(Set<String> subjectIds, Set<String> subjectIdentifiers, Map<String, Set<String>> sourceToSubjectIds, Map<String, Set<String>> sourceToSubjectIdentifiers) sync specific subjects for this data provider (e.g. from a web service call). loads config and then delegates to the incremental sync logic for the given subjects.- Parameters:
subjectIds- subject ids to sync (no source specified)subjectIdentifiers- subject identifiers to sync (no source specified)sourceToSubjectIds- subject ids keyed by source idsourceToSubjectIdentifiers- subject identifiers keyed by source id
-
deleteOldDataFieldRowHistory
public static void deleteOldDataFieldRowHistory(StringBuilder jobMessage, Hib3GrouperLoaderLog hib3GrouploaderLog) delete old data field and data row history records based on configured retention. called from OTHER_JOB_cleanLogs (GrouperDaemonDeleteOldRecords)- Parameters:
jobMessage-hib3GrouploaderLog-
-