edu.internet2.middleware.grouper.subj
Class SafeSubject

java.lang.Object
  extended by edu.internet2.middleware.grouper.subj.SafeSubject

public class SafeSubject
extends Object

bean to wrap a subject so it can be safely used from EL. Dont return any real objects, just primitives and strings and safe stuff


Constructor Summary
SafeSubject(edu.internet2.middleware.subject.Subject theSubject)
          construct with a subject
 
Method Summary
 String getAttributeValue(String attributeName)
          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 getDescription()
          Gets this Subject's description.
 String getEmailAddress()
          get the email address of this subject based on attributes in grouper.properties
 String getId()
          Gets this Subject's ID.
 String getName()
          Gets this Subject's name.
 String getSourceId()
          get the source id of a subject
 String getTypeName()
          get the type name
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SafeSubject

public SafeSubject(edu.internet2.middleware.subject.Subject theSubject)
construct with a subject

Parameters:
theSubject -
Method Detail

getEmailAddress

public String getEmailAddress()
get the email address of this subject based on attributes in grouper.properties

Returns:
the email address

getId

public String getId()
Gets this Subject's ID.

Returns:
string

getTypeName

public String getTypeName()
get the type name

Returns:
the type name

getSourceId

public String getSourceId()
get the source id of a subject

Returns:
the source id

getName

public String getName()
Gets this Subject's name.

Returns:
name or null if not there

getDescription

public String getDescription()
Gets this Subject's description.

Returns:
description or null if not there

getAttributeValue

public String getAttributeValue(String attributeName)
Returns the value of a single-valued attribute. If multivalued, this returns the first value

Parameters:
attributeName -
Returns:
value or null if not found

getAttributeValueOrCommaSeparated

public String getAttributeValueOrCommaSeparated(String attributeName)
 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
 

Parameters:
attributeName -
Returns:
value or values or null if not there