Index: grouper/src/grouper/edu/internet2/middleware/subject/provider/JDBCSourceAdapter2.java IDEA additional info: Subsystem: com.intellij.openapi.diff.impl.patch.CharsetEP <+>UTF-8 =================================================================== --- grouper/src/grouper/edu/internet2/middleware/subject/provider/JDBCSourceAdapter2.java (revision 193bae8c35dd666f00b14301577db7d5dc2009a7) +++ grouper/src/grouper/edu/internet2/middleware/subject/provider/JDBCSourceAdapter2.java (revision f69f42fefea2c07f6dc35591e36d5bebab153f3a) @@ -34,6 +34,7 @@ import java.util.Properties; import java.util.Set; +import edu.internet2.middleware.subject.Source; import org.apache.commons.lang.StringUtils; import org.apache.commons.lang.exception.ExceptionUtils; import org.apache.commons.logging.Log; @@ -1442,6 +1443,43 @@ return this.subjectIdentifierAttributes; } + /** + * @see Source#getSubjectIdentifierAttributesAll() + */ + public Map getSubjectIdentifierAttributesAll() { + if (this.subjectIdentifierAttributesAll == null) { + synchronized (JDBCSourceAdapter2.class) { + if (this.subjectIdentifierAttributesAll == null) { + Map temp = new LinkedHashMap<>(); + // No, we don't want just ONE. Support as many as there are. + // This is the param from JDBCSourceAdapter, not jdbc2. + for(int i = 0; ; i++) { + String value = getInitParam("subjectIdentifierAttribute" + i); + if (value == null) { + break; + } + temp.put(i, value.toLowerCase()); + } + + // if we still don't have anything... + // look at subjectIdentifierCols which is documented in examples + if (temp.isEmpty()) { + int i = 0; + for (String identifierCol : SubjectUtils.nonNull(subjectIdentifierCols)) { + String attribute; + if ((attribute = subjectAttributeColToName.get(identifierCol)) != null) { + temp.put(i, attribute.toLowerCase()); + i++; + } + } + } + this.subjectIdentifierAttributesAll = temp; + } + } + } + return this.subjectIdentifierAttributesAll; + } + // /** // * // * @param args