Class LdapProvisioningTargetNativeSync

java.lang.Object
edu.internet2.middleware.grouper.app.provisioning.GrouperProvisioningTargetNativeSync
edu.internet2.middleware.grouper.app.ldapProvisioning.LdapProvisioningTargetNativeSync

public class LdapProvisioningTargetNativeSync extends GrouperProvisioningTargetNativeSync
LDAP-specific GrouperProvisioningTargetNativeSync: converts LdapEntry objects into the generic native-target reporting beans, widens the LDAP search-attribute set with the configured native-attribute names, and offers a per-entry capture convenience.

Typical DAO usage per retrieval method (read paths only — write capture is a future opt-in via a readAfterWrite flag):

  1. Before issuing the LDAP search, call widenLdapAttributeNamesForGroups(Set) or widenLdapAttributeNamesForEntities(Set) so the directory returns the report-only attributes alongside the configured ones.
  2. For each LdapEntry returned, call captureGroupEntry(LdapEntry, String) or captureEntityEntry(LdapEntry, String) to build + record the native bean and (if applicable) the native memberships extracted from a membership attribute.

All methods no-op when the corresponding load flag is off, so callers do not need to flag-check at the call site.

  • Constructor Details

    • LdapProvisioningTargetNativeSync

      public LdapProvisioningTargetNativeSync()
  • Method Details

    • widenLdapAttributeNamesForGroups

      public void widenLdapAttributeNamesForGroups(Set<String> ldapAttributeNames)
      Add the LDAP attribute names called for by nativeAttributeConfigsGroups to the caller's existing search-attribute set. No-op when reporting is disabled.
    • widenLdapAttributeNamesForEntities

      public void widenLdapAttributeNamesForEntities(Set<String> ldapAttributeNames)
      Add the LDAP attribute names called for by nativeAttributeConfigsEntities to the caller's existing search-attribute set. No-op when reporting is disabled.
    • buildNativeGroup

      public GrouperProvisioningTargetNativeGroup buildNativeGroup(LdapEntry ldapEntry)
      Build a native group bean from an LDAP entry. targetId is the DN; attribute map collects all attributes returned by the LDAP search.
    • buildNativeUser

      public GrouperProvisioningTargetNativeUser buildNativeUser(LdapEntry ldapEntry)
      Build a native user bean from an LDAP entry. targetId is the DN; attribute map collects all attributes returned by the LDAP search.
    • appendNativeMembershipsFromGroupEntry

      public void appendNativeMembershipsFromGroupEntry(List<GrouperProvisioningTargetNativeMembership> destination, LdapEntry groupLdapEntry, String groupMembershipAttributeName)
      Extract native memberships from a group LdapEntry. For each value of groupMembershipAttributeName on the group, append a GrouperProvisioningTargetNativeMembership with targetGroupId = the group's DN and targetUserId = the membership value.
    • appendNativeMembershipsFromEntityEntry

      public void appendNativeMembershipsFromEntityEntry(List<GrouperProvisioningTargetNativeMembership> destination, LdapEntry entityLdapEntry, String entityMembershipAttributeName)
      Extract native memberships from an entity LdapEntry. Mirror of appendNativeMembershipsFromGroupEntry(java.util.List<edu.internet2.middleware.grouper.app.provisioning.GrouperProvisioningTargetNativeMembership>, edu.internet2.middleware.grouper.ldap.LdapEntry, java.lang.String): each value of entityMembershipAttributeName on the user becomes a membership with targetUserId = the user's DN and targetGroupId = the value.
    • captureGroupEntry

      public void captureGroupEntry(LdapEntry ldapEntry, String groupMembershipAttributeName)
      Full per-entry capture for a group: build the native group bean, record it, then extract and record any native memberships found on groupMembershipAttributeName. No-ops cascade through the recorder methods, so this is safe to call unconditionally.
    • captureEntityEntry

      public void captureEntityEntry(LdapEntry ldapEntry, String entityMembershipAttributeName)
      Full per-entry capture for an entity (user): build the native user bean, record it, then extract and record any native memberships found on entityMembershipAttributeName.