Class FreshRequesterProvisioningTargetNativeSync
GrouperProvisioningTargetNativeSync: builds native target
reporting beans for sync-back to the generic grouper_prov_group / grouper_prov_user tables.
Both groups and users are captured from the raw Freshservice JSON (JSON Pointer
paths, like SCIM / Adobe / Google / Duo), hooked at the API-commands seam
(FreshRequesterApiCommands.retrieveRequesterGroups/retrieveRequesterGroup and the
retrieveRequesterUsers/retrieveRequesterUserById/retrieveRequesterUserByEmail/
retrieveRequesterUserByAttribute read methods) where the full per-object JSON node is in
scope. This avoids losing any Freshservice field that the FreshRequesterGroup /
FreshRequesterUser typed beans do not model; operators can capture any JSON field via
nativeAttributesGroups / nativeAttributesEntities with a name and optional
JSON-Pointer path.
The captured node is the inner object of the Freshservice envelope -- the read methods
unwrap {"requester_group": {...}} / {"requester": {...}} / the elements of
{"requester_groups":[...]} / {"requesters":[...]} -- so the default JSON pointers
below are relative to that inner object (e.g. /name, /primary_email, and the
target-id at /id), exactly the shape FreshRequesterGroup.fromJson /
FreshRequesterUser.fromJson parse.
Memberships are still group-centric: derived from the per-group member listing as typed
FreshRequesterUser beans during DAO translation (captureMembershipsForGroup(java.lang.String, java.util.List<edu.internet2.middleware.grouper.app.freshServiceRequester.FreshRequesterUser>)) --
the same situation as Adobe -- so only the group/user object capture is JSON-based; membership
capture is unchanged.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbuildNativeGroupFromJson(com.fasterxml.jackson.databind.JsonNode groupNode) Build a native group bean from the raw Freshservice requester-group JSON (inner of therequester_group/requester_groupsenvelope).buildNativeUserFromJson(com.fasterxml.jackson.databind.JsonNode userNode) Build a native user bean from the raw Freshservice requester JSON (inner of therequester/requestersenvelope).voidcaptureGroupJson(com.fasterxml.jackson.databind.JsonNode groupNode) Build + record a FreshRequester group from its raw JSON.static voidcaptureGroupJsonFromCurrentProvisioner(com.fasterxml.jackson.databind.JsonNode groupNode) Capture a FreshRequester group (from its raw inner JSON) against the current provisioner's sync.static voidcaptureMembershipDeleteFromCurrentProvisioner(String groupTargetId, String userTargetId) Write-track a successful FreshRequester membership remove (removeGroupMembership) against the current provisioner: drop(groupTargetId, userTargetId)from the native membership map so the end-of-run flush deletes its grouper_prov_mship row.static voidcaptureMembershipInsertFromCurrentProvisioner(String groupTargetId, String userTargetId) Write-track a successful FreshRequester membership add (addGroupMembership) against the current provisioner: record(groupTargetId, userTargetId)in the native membership map so the end-of-run flush keeps grouper_prov_mship current (GRP-7048 "memberships from sync-back cache" relies on this).voidcaptureMembershipsForGroup(String targetGroupId, List<FreshRequesterUser> members) Translate a list of FreshRequester users known to be members oftargetGroupIdinto native membership beans, and record them.static voidcaptureMembershipsForGroupForCurrentProvisioner(String targetGroupId, List<FreshRequesterUser> members) Capture memberships for the given target group id against the current provisioner's sync.voidcaptureUserJson(com.fasterxml.jackson.databind.JsonNode userNode) Build + record a FreshRequester user from its raw JSON.static voidcaptureUserJsonFromCurrentProvisioner(com.fasterxml.jackson.databind.JsonNode userNode) Capture a FreshRequester user (from its raw inner JSON) against the current provisioner's sync.protected List<GrouperProvisioningNativeAttributeConfig>Per-protocol sensible-default attribute list for entities (users) when the operator hasn't configurednativeAttributesEntities.protected List<GrouperProvisioningNativeAttributeConfig>Per-protocol sensible-default attribute list for groups.Methods inherited from class edu.internet2.middleware.grouper.app.provisioning.GrouperProvisioningTargetNativeSync
clearSyncBackGroupForDelete, clearSyncBackGroupForRead, clearSyncBackUserForDelete, clearSyncBackUserForRead, configuredNativeAttributeConfigsEntities, configuredNativeAttributeConfigsGroups, effectiveNativeAttributeConfigsEntities, effectiveNativeAttributeConfigsGroups, getGrouperProvisioner, grouperToNativeNameExceptionsEntities, grouperToNativeNameExceptionsGroups, markSyncBackGroupForDelete, markSyncBackGroupForRead, markSyncBackUserForDelete, markSyncBackUserForRead, recordTargetNativeGroup, recordTargetNativeGroupWrite, recordTargetNativeMembershipDelete, recordTargetNativeMembershipInsert, recordTargetNativeMembershipReplace, recordTargetNativeMemberships, recordTargetNativeUser, recordTargetNativeUserWrite, removeTargetNativeGroup, removeTargetNativeUser, setGrouperProvisioner
-
Constructor Details
-
FreshRequesterProvisioningTargetNativeSync
public FreshRequesterProvisioningTargetNativeSync()
-
-
Method Details
-
getDefaultNativeAttributeConfigsEntities
Description copied from class:GrouperProvisioningTargetNativeSyncPer-protocol sensible-default attribute list for entities (users) when the operator hasn't configurednativeAttributesEntities. Override in protocol subclasses to return a curated list (e.g. SCIM core schema fields). Default is empty — for LDAP this means "no extra capture beyond what the regular target query returned," which is the historical behavior.- Overrides:
getDefaultNativeAttributeConfigsEntitiesin classGrouperProvisioningTargetNativeSync
-
getDefaultNativeAttributeConfigsGroups
Description copied from class:GrouperProvisioningTargetNativeSyncPer-protocol sensible-default attribute list for groups. SeeGrouperProvisioningTargetNativeSync.getDefaultNativeAttributeConfigsEntities().- Overrides:
getDefaultNativeAttributeConfigsGroupsin classGrouperProvisioningTargetNativeSync
-
buildNativeGroupFromJson
public GrouperProvisioningTargetNativeGroup buildNativeGroupFromJson(com.fasterxml.jackson.databind.JsonNode groupNode) Build a native group bean from the raw Freshservice requester-group JSON (inner of therequester_group/requester_groupsenvelope).targetIdis read from/id-- the same fieldFreshRequesterGroup.fromJson(com.fasterxml.jackson.databind.JsonNode)used for the bean id; the attributes map is populated for each entry inGrouperProvisioningTargetNativeSync.effectiveNativeAttributeConfigsGroups()(operator-configured or default) by JSON Pointer. Returns null when the JSON is missing or has noid. -
buildNativeUserFromJson
public GrouperProvisioningTargetNativeUser buildNativeUserFromJson(com.fasterxml.jackson.databind.JsonNode userNode) Build a native user bean from the raw Freshservice requester JSON (inner of therequester/requestersenvelope).targetIdis read from/id-- the same fieldFreshRequesterUser.fromJson(com.fasterxml.jackson.databind.JsonNode)used for the bean id; the attributes map is populated for each entry inGrouperProvisioningTargetNativeSync.effectiveNativeAttributeConfigsEntities()(operator-configured or default) by JSON Pointer. Returns null when the JSON is missing or has noid. -
captureGroupJson
public void captureGroupJson(com.fasterxml.jackson.databind.JsonNode groupNode) Build + record a FreshRequester group from its raw JSON. No-op when sync-back is off or id-less. -
captureUserJson
public void captureUserJson(com.fasterxml.jackson.databind.JsonNode userNode) Build + record a FreshRequester user from its raw JSON. No-op when sync-back is off or id-less. -
captureMembershipsForGroup
Translate a list of FreshRequester users known to be members oftargetGroupIdinto native membership beans, and record them. No-op when sync-back is off or input is empty.Unchanged by the move to raw-JSON object capture: Freshservice memberships are group-centric (the per-group member listing returns the member users), so they are still derived from the typed
FreshRequesterUserbeans the DAO already has in hand -- the same situation as Adobe's user-groupsderivation. -
captureGroupJsonFromCurrentProvisioner
public static void captureGroupJsonFromCurrentProvisioner(com.fasterxml.jackson.databind.JsonNode groupNode) Capture a FreshRequester group (from its raw inner JSON) against the current provisioner's sync. No-op if there's no current provisioner or the active provisioner isn't a FreshRequester one. Called from the commands read seams (retrieveRequesterGroups/retrieveRequesterGroup) where the per-group JSON node is in scope. -
captureUserJsonFromCurrentProvisioner
public static void captureUserJsonFromCurrentProvisioner(com.fasterxml.jackson.databind.JsonNode userNode) Capture a FreshRequester user (from its raw inner JSON) against the current provisioner's sync. No-op if there's no current provisioner or the active provisioner isn't a FreshRequester one. Called from the commands read seams (retrieveRequesterUsers/retrieveRequesterUserById/retrieveRequesterUserByEmail/retrieveRequesterUserByAttribute). -
captureMembershipsForGroupForCurrentProvisioner
public static void captureMembershipsForGroupForCurrentProvisioner(String targetGroupId, List<FreshRequesterUser> members) Capture memberships for the given target group id against the current provisioner's sync. Group-centric (seecaptureMembershipsForGroup(java.lang.String, java.util.List<edu.internet2.middleware.grouper.app.freshServiceRequester.FreshRequesterUser>)); unchanged by the JSON object-capture move. -
captureMembershipInsertFromCurrentProvisioner
public static void captureMembershipInsertFromCurrentProvisioner(String groupTargetId, String userTargetId) Write-track a successful FreshRequester membership add (addGroupMembership) against the current provisioner: record(groupTargetId, userTargetId)in the native membership map so the end-of-run flush keeps grouper_prov_mship current (GRP-7048 "memberships from sync-back cache" relies on this). Unlike groups/users, memberships are tracked purely from our own successful write here -- never re-read -- so this must be called only on the DAO success path. No-op out of cycle, for a non-FreshRequester provisioner, or when membership sync-back is off (the underlyingrecordTargetNativeMembershipInsertis guarded). -
captureMembershipDeleteFromCurrentProvisioner
public static void captureMembershipDeleteFromCurrentProvisioner(String groupTargetId, String userTargetId) Write-track a successful FreshRequester membership remove (removeGroupMembership) against the current provisioner: drop(groupTargetId, userTargetId)from the native membership map so the end-of-run flush deletes its grouper_prov_mship row. Must be called only on the DAO success path. No-op out of cycle, for a non-FreshRequester provisioner, or when membership sync-back is off (the underlyingrecordTargetNativeMembershipDeleteis guarded).
-