com.xmlserv.app
Class User

java.lang.Object
  |
  +--com.xmlserv.app.User
All Implemented Interfaces:
MacroExpansion

public class User
extends java.lang.Object
implements MacroExpansion

User abstraction.


Constructor Summary
User()
           
User(java.sql.Connection con, int id)
          Get user by numeric id.
User(java.sql.Connection con, java.lang.String uid)
          Get user by numeric id.
 
Method Summary
 java.lang.String getAnrede()
           
 java.lang.String getEmail()
           
 java.lang.String getFax()
           
 int getId()
           
 java.lang.String getIsdn()
           
 java.lang.String getKostenstelle()
           
 java.lang.String getLand()
           
 java.lang.String getNachname()
           
 java.lang.String getOrt()
           
 java.lang.String getPlz()
           
 int getRolegroup()
           
 java.lang.String getStrasse()
           
 java.lang.String getTelephon()
           
 java.lang.String getTitel()
           
 java.lang.String getUid()
           
 java.lang.String getValue(java.lang.String memberName)
          Get a value of the given instance member variable as a String.
 java.lang.String getVorname()
           
 boolean isPublicemail()
           
 boolean isSaveCleartextPW()
           
static org.jdom.Element list(java.sql.Connection con, int rolegroup)
          Create list of users for the given rolegroup.
static org.jdom.Element listByUid(java.sql.Connection con, int rolegroup)
          Create list of users for the given rolegroup.
 void save(java.sql.Connection con)
          Save user data to DB.
 void setAnrede(java.lang.String anrede)
           
 void setEmail(java.lang.String email)
           
 void setFax(java.lang.String fax)
           
 void setIsdn(java.lang.String isdn)
           
 void setKostenstelle(java.lang.String kostenstelle)
           
 void setLand(java.lang.String land)
           
 void setNachname(java.lang.String nachname)
           
 void setOrt(java.lang.String ort)
           
 void setPassword(java.lang.String password)
           
 void setPlz(java.lang.String plz)
           
 void setPublicemail(boolean publicemail)
           
 void setRolegroup(int rolegroup)
           
 void setSaveCleartextPW(boolean saveCleartextPW)
           
 void setStrasse(java.lang.String strasse)
           
 void setTelephon(java.lang.String telephon)
           
 void setTitel(java.lang.String titel)
           
 void setUid(java.lang.String uid)
           
 void setVorname(java.lang.String vorname)
           
 org.jdom.Element toElement()
          Convert user data to a JDom Element.
 org.jdom.Element toElement(java.sql.Connection con)
          Include rolegroup info.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

User

public User()

User

public User(java.sql.Connection con,
            int id)
     throws XMLServException
Get user by numeric id.
Parameters:
con - The DB Connection.
id - The numeric user id. Ignored if -1.
Throws:
XMLServException - When user not found or an SQL error occurs.

User

public User(java.sql.Connection con,
            java.lang.String uid)
     throws XMLServException
Get user by numeric id.
Parameters:
con - The DB Connection.
uid - The users loginname.
Throws:
XMLServException - When user not found or an SQL error occurs.
Method Detail

save

public void save(java.sql.Connection con)
          throws XMLServException
Save user data to DB.
Parameters:
con - The DB Connection.

toElement

public org.jdom.Element toElement()
Convert user data to a JDom Element.
Returns:
The user Element.

getValue

public java.lang.String getValue(java.lang.String memberName)
                          throws XMLServException
Get a value of the given instance member variable as a String.
Specified by:
getValue in interface MacroExpansion
Parameters:
memberName -  
Returns:
The member value as a String.
Throws:
XMLServException -  

toElement

public org.jdom.Element toElement(java.sql.Connection con)
                           throws XMLServException
Include rolegroup info.

list

public static org.jdom.Element list(java.sql.Connection con,
                                    int rolegroup)
                             throws XMLServException
Create list of users for the given rolegroup.
Parameters:
con - DB Connection
rolegroup - The rolegroup to list.

listByUid

public static org.jdom.Element listByUid(java.sql.Connection con,
                                         int rolegroup)
                                  throws XMLServException
Create list of users for the given rolegroup.
Parameters:
con - DB Connection
rolegroup - The rolegroup to list.

getId

public int getId()

setPassword

public void setPassword(java.lang.String password)

getUid

public java.lang.String getUid()

setUid

public void setUid(java.lang.String uid)

getRolegroup

public int getRolegroup()

setRolegroup

public void setRolegroup(int rolegroup)

getKostenstelle

public java.lang.String getKostenstelle()

setKostenstelle

public void setKostenstelle(java.lang.String kostenstelle)

getAnrede

public java.lang.String getAnrede()

setAnrede

public void setAnrede(java.lang.String anrede)

getVorname

public java.lang.String getVorname()

setVorname

public void setVorname(java.lang.String vorname)

getNachname

public java.lang.String getNachname()

setNachname

public void setNachname(java.lang.String nachname)

getTitel

public java.lang.String getTitel()

setTitel

public void setTitel(java.lang.String titel)

getEmail

public java.lang.String getEmail()

setEmail

public void setEmail(java.lang.String email)

getTelephon

public java.lang.String getTelephon()

setTelephon

public void setTelephon(java.lang.String telephon)

getFax

public java.lang.String getFax()

setFax

public void setFax(java.lang.String fax)

getIsdn

public java.lang.String getIsdn()

setIsdn

public void setIsdn(java.lang.String isdn)

getStrasse

public java.lang.String getStrasse()

setStrasse

public void setStrasse(java.lang.String strasse)

getPlz

public java.lang.String getPlz()

setPlz

public void setPlz(java.lang.String plz)

getOrt

public java.lang.String getOrt()

setOrt

public void setOrt(java.lang.String ort)

getLand

public java.lang.String getLand()

setLand

public void setLand(java.lang.String land)

isPublicemail

public boolean isPublicemail()

setPublicemail

public void setPublicemail(boolean publicemail)

isSaveCleartextPW

public boolean isSaveCleartextPW()

setSaveCleartextPW

public void setSaveCleartextPW(boolean saveCleartextPW)