org.outerj.xreporter.user
Class UserImpl

java.lang.Object
  extended byorg.outerj.xreporter.user.UserImpl
All Implemented Interfaces:
User

public class UserImpl
extends java.lang.Object
implements User

An object reprenting an xReporter end-user.


Field Summary
protected  java.lang.String customer
           
protected static java.lang.String CUSTOMER_EL
           
protected static java.lang.String NAME_EL
           
protected  java.util.HashMap properties
           
protected static java.lang.String PROPERTY_EL
           
protected  java.util.List roles
           
protected static java.lang.String USER_EL
           
protected  java.lang.String userName
           
 
Constructor Summary
UserImpl(java.lang.String userName)
           
 
Method Summary
 void addProperty(java.lang.String name, java.lang.String value)
           
 void addRole(java.lang.String role)
           
 void generateSaxFragment(org.xml.sax.ContentHandler contentHandler)
          Generate an XML (SAX) representation of this user.
 java.lang.String getCustomer()
          Returns a string representing the customer to which this user belongs.
 java.lang.String getName()
          Returns the username of this user.
 java.lang.String getProperty(java.lang.String name)
          Gets a user-defined property of this user.
 java.util.List getRoles()
          Returns a List containing this user's roles.
 void setCustomer(java.lang.String customer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

roles

protected java.util.List roles

properties

protected java.util.HashMap properties

userName

protected java.lang.String userName

customer

protected java.lang.String customer

USER_EL

protected static final java.lang.String USER_EL
See Also:
Constant Field Values

NAME_EL

protected static final java.lang.String NAME_EL
See Also:
Constant Field Values

CUSTOMER_EL

protected static final java.lang.String CUSTOMER_EL
See Also:
Constant Field Values

PROPERTY_EL

protected static final java.lang.String PROPERTY_EL
See Also:
Constant Field Values
Constructor Detail

UserImpl

public UserImpl(java.lang.String userName)
Method Detail

addRole

public void addRole(java.lang.String role)

getName

public java.lang.String getName()
Description copied from interface: User
Returns the username of this user. This is not his real name.

Specified by:
getName in interface User

getRoles

public java.util.List getRoles()
Description copied from interface: User
Returns a List containing this user's roles. The items in the List are Strings.

Specified by:
getRoles in interface User

getCustomer

public java.lang.String getCustomer()
Description copied from interface: User
Returns a string representing the customer to which this user belongs. This could be an empty string, but wil never be null.

Specified by:
getCustomer in interface User

setCustomer

public void setCustomer(java.lang.String customer)

addProperty

public void addProperty(java.lang.String name,
                        java.lang.String value)

getProperty

public java.lang.String getProperty(java.lang.String name)
Description copied from interface: User
Gets a user-defined property of this user.

Specified by:
getProperty in interface User

generateSaxFragment

public void generateSaxFragment(org.xml.sax.ContentHandler contentHandler)
                         throws org.xml.sax.SAXException
Description copied from interface: User
Generate an XML (SAX) representation of this user. This method will not call startDocument and endDocument on the contentHandler, neither will it add a declaration (and prefix events) for the xReporter namespace.

Specified by:
generateSaxFragment in interface User
Throws:
org.xml.sax.SAXException