Class GrouperRemedyProvisioningTargetNativeSync

java.lang.Object
edu.internet2.middleware.grouper.app.provisioning.GrouperProvisioningTargetNativeSync
edu.internet2.middleware.grouper.app.remedyV2.GrouperRemedyProvisioningTargetNativeSync

public class GrouperRemedyProvisioningTargetNativeSync extends GrouperProvisioningTargetNativeSync
Remedy-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 Remedy (BMC AR System) JSON (JSON Pointer paths, like SCIM/Adobe), hooked at the API-commands seam (GrouperRemedyApiCommands.retrieveRemedyGroups and the user-parse helper convertRemedyUsersFromJson) where the full JSON entry node is in scope. This avoids losing any Remedy field that the GrouperRemedyGroup / GrouperRemedyUser typed beans do not model; operators can capture any JSON field via nativeAttributesGroups / nativeAttributesEntities with a name and optional JSON-Pointer path.

Remedy "values" envelope: a Remedy entry is shaped {"values":{...fields...},"_links":{...}}. The real fields (and the ids) live under /values, so capture is hooked at the entry node and every default/operator pointer is rooted at /values/.... Capturing the whole entry node (rather than the inner values node) keeps the _links/self/href reachable too -- a field the typed beans drop entirely.

Memberships are a separate Remedy object (ENT:SYS People Entitlement Groups, read by its own API call), not something derived from the group or user object. They are still captured from the GrouperRemedyMembership typed beans (captureMemberships(java.util.List<edu.internet2.middleware.grouper.app.remedyV2.GrouperRemedyMembership>)) at the DAO level; only the group/user object capture moved to JSON.

  • Constructor Details

    • GrouperRemedyProvisioningTargetNativeSync

      public GrouperRemedyProvisioningTargetNativeSync()
  • 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 Remedy group entry JSON. targetId is read from /values/Permission Group ID (the same value the old typed-bean capture took from GrouperRemedyGroup.getPermissionGroupId()); 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 /values/Permission Group ID.
    • buildNativeUserFromJson

      public GrouperProvisioningTargetNativeUser buildNativeUserFromJson(com.fasterxml.jackson.databind.JsonNode userNode)
      Build a native user bean from the raw Remedy user entry JSON. targetId is read from /values/Person ID (the same value the old typed-bean capture took from GrouperRemedyUser.getPersonId()); 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 /values/Person ID.
    • buildNativeMembershipFromRemedyMembership

      public GrouperProvisioningTargetNativeMembership buildNativeMembershipFromRemedyMembership(GrouperRemedyMembership grouperRemedyMembership)
      Build a native membership bean from a Remedy membership. targetGroupId = permissionGroupId, targetUserId = personId.
    • captureGroupJson

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

      public void captureMemberships(List<GrouperRemedyMembership> grouperRemedyMemberships)
      Build + record a list of Remedy memberships. No-op when sync-back is off or empty.
    • captureGroupJsonFromCurrentProvisioner

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

      public static void captureUserJsonFromCurrentProvisioner(com.fasterxml.jackson.databind.JsonNode userNode)
      Capture a Remedy user (from its raw JSON entry) against the current provisioner's sync. No-op if there's no current provisioner or the active provisioner isn't a Remedy one. Called from the commands user-parse helper (GrouperRemedyApiCommands.convertRemedyUsersFromJson), which backs both the retrieve-all-users and retrieve-single-user read paths.
    • captureMembershipsFromCurrentProvisioner

      public static void captureMembershipsFromCurrentProvisioner(List<GrouperRemedyMembership> grouperRemedyMemberships)
      Capture a list of Remedy memberships against the current provisioner's sync.
    • captureMembershipInsertFromCurrentProvisioner

      public static void captureMembershipInsertFromCurrentProvisioner(String groupTargetId, String userTargetId)
      Write-track a successful Remedy membership add (assignUserToRemedyGroup) against the current provisioner: record (groupTargetId, userTargetId) in the native membership map so the end-of-run flush inserts/keeps its grouper_prov_mship row. groupTargetId is the Remedy permissionGroupId and userTargetId is the Remedy personId (the same target ids buildNativeMembershipFromRemedyMembership(edu.internet2.middleware.grouper.app.remedyV2.GrouperRemedyMembership) records). No-op out of cycle, for a non-Remedy provisioner, or when membership sync-back is off (guarded in recordTargetNativeMembershipInsert).
    • captureMembershipDeleteFromCurrentProvisioner

      public static void captureMembershipDeleteFromCurrentProvisioner(String groupTargetId, String userTargetId)
      Write-track a successful Remedy membership remove (removeUserFromRemedyGroup) against the current provisioner: drop (groupTargetId, userTargetId) from the native membership map so the end-of-run flush deletes its grouper_prov_mship row. groupTargetId is the Remedy permissionGroupId and userTargetId is the Remedy personId. No-op out of cycle, for a non-Remedy provisioner, or when membership sync-back is off (guarded in recordTargetNativeMembershipDelete).