public class LazySubject extends Object implements Subject
Subject from a Membership - getMember().getSubject()
only called if necessary i.e. the UI pages results and so it is often not
necessary to instantiate all the Subjects (and Members)
| Constructor and Description |
|---|
LazySubject(Member member) |
LazySubject(Membership ms) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
Map |
getAttributes()
Gets a map attribute names and values.
|
Map<String,Set<String>> |
getAttributes(boolean excludeInternalAttributes)
Gets a map attribute names and values.
|
String |
getAttributeValue(String name)
Returns the value of a single-valued attribute.
|
String |
getAttributeValue(String attributeName,
boolean excludeInternalAttributes)
Returns the value of a single-valued attribute.
|
String |
getAttributeValueOrCommaSeparated(String attributeName)
Returns the attribute value if single-valued, or
if multi-valued, returns the values comma separated (with a space too).
|
String |
getAttributeValueOrCommaSeparated(String attributeName,
boolean excludeInternalAttributes)
Returns the attribute value if single-valued, or
if multi-valued, returns the values comma separated (with a space too).
|
Set |
getAttributeValues(String name)
Returns the values of a multi-valued attribute, or a set of size one for a single valued attribute.
|
Set<String> |
getAttributeValues(String attributeName,
boolean excludeInternalAttributes)
Returns the values of a multi-valued attribute, or a set of size one for a single valued attribute.
|
String |
getAttributeValueSingleValued(String attributeName)
Returns the attribute value if single-valued, or
if multi-valued, throws an exception.
|
String |
getAttributeValueSingleValued(String attributeName,
boolean excludeInternalAttributes)
Returns the attribute value if single-valued, or
if multi-valued, throws an exception.
|
String |
getDescription()
Gets this Subject's description.
|
String |
getId()
Gets this Subject's ID.
|
Membership |
getMembership() |
String |
getName()
Gets this Subject's name.
|
Source |
getSource()
Returns the Source of this Subject.
|
String |
getSourceId()
get the source id
|
Map<String,Object> |
getTranslationMap()
we want to resolve virtual translated attributes when they are needed so store a map of subject and source attributes for that translation
|
SubjectType |
getType()
Gets this Subject's type.
|
String |
getTypeName()
get the type name
|
int |
hashCode() |
void |
setTranslationMap(Map<String,Object> translationMap)
we want to resolve virtual translated attributes when they are needed so store a map of subject and source attributes for that translation
|
String |
toString() |
public LazySubject(Membership ms)
ms - public LazySubject(Member member)
member - public String toString()
toString in class ObjectObject.toString()public Map getAttributes()
SubjectgetAttributes in interface SubjectSubject.getAttributes()public String getAttributeValue(String name)
SubjectgetAttributeValue in interface SubjectSubject.getAttributeValue(java.lang.String)public Set getAttributeValues(String name)
SubjectgetAttributeValues in interface SubjectSubject.getAttributeValues(java.lang.String)public String getDescription()
SubjectgetDescription in interface SubjectSubject.getDescription()public String getId()
SubjectgetId in interface SubjectSubject.getId()public String getName()
SubjectgetName in interface SubjectSubject.getName()public Source getSource()
SubjectgetSource in interface SubjectSubject.getSource()public String getSourceId()
getSourceId in interface Subjectpublic SubjectType getType()
SubjectgetType in interface SubjectSubject.getType()public boolean equals(Object obj)
equals in class ObjectObject.equals(java.lang.Object)public int hashCode()
hashCode in class ObjectObject.hashCode()public Membership getMembership()
public String getTypeName()
SubjectgetTypeName in interface SubjectSubject.getTypeName()public String getAttributeValueOrCommaSeparated(String attributeName)
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
getAttributeValueOrCommaSeparated in interface SubjectSubject.getAttributeValueOrCommaSeparated(java.lang.String)public String getAttributeValueSingleValued(String attributeName)
SubjectgetAttributeValueSingleValued in interface SubjectSubject.getAttributeValueSingleValued(java.lang.String)public String getAttributeValue(String attributeName, boolean excludeInternalAttributes)
SubjectgetAttributeValue in interface SubjectexcludeInternalAttributes - if true, values for internal attributes are not returnedSubject.getAttributeValue(java.lang.String, boolean)public Set<String> getAttributeValues(String attributeName, boolean excludeInternalAttributes)
SubjectgetAttributeValues in interface SubjectexcludeInternalAttributes - if true, values for internal attributes are not returnedSubject.getAttributeValues(java.lang.String, boolean)public String getAttributeValueOrCommaSeparated(String attributeName, boolean excludeInternalAttributes)
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. Note, the keys are case-insensitive
getAttributeValueOrCommaSeparated in interface SubjectexcludeInternalAttributes - if true, values for internal attributes are not returnedSubject.getAttributeValueOrCommaSeparated(java.lang.String, boolean)public String getAttributeValueSingleValued(String attributeName, boolean excludeInternalAttributes)
SubjectgetAttributeValueSingleValued in interface SubjectexcludeInternalAttributes - if true, values for internal attributes are not returnedSubject.getAttributeValueSingleValued(java.lang.String, boolean)public Map<String,Set<String>> getAttributes(boolean excludeInternalAttributes)
SubjectgetAttributes in interface SubjectexcludeInternalAttributes - if true, internal attributes are not returnedSubject.getAttributes(boolean)public Map<String,Object> getTranslationMap()
SubjectgetTranslationMap in interface Subjectpublic void setTranslationMap(Map<String,Object> translationMap)
SubjectsetTranslationMap in interface SubjectCopyright © 2016 Internet2. All rights reserved.