Class TeamDynamixProvisioningTargetNativeSync

java.lang.Object
edu.internet2.middleware.grouper.app.provisioning.GrouperProvisioningTargetNativeSync
edu.internet2.middleware.grouper.app.teamDynamix.TeamDynamixProvisioningTargetNativeSync

public class TeamDynamixProvisioningTargetNativeSync extends GrouperProvisioningTargetNativeSync
TeamDynamix-specific 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 TeamDynamix JSON (JSON Pointer paths, like SCIM/Adobe), hooked at the API-commands seam (TeamDynamixApiCommands) where the full JSON node is in scope. This avoids losing any TeamDynamix field that the TeamDynamixGroup / TeamDynamixUser typed beans do not model; operators can capture any JSON field via nativeAttributesGroups / nativeAttributesEntities with a name and optional JSON-Pointer path.

TeamDynamix JSON uses PascalCase keys (Name, PrimaryEmail, IsActive, ...) and reads the object id from ID (groups) / UID (users), matching what TeamDynamixGroup.fromJson(com.fasterxml.jackson.databind.JsonNode) / TeamDynamixUser.fromJson(com.fasterxml.jackson.databind.JsonNode) parse. The default capture lists therefore carry explicit JSON-Pointer paths so the stored attribute keys stay friendly (name, userName, primaryEmail, active) while reading the PascalCase source fields.

Memberships capture on BOTH paths. On the READ path they are derived from the typed beans during DAO translation (captureMembershipsForGroup(java.lang.String, java.util.List<edu.internet2.middleware.grouper.app.teamDynamix.TeamDynamixUser>)): TeamDynamix membership is group-centric (the members of a group are retrieved per-group, not inline with a user object), so -- as with Adobe -- only the group/user object capture moved to raw JSON; the read-side membership capture is unchanged. On the WRITE path a membership add/remove is recorded into the native mirror at the moment of the write: TeamDynamixTargetDao.insertMemberships(edu.internet2.middleware.grouper.app.provisioning.targetDao.TargetDaoInsertMembershipsRequest) / deleteMemberships call captureMembershipInsertFromCurrentProvisioner(java.lang.String, java.lang.String) / captureMembershipDeleteFromCurrentProvisioner(java.lang.String, java.lang.String), which invoke GrouperProvisioningTargetNativeSync.recordTargetNativeMembershipInsert(java.lang.String, java.lang.String) / GrouperProvisioningTargetNativeSync.recordTargetNativeMembershipDelete(java.lang.String, java.lang.String). So, like Adobe/SCIM, TeamDynamix is a capture-on-write target for memberships and a membership change converges on the write pass (the group/user OBJECTS still capture on the read path).

  • Constructor Details

    • TeamDynamixProvisioningTargetNativeSync

      public TeamDynamixProvisioningTargetNativeSync()
  • Method Details

    • getDefaultNativeAttributeConfigsEntities

      protected List<GrouperProvisioningNativeAttributeConfig> getDefaultNativeAttributeConfigsEntities()
      Description copied from class: GrouperProvisioningTargetNativeSync
      Per-protocol sensible-default attribute list for entities (users) when the operator hasn't configured nativeAttributesEntities. 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:
      getDefaultNativeAttributeConfigsEntities in class GrouperProvisioningTargetNativeSync
    • getDefaultNativeAttributeConfigsGroups

      protected List<GrouperProvisioningNativeAttributeConfig> getDefaultNativeAttributeConfigsGroups()
      Description copied from class: GrouperProvisioningTargetNativeSync
      Per-protocol sensible-default attribute list for groups. See GrouperProvisioningTargetNativeSync.getDefaultNativeAttributeConfigsEntities().
      Overrides:
      getDefaultNativeAttributeConfigsGroups in class GrouperProvisioningTargetNativeSync
    • buildNativeGroupFromJson

      public GrouperProvisioningTargetNativeGroup buildNativeGroupFromJson(com.fasterxml.jackson.databind.JsonNode groupNode)
      Build a native group bean from the raw TeamDynamix group JSON. targetId is read from /ID (the same field TeamDynamixGroup.fromJson(com.fasterxml.jackson.databind.JsonNode) uses for the bean id); the attributes map is populated for each entry in GrouperProvisioningTargetNativeSync.effectiveNativeAttributeConfigsGroups() (operator-configured or default) by JSON Pointer. Returns null when the JSON is missing or has no ID.
    • buildNativeUserFromJson

      public GrouperProvisioningTargetNativeUser buildNativeUserFromJson(com.fasterxml.jackson.databind.JsonNode userNode)
      Build a native user bean from the raw TeamDynamix user JSON. targetId is read from /UID (the same field TeamDynamixUser.fromJson(com.fasterxml.jackson.databind.JsonNode) uses for the bean id); the attributes map is populated for each entry in GrouperProvisioningTargetNativeSync.effectiveNativeAttributeConfigsEntities() (operator-configured or default) by JSON Pointer. Returns null when the JSON is missing or has no UID.
    • captureGroupJson

      public void captureGroupJson(com.fasterxml.jackson.databind.JsonNode groupNode)
      Build + record a TeamDynamix 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 TeamDynamix user from its raw JSON. No-op when sync-back is off or id-less.
    • captureMembershipsForGroup

      public void captureMembershipsForGroup(String targetGroupId, List<TeamDynamixUser> teamDynamixUsers)
      Record native memberships for a TeamDynamix group, given the list of users that belong to it. No-op if reporting is off or the input is empty. TeamDynamix membership is group-centric (members are read per-group), so -- unlike the group/user objects, which capture from raw JSON -- memberships are still derived from the typed beans during DAO translation.
    • captureGroupJsonFromCurrentProvisioner

      public static void captureGroupJsonFromCurrentProvisioner(com.fasterxml.jackson.databind.JsonNode groupNode)
      Capture a TeamDynamix group (from its raw JSON) against the current provisioner's sync. No-op if there's no current provisioner or the active provisioner isn't a TeamDynamix one. Called from the commands seam (TeamDynamixApiCommands) for every group read off the target.
    • captureUserJsonFromCurrentProvisioner

      public static void captureUserJsonFromCurrentProvisioner(com.fasterxml.jackson.databind.JsonNode userNode)
      Capture a TeamDynamix user (from its raw JSON) against the current provisioner's sync. No-op if there's no current provisioner or the active provisioner isn't a TeamDynamix one. Called from the commands seam (TeamDynamixApiCommands) for every user read off the target.
    • captureMembershipsForGroupForCurrentProvisioner

      public static void captureMembershipsForGroupForCurrentProvisioner(String targetGroupId, List<TeamDynamixUser> teamDynamixUsers)
      Record native memberships for a TeamDynamix group on the current provisioner.
    • captureMembershipInsertFromCurrentProvisioner

      public static void captureMembershipInsertFromCurrentProvisioner(String groupTargetId, String userTargetId)
      Write-track a successful TeamDynamix membership add (createTeamDynamixMemberships) against the current provisioner: record (groupTargetId, userTargetId) in the native membership map. No-op out of cycle or for a non-TeamDynamix provisioner.
    • captureMembershipDeleteFromCurrentProvisioner

      public static void captureMembershipDeleteFromCurrentProvisioner(String groupTargetId, String userTargetId)
      Write-track a successful TeamDynamix membership remove (deleteTeamDynamixMemberships) against the current provisioner: drop (groupTargetId, userTargetId) from the native membership map so the end-of-run flush deletes its grouper_prov_mship row. No-op out of cycle or for a non-TeamDynamix provisioner.