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
-
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, 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:Subject
Gets 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:
getAttributes
in interfaceSubject
- Overrides:
getAttributes
in classSubjectImpl
- Returns:
- map or empty map or null if not there
- See Also:
-
getAttributeValue
Description copied from interface:Subject
Returns 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:
getAttributeValue
in interfaceSubject
- Overrides:
getAttributeValue
in classSubjectImpl
- Returns:
- value or null if not found
- See Also:
-
getAttributeValueOrCommaSeparated
Description copied from interface:Subject
Returns 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:
getAttributeValueOrCommaSeparated
in interfaceSubject
- Overrides:
getAttributeValueOrCommaSeparated
in classSubjectImpl
- Returns:
- value or values or null if not there
- See Also:
-
getAttributeValues
Description copied from interface:Subject
Returns 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:
getAttributeValues
in interfaceSubject
- Overrides:
getAttributeValues
in classSubjectImpl
- Returns:
- set or empty set or null if not there
- See Also:
-
getAttributeValueSingleValued
Description copied from interface:Subject
Returns 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:
getAttributeValueSingleValued
in interfaceSubject
- Overrides:
getAttributeValueSingleValued
in classSubjectImpl
- Returns:
- value or null if not there
- See Also:
-