|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.internet2.middleware.subject.provider.SubjectImpl
public class SubjectImpl
Base Subject implementation. Subclass this to change behavior
Constructor Summary | |
---|---|
SubjectImpl(String id1,
String name1,
String description1,
String typeName1,
String sourceId1)
Constructor called by SourceManager. |
|
SubjectImpl(String id1,
String name1,
String description1,
String typeName1,
String sourceId1,
Map<String,Set<String>> attributes1)
Constructor called by SourceManager. |
Method Summary | |
---|---|
static String |
attributeValueOrCommaSeparated(Subject subject,
String attributeName)
|
boolean |
equals(Object obj)
|
static boolean |
equalsStatic(Subject subject,
Object obj)
|
Map<String,Set<String>> |
getAttributes()
Gets a map attribute names and values. |
String |
getAttributeValue(String name1)
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). |
Set<String> |
getAttributeValues(String name1)
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 |
getDescription()
Gets this Subject's description. |
String |
getId()
Gets this Subject's ID. |
String |
getName()
Gets this Subject's name. |
Source |
getSource()
Returns the Source of this Subject. |
String |
getSourceId()
sourceId |
SubjectType |
getType()
Gets this Subject's type. |
String |
getTypeName()
get the type name |
int |
hashCode()
|
static int |
hashcodeStatic(Subject subject)
|
static void |
initVirtualAttributes(Subject subject)
make sure the virtual attributes are setup for the subject |
void |
setAttributes(Map<String,Set<String>> attributes1)
|
void |
setDescription(String description1)
|
void |
setId(String id1)
|
void |
setName(String name1)
|
void |
setSourceId(String sourceId1)
sourceId |
void |
setTypeName(String typeName1)
|
static Map<String,Set<String>> |
toAttributeMap(String... strings)
turn some strings into a map, every other is a name or value of attribute |
String |
toString()
|
static String |
toStringStatic(Subject subject)
toString |
static Map<String,String> |
virtualAttributesForSource(Source source)
get the ordered list of virtual attributes for a source |
static Map<String,String> |
virtualAttributeVariablesForSource(Source source)
get the ordered list of virtual attributes for a source |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public SubjectImpl(String id1, String name1, String description1, String typeName1, String sourceId1)
id1
- name1
- description1
- typeName1
- sourceId1
- public SubjectImpl(String id1, String name1, String description1, String typeName1, String sourceId1, Map<String,Set<String>> attributes1)
id1
- name1
- description1
- typeName1
- sourceId1
- attributes1
- Method Detail |
---|
public static Map<String,Set<String>> toAttributeMap(String... strings)
strings
-
public String toString()
toString
in class Object
Object.toString()
public static String toStringStatic(Subject subject)
subject
-
public String getSourceId()
getSourceId
in interface Subject
public void setSourceId(String sourceId1)
sourceId1
- the sourceId to setpublic String getId()
getId
in interface Subject
public SubjectType getType()
getType
in interface Subject
public String getName()
getName
in interface Subject
public String getDescription()
getDescription
in interface Subject
public String getAttributeValue(String name1)
getAttributeValue
in interface Subject
public Set<String> getAttributeValues(String name1)
getAttributeValues
in interface Subject
public static void initVirtualAttributes(Subject subject)
subject
- public static Map<String,String> virtualAttributeVariablesForSource(Source source)
source
-
public static Map<String,String> virtualAttributesForSource(Source source)
source
-
public Map<String,Set<String>> getAttributes()
getAttributes
in interface Subject
public Source getSource()
getSource
in interface Subject
public void setAttributes(Map<String,Set<String>> attributes1)
attributes1
- public String getTypeName()
Subject
getTypeName
in interface Subject
Subject.getTypeName()
public void setId(String id1)
id1
- the id to setpublic void setName(String name1)
name1
- the name to setpublic void setDescription(String description1)
description1
- the description to setpublic void setTypeName(String typeName1)
typeName1
- the typeName to setpublic boolean equals(Object obj)
equals
in class Object
Object.equals(java.lang.Object)
public static boolean equalsStatic(Subject subject, Object obj)
subject
- obj
-
public int hashCode()
hashCode
in class Object
Object.hashCode()
public static int hashcodeStatic(Subject subject)
subject
-
public String getAttributeValueOrCommaSeparated(String attributeName)
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
getAttributeValueOrCommaSeparated
in interface Subject
Subject.getAttributeValueOrCommaSeparated(java.lang.String)
public static String attributeValueOrCommaSeparated(Subject subject, String attributeName)
subject
- shouldnt be nullattributeName
-
Subject.getAttributeValueOrCommaSeparated(String)
public String getAttributeValueSingleValued(String attributeName)
Subject
getAttributeValueSingleValued
in interface Subject
Subject.getAttributeValueSingleValued(java.lang.String)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |