Class VoidProvisioner
java.lang.Object
edu.internet2.middleware.grouper.pspng.Provisioner<ProvisionerConfiguration,TargetSystemUser,TargetSystemGroup>
edu.internet2.middleware.grouper.pspng.VoidProvisioner
public class VoidProvisioner
extends Provisioner<ProvisionerConfiguration,TargetSystemUser,TargetSystemGroup>
This class doesn't do any provisioning, but just prints the methods being invoked.
This is useful to make PSPNG go through its motions or to use it to identify what methods
are called as events occur.
-
Field Summary
Fields inherited from class edu.internet2.middleware.grouper.pspng.Provisioner
activeProvisioner, config, fullSyncMode, LOG, provisionerConfigName, provisionerDisplayName
-
Method Summary
Modifier and TypeMethodDescriptionprotected void
addMembership
(GrouperGroupInfo grouperGroupInfo, TargetSystemGroup tsGroup, Subject subject, TargetSystemUser tsUser) Action method that handles membership additions where a person-subject is added to a group.protected TargetSystemGroup
createGroup
(GrouperGroupInfo grouperGroup, Collection initialMembers) Provisioning a new Group in the target system.protected void
deleteGroup
(GrouperGroupInfo grouperGroupInfo, TargetSystemGroup tsGroup) Action method that handles group removal.protected void
deleteMembership
(GrouperGroupInfo grouperGroupInfo, TargetSystemGroup tsGroup, Subject subject, TargetSystemUser tsUser) Abstract action method that handles membership removals.protected boolean
doFullSync
(GrouperGroupInfo grouperGroupInfo, TargetSystemGroup tsGroup, Set correctSubjects, Map tsUserMap, Set correctTSUsers, JobStatistics stats) This method's responsibility is to make sure that group's only provisioned memberships are those of correctSubjects.protected void
This method's responsibility is find extra groups within Grouper's responsibility that exist in the target system.protected Map
fetchTargetSystemGroups
(Collection grouperGroups) This fetches group information from the target system.protected Map<Subject,
TargetSystemUser> fetchTargetSystemUsers
(Collection personSubjects) This fetches user information from the target system.Methods inherited from class edu.internet2.middleware.grouper.pspng.Provisioner
allGroupsForProvisionerFromCache, allGroupsForProvisionerFromCacheClear, cacheGroup, checkAttributeDefinitions, createUser, evaluateJexlExpression, fetchTargetSystemGroup, fetchTargetSystemGroupsInBatches, fetchTargetSystemUser, filterWorkItems, filterWorkItems2, finishCoordination, finishProvisioningBatch, flushCachesIfNecessary, getAllGroupsForProvisioner, getAllGroupsForProvisioner2, getConfig, getConfigName, getCurrentWorkItem, getDisplayName, getGroupInfo, getGroupInfoOfExistingGroup, getGroupInfoOfExistingGroup, getGroupJexlMap, getJobStatistics, getPropertyClass, getSubject, getSubjectCacheKey, getSubjectCacheKey, getTargetSystemUser, groupNameToMillisAndProvisionable, isFullSyncMode, populateJexlMap, provisionBatchOfItems, provisionItem, setCurrentWorkItem, setJobStatistics, shouldGroupBeProvisioned, shouldGroupBeProvisionedConsiderCache, shouldLogAboutMissingSubjects, shouldWorkItemBeProcessed, startCoordination, startProvisioningBatch, toString, uncacheAllGroups, uncacheGroup, warnAboutCacheSizeConcerns, workItemMightChangeGroupSelection
-
Method Details
-
addMembership
protected void addMembership(GrouperGroupInfo grouperGroupInfo, TargetSystemGroup tsGroup, Subject subject, TargetSystemUser tsUser) throws PspException Description copied from class:Provisioner
Action method that handles membership additions where a person-subject is added to a group. The top-level Provisioner class implementation is abstract, and, of course, this method is expected to be overridden by every provisioner subclass to accomplish something useful.- Specified by:
addMembership
in classProvisioner<ProvisionerConfiguration,
TargetSystemUser, TargetSystemGroup> - Parameters:
grouperGroupInfo
- The group to which the subject needs to be added as a membertsGroup
- A TSGroupClass created for group by fetchTargetSystemGroup. This will be null for systems that do not need target system groups.subject
- The (person) subject that needs to be provisioned as a member of 'group'tsUser
- A TSUserClass created for the subject by fetchTargetSystemUser. This will be null for systems that do not need target system users.- Throws:
PspException
-
deleteMembership
protected void deleteMembership(GrouperGroupInfo grouperGroupInfo, TargetSystemGroup tsGroup, Subject subject, TargetSystemUser tsUser) throws PspException Description copied from class:Provisioner
Abstract action method that handles membership removals. Note: This method is called for MembershipDelete events for a non-group member.- Specified by:
deleteMembership
in classProvisioner<ProvisionerConfiguration,
TargetSystemUser, TargetSystemGroup> - Parameters:
grouperGroupInfo
- The group to which the subject needs to be removed as a membertsGroup
- TSGroupClass for the 'group.' This is null for systems that do not need target-system group infosubject
- The subject that needs to be deprovisioned as a member of 'group'tsUser
- TSUserClass for the 'subject.' This is null for systems that do not need target-system user info- Throws:
PspException
-
createGroup
protected TargetSystemGroup createGroup(GrouperGroupInfo grouperGroup, Collection initialMembers) throws PspException Description copied from class:Provisioner
Provisioning a new Group in the target system. This must be overridden in provisioner subclasses that support creating groups. This will normally be called (with an empty members parameter) when provisioning-enabled groups are created in Grouper. However, when an empty group cannot be created (eg, an ldap group that _requires_ members) or when members are somehow already known, this may be called with a (non-empty) list of members.- Specified by:
createGroup
in classProvisioner<ProvisionerConfiguration,
TargetSystemUser, TargetSystemGroup> initialMembers
- What members should in the provisioned group once the method completes. This is generally empty during incremental/changelog-based provisioning, but may list users at other times.- Returns:
- Throws:
PspException
-
deleteGroup
protected void deleteGroup(GrouperGroupInfo grouperGroupInfo, TargetSystemGroup tsGroup) throws PspException Description copied from class:Provisioner
Action method that handles group removal. The top-level Provisioner class implementation does nothing except log an error if the target system needs groups. This is expected to be overridden by subclasses if the target system needs groups, and do not call the super.deleteGroup version of this when you override it this- Specified by:
deleteGroup
in classProvisioner<ProvisionerConfiguration,
TargetSystemUser, TargetSystemGroup> - Throws:
PspException
-
fetchTargetSystemUsers
protected Map<Subject,TargetSystemUser> fetchTargetSystemUsers(Collection personSubjects) throws PspException Description copied from class:Provisioner
This fetches user information from the target system. Subclasses that have TSUserClass information need to override this. Subclasses that do not have TSUserClass should implement this so it returns either an empty map (Collections.EMPTY_MAP) or null. Note: The signature of this method is designed for batch fetching. If you cannot fetch batches of information, then loop through the provided users and build a resulting map.- Specified by:
fetchTargetSystemUsers
in classProvisioner<ProvisionerConfiguration,
TargetSystemUser, TargetSystemGroup> - Returns:
- Throws:
PspException
-
fetchTargetSystemGroups
Description copied from class:Provisioner
This fetches group information from the target system. Subclasses that have TSGroupClass information need to override this. Subclasses that do not need TSGroupClass information should just return either an empty map (Collections.EMPTY_MAP) or null;. Note: The signature of this method is designed for batch fetching. If you cannot fetch batches of information, then loop through the provided groups and build a resulting map.- Specified by:
fetchTargetSystemGroups
in classProvisioner<ProvisionerConfiguration,
TargetSystemUser, TargetSystemGroup> - Returns:
- Throws:
PspException
-
doFullSync_cleanupExtraGroups
Description copied from class:Provisioner
This method's responsibility is find extra groups within Grouper's responsibility that exist in the target system. These extra groups should be removed. Note: This is only called when grouperIsAuthoritative=true in the provisioner's properties. To avoid deleting newly created groups, implementations should follow the following: 1) Read all the provisioned information 2) Read all the groups that should be provisioned (getAllGroupsForProvisioner()) 3) Fetch group information from system (fetchTargetSystemGroupsInBatches(allGroupsForProvisioner) (if TSGroup objects are relevant) 4) Compare (1) & (3) and delete anything extra in (1)- Specified by:
doFullSync_cleanupExtraGroups
in classProvisioner<ProvisionerConfiguration,
TargetSystemUser, TargetSystemGroup> - Throws:
PspException
-
doFullSync
protected boolean doFullSync(GrouperGroupInfo grouperGroupInfo, TargetSystemGroup tsGroup, Set correctSubjects, Map tsUserMap, Set correctTSUsers, JobStatistics stats) throws PspException Description copied from class:Provisioner
This method's responsibility is to make sure that group's only provisioned memberships are those of correctSubjects. Extra subjects should be removed. Before this is called, the following have occurred: -a ProvisioningWorkItem was created representing the whole Full Sync, and it was marked as the current provisioning item -StartProvisioningBatch was called -TSGroupClass- and TSUserClass-caches are populated with the group and CORRECT Subjects Also, remember that fullSyncMode=true for provisioners doing full-sync, so TargetSystemUsers and TargetSystemGroups should have the extra information needed to facilitate full syncs.- Specified by:
doFullSync
in classProvisioner<ProvisionerConfiguration,
TargetSystemUser, TargetSystemGroup> - Parameters:
grouperGroupInfo
- Grouper group to fully synchronize with target systemtsGroup
- TSGroupClass that maps to group.correctSubjects
- What subjects are members in the Grouper RegistrytsUserMap
- Map of TargetSystemUsers which map to the correctSubjects. This will be empty for provisioners that do not use TargetSystemUsers.correctTSUsers
- A list of the TSUsers that correspond to correctSubjects. This might be a subset of the TSUsers in the tsUserMap.stats
- A holder of the number of changes the fullSync performs- Returns:
- True when changes were made to target system
- Throws:
PspException
-