org.mycore.user
Class MCRUserContact

java.lang.Object
  extended by org.mycore.user.MCRUserContact

public class MCRUserContact
extends Object

Instances of this class store contact information of MyCoRe users. MCRUserContact is part of the MyCoRe user component and must not be used directly by other components. MCRUserContact is aggregated by MCRUser and all user objects are managed by the user manager (the instance of the singleton MCRUserMgr).

Version:
$Revision: 14106 $ $Date: 2008-10-09 11:30:08 +0200 (Do, 09 Okt 2008) $
Author:
Detlev Degenhardt, Jens Kupferschmidt, Thomas Scheffler (yagee)
See Also:
MCRUserMgr, MCRUser

Field Summary
static int cellphone_len
          The maximum length of the cellphone string
static int city_len
          The maximum length of the city string
static int country_len
          The maximum length of the country string
static int department_len
          The maximum length of the department string
static int email_len
          The maximum length of the email string
static int faculty_len
          The maximum length of the faculty string
static int fax_len
          The maximum length of the fax string
static int firstname_len
          The maximum length of the firstname string
static int institute_len
          The maximum length of the institute string
static int institution_len
          The maximum length of the institution string
static int lastname_len
          The maximum length of the lastname string
static int postalcode_len
          The maximum length of the postalcode string
static int salutation_len
          The maximum length of the salutation string
static int state_len
          The maximum length of the state string
static int street_len
          The maximum length of the street string
static int telephone_len
          The maximum length of the telephone string
 
Constructor Summary
MCRUserContact()
          Constructor for an empty object.
MCRUserContact(Element elm)
          Constructor.
MCRUserContact(String salutation, String firstname, String lastname, String street, String city, String postalcode, String country, String state, String institution, String faculty, String department, String institute, String telephone, String fax, String email, String cellphone)
          Constructor.
 
Method Summary
 Object clone()
           
 void debug()
          This method prints the attributes of this object when in debug mode.
 boolean equals(Object obj)
           
 String getCellphone()
           
 String getCity()
           
 String getCountry()
           
 String getDepartment()
           
 String getEmail()
           
 String getFaculty()
           
 String getFax()
           
 String getFirstName()
           
 String getInstitute()
           
 String getInstitution()
           
 String getLastName()
           
 String getPostalCode()
           
 String getSalutation()
          The following methods simply return the attributes...
 String getState()
           
 String getStreet()
           
 String getTelephone()
           
 int hashCode()
           
 void setCellphone(String v)
           
 void setCity(String v)
           
 void setCountry(String v)
           
 void setDepartment(String v)
           
 void setEmail(String v)
           
 void setFaculty(String v)
           
 void setFax(String v)
           
 void setFirstName(String v)
           
 void setFromJDOMElement(Element elm)
          All address and contact attributes are passed as a JDOM Element.
 void setInstitute(String v)
           
 void setInstitution(String v)
           
 void setLastName(String v)
           
 void setPostalCode(String v)
           
 void setSalutation(String v)
           
 void setState(String v)
           
 void setStreet(String v)
           
 void setTelephone(String v)
           
 Element toJDOMElement()
          This method returns the user contact information as a JDOM Element.
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

salutation_len

public static final int salutation_len
The maximum length of the salutation string

See Also:
Constant Field Values

firstname_len

public static final int firstname_len
The maximum length of the firstname string

See Also:
Constant Field Values

lastname_len

public static final int lastname_len
The maximum length of the lastname string

See Also:
Constant Field Values

street_len

public static final int street_len
The maximum length of the street string

See Also:
Constant Field Values

city_len

public static final int city_len
The maximum length of the city string

See Also:
Constant Field Values

postalcode_len

public static final int postalcode_len
The maximum length of the postalcode string

See Also:
Constant Field Values

country_len

public static final int country_len
The maximum length of the country string

See Also:
Constant Field Values

state_len

public static final int state_len
The maximum length of the state string

See Also:
Constant Field Values

institution_len

public static final int institution_len
The maximum length of the institution string

See Also:
Constant Field Values

faculty_len

public static final int faculty_len
The maximum length of the faculty string

See Also:
Constant Field Values

department_len

public static final int department_len
The maximum length of the department string

See Also:
Constant Field Values

institute_len

public static final int institute_len
The maximum length of the institute string

See Also:
Constant Field Values

telephone_len

public static final int telephone_len
The maximum length of the telephone string

See Also:
Constant Field Values

fax_len

public static final int fax_len
The maximum length of the fax string

See Also:
Constant Field Values

email_len

public static final int email_len
The maximum length of the email string

See Also:
Constant Field Values

cellphone_len

public static final int cellphone_len
The maximum length of the cellphone string

See Also:
Constant Field Values
Constructor Detail

MCRUserContact

public MCRUserContact()
Constructor for an empty object.


MCRUserContact

public MCRUserContact(String salutation,
                      String firstname,
                      String lastname,
                      String street,
                      String city,
                      String postalcode,
                      String country,
                      String state,
                      String institution,
                      String faculty,
                      String department,
                      String institute,
                      String telephone,
                      String fax,
                      String email,
                      String cellphone)
Constructor. All address and contact attributes are passed as Strings


MCRUserContact

public MCRUserContact(Element elm)
Constructor. All address and contact attributes are provided as a JDOM Element.

Parameters:
elm - the JDOM Element
Method Detail

clone

public Object clone()
Overrides:
clone in class Object

setFromJDOMElement

public final void setFromJDOMElement(Element elm)
All address and contact attributes are passed as a JDOM Element.

Parameters:
elm - the JDOM Element

getSalutation

public final String getSalutation()
The following methods simply return the attributes...


getFirstName

public final String getFirstName()

getLastName

public final String getLastName()

getStreet

public final String getStreet()

getCity

public final String getCity()

getPostalCode

public final String getPostalCode()

getCountry

public final String getCountry()

getState

public final String getState()

getInstitution

public final String getInstitution()

getFaculty

public final String getFaculty()

getDepartment

public final String getDepartment()

getInstitute

public final String getInstitute()

getTelephone

public final String getTelephone()

getFax

public final String getFax()

getEmail

public final String getEmail()

getCellphone

public final String getCellphone()

setSalutation

public final void setSalutation(String v)

setFirstName

public final void setFirstName(String v)

setLastName

public final void setLastName(String v)

setStreet

public final void setStreet(String v)

setCity

public final void setCity(String v)

setPostalCode

public final void setPostalCode(String v)

setCountry

public final void setCountry(String v)

setState

public final void setState(String v)

setInstitution

public final void setInstitution(String v)

setFaculty

public final void setFaculty(String v)

setDepartment

public final void setDepartment(String v)

setInstitute

public final void setInstitute(String v)

setTelephone

public final void setTelephone(String v)

setFax

public final void setFax(String v)

setEmail

public final void setEmail(String v)

setCellphone

public final void setCellphone(String v)

toJDOMElement

public final Element toJDOMElement()
This method returns the user contact information as a JDOM Element. This output is used by the corresponding user object to create a full XML representation of the user.

Returns:
JDOM Element including data fields of this class

debug

public final void debug()
This method prints the attributes of this object when in debug mode.


equals

public boolean equals(Object obj)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object