Class JNDISubject
java.lang.Object
edu.internet2.middleware.subject.provider.SubjectImpl
edu.internet2.middleware.subject.provider.JNDISubject
- All Implemented Interfaces:
Subject,Serializable
JNDI Subject implementation. This will lazy load attributes only if needed
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets a map attribute names and values.getAttributeValue(String name1) Returns the value of a single-valued attribute.getAttributeValueOrCommaSeparated(String attributeName) Returns the attribute value if single-valued, or if multi-valued, returns the values comma separated (with a space too).getAttributeValues(String name1) Returns the values of a multi-valued attribute, or a set of size one for a single valued attribute.getAttributeValueSingleValued(String attributeName) Returns the attribute value if single-valued, or if multi-valued, throws an exception.Methods inherited from class edu.internet2.middleware.subject.provider.SubjectImpl
attributesInittedClear, attributeValueOrCommaSeparated, attributeValueOrCommaSeparated, cloneSubject, equals, equalsStatic, getAttributes, getAttributeValue, getAttributeValueOrCommaSeparated, getAttributeValues, getAttributeValueSingleValued, getDescription, getDescriptionOverride, getId, getName, getNameOverride, getSource, getSourceId, getTranslationMap, getType, getTypeName, hashCode, hashcodeStatic, internalAssignAttribute, isResolvedFromSource, runScriptStatic, setAttributes, setDescription, setId, setName, setResolvedFromSource, setSourceId, setTranslationMap, setTypeName, toAttributeMap, toString, toStringStatic
-
Constructor Details
-
JNDISubject
public JNDISubject(String id1, String name1, String description1, String typeName1, String sourceId1) - Parameters:
id1-name1-description1-typeName1-sourceId1-
-
JNDISubject
public JNDISubject(String id1, String name1, String description1, String typeName1, String sourceId1, Map<String, Set<String>> attributes1) - Parameters:
id1-name1-description1-typeName1-sourceId1-attributes1-
-
-
Method Details
-
getAttributes
Description copied from interface:SubjectGets a map attribute names and values. The map's key contains the attribute name and the map's value contains a Set of attribute value(s). This does not return internal attributes. Note, the keys are case-insensitive- Specified by:
getAttributesin interfaceSubject- Overrides:
getAttributesin classSubjectImpl- Returns:
- map or empty map or null if not there
- See Also:
-
getAttributeValue
Description copied from interface:SubjectReturns the value of a single-valued attribute. If multivalued, this returns the first value. This does not return values for internal attributes. Note, the keys are case-insensitive- Specified by:
getAttributeValuein interfaceSubject- Overrides:
getAttributeValuein classSubjectImpl- Returns:
- value or null if not found
- See Also:
-
getAttributeValueOrCommaSeparated
Description copied from interface:SubjectReturns the attribute value if single-valued, or if multi-valued, returns the values comma separated (with a space too). So if the values are: a b c; this would return the string: "a, b, c" Implementors can use the static helper in SubjectImpl. This does not return values for internal attributes. Note, the keys are case-insensitive
- Specified by:
getAttributeValueOrCommaSeparatedin interfaceSubject- Overrides:
getAttributeValueOrCommaSeparatedin classSubjectImpl- Returns:
- value or values or null if not there
- See Also:
-
getAttributeValues
Description copied from interface:SubjectReturns the values of a multi-valued attribute, or a set of size one for a single valued attribute. Note the returned set should not be changed. This does not return values for internal attributes. Note, the keys are case-insensitive- Specified by:
getAttributeValuesin interfaceSubject- Overrides:
getAttributeValuesin classSubjectImpl- Returns:
- set or empty set or null if not there
- See Also:
-
getAttributeValueSingleValued
Description copied from interface:SubjectReturns the attribute value if single-valued, or if multi-valued, throws an exception. Implementors can use the static helper in SubjectImpl. This does not return values for internal attributes. Note, the keys are case-insensitive- Specified by:
getAttributeValueSingleValuedin interfaceSubject- Overrides:
getAttributeValueSingleValuedin classSubjectImpl- Returns:
- value or null if not there
- See Also:
-