Class GrouperProvisioningNativeAttributeConfig

java.lang.Object
edu.internet2.middleware.grouper.app.provisioning.GrouperProvisioningNativeAttributeConfig

public class GrouperProvisioningNativeAttributeConfig extends Object
One entry in a native-attributes JSON config (per provisioner, separate lists for entities and groups). Identifies an extra target-side attribute to capture for the generic provisioner reporting tables (grouper_prov_*_attr / _attr_value).

Shape per entry in the JSON array:

 { "name": "active",                                                  }
 { "name": "displayName"                                              }
 { "name": "lastModified", "path": "/meta/lastModified", "type": "timestamp" }
 
  • name (required, non-blank): attribute name written to grouper_prov_*_attr
  • path (optional): SCIM JSON Pointer or LDAP attribute name; defaults to "/" + name for SCIM-style provisioners, name for LDAP-style
  • type (optional): one of string|integer|boolean|timestamp; defaults to auto-detect from the runtime value
  • Constructor Details

    • GrouperProvisioningNativeAttributeConfig

      public GrouperProvisioningNativeAttributeConfig()
  • Method Details

    • getName

      public String getName()
    • setName

      public void setName(String name)
    • getPath

      public String getPath()
    • setPath

      public void setPath(String path)
    • getType

      public String getType()
    • setType

      public void setType(String type)
    • parseAndValidate

      public static List<GrouperProvisioningNativeAttributeConfig> parseAndValidate(String json, String configLabel)
      parse and validate a native-attributes config string. Accepts two forms:

      1. Comma-separated list (LDAP-style, simple attribute names only):

       sn, mail, telephoneNumber
       
      Each token becomes an entry with name=path=token, type=null (auto-detect). Use this when each attribute is a flat name with no nested path and no explicit type.

      2. JSON array (full form, supports nested paths and explicit types):

       [
         { "name": "active" },
         { "name": "displayName" },
         { "name": "lastModified", "path": "/meta/lastModified", "type": "timestamp" }
       ]
       

      Detection rule: input that starts with [ (after trimming) is parsed as JSON; anything else is parsed as CSV.

      Parameters:
      json - the input (CSV or JSON array), may be null/blank (returns empty list)
      configLabel - a human-readable label used in error messages (e.g. "nativeAttributesEntities")
      Returns:
      parsed entries; never null
      Throws:
      RuntimeException - if the input is malformed or any entry fails validation