Rakesh API

org.rakeshv.xml.addressbook
Class Person

java.lang.Object
  extended by org.rakeshv.xml.addressbook.Person

public class Person
extends java.lang.Object

A bean that represents a person in the address book. This bean contains fields that directly map to the child elements under the person element in the address book XML file.

Copyright 2003 Rakesh Vidyadharan

Version:
$Id: Person.java,v 1.3 2004/05/26 11:42:40 rakesh Exp $
Author:
Rakesh Vidyadharan 2003 February 12

Field Summary
private  java.util.List addresses
          The list of address(s) of the person.
private  java.lang.String commonname
          The commonname of the person.
private  java.lang.String faxNumber
          The fax number of the person.
private  java.lang.String givenname
          The givenname of the person.
private  java.lang.String homePhone
          The home telepohone number of the person.
private  java.lang.String mail
          The email address of the person.
private  java.lang.String mobilePhone
          The mobile telephone number of the person.
private  java.lang.String nickname
          The nickname of the person.
private  java.lang.String officePhone
          The office telephone number of the person.
private  java.lang.String pagerNumber
          The pager number of the person.
private  java.lang.String surname
          The surname of the person.
 
Constructor Summary
Person()
          Default constructor.
Person(java.lang.String nick, java.lang.String name, java.lang.String sn, java.lang.String cn, java.lang.String email)
          Constructor that populates just the name fields.
Person(java.lang.String nick, java.lang.String name, java.lang.String sn, java.lang.String cn, java.lang.String email, java.util.List addresses, java.lang.String office, java.lang.String home, java.lang.String mobile, java.lang.String pager, java.lang.String fax)
          Constructor that populates all the class fields.
 
Method Summary
 void addAddress(Address address)
          Add the specified Address to the addresses List.
 java.util.List getAddresses()
          Return the value/reference of the addresses.
 java.lang.String getCommonname()
          Return the value/reference of the commonname.
 java.lang.String getFaxNumber()
          Return the value/reference of the faxNumber.
 java.lang.String getGivenname()
          Return the value/reference of the givenname.
 java.lang.String getHomePhone()
          Return the value/reference of the homePhone.
 java.lang.String getMail()
          Return the value/reference of the mail.
 java.lang.String getMobilePhone()
          Return the value/reference of the mobilePhone.
 java.lang.String getNickname()
          Return the value/reference of the nickname.
 java.lang.String getOfficePhone()
          Return the value/reference of the officePhone.
 java.lang.String getPagerNumber()
          Return the value/reference of the pagerNumber.
 java.lang.String getSurname()
          Return the value/reference of the surname.
 void setAddresses(java.util.List addresses)
          Set the value of addresses.
 void setCommonname(java.lang.String commonname)
          Set the value of commonname.
 void setFaxNumber(java.lang.String faxNumber)
          Set the value of faxNumber.
 void setGivenname(java.lang.String givenname)
          Set the value of givenname.
 void setHomePhone(java.lang.String homePhone)
          Set the value of homePhone.
 void setMail(java.lang.String mail)
          Set the value of mail.
 void setMobilePhone(java.lang.String mobilePhone)
          Set the value of mobilePhone.
 void setNickname(java.lang.String nickname)
          Set the value of nickname.
 void setOfficePhone(java.lang.String officePhone)
          Set the value of officePhone.
 void setPagerNumber(java.lang.String pagerNumber)
          Set the value of pagerNumber.
 void setSurname(java.lang.String surname)
          Set the value of surname.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nickname

private java.lang.String nickname
The nickname of the person. This is used to uniquely identify an entry in the addressbook, as well as the alias to use to look up the mail address. This field maps to the nickname element.


givenname

private java.lang.String givenname
The givenname of the person. The naming convention used in the XML file maps to the LDAP schema. This field maps to the givenname element.


surname

private java.lang.String surname
The surname of the person. This field maps to the sn element.


commonname

private java.lang.String commonname
The commonname of the person. This field maps to the cn element.


mail

private java.lang.String mail
The email address of the person. This field maps to the mail element.


addresses

private java.util.List addresses
The list of address(s) of the person. This field maps to the addresses element.


homePhone

private java.lang.String homePhone
The home telepohone number of the person. This field maps to the homePhone element.


mobilePhone

private java.lang.String mobilePhone
The mobile telephone number of the person. This field maps to the mobilePhone element.


officePhone

private java.lang.String officePhone
The office telephone number of the person. This field maps to the officePhone element.


pagerNumber

private java.lang.String pagerNumber
The pager number of the person. This field maps to the pagerNumber element.


faxNumber

private java.lang.String faxNumber
The fax number of the person. This field maps to the faxNumber element.

Constructor Detail

Person

public Person()
Default constructor. Just serves to create a new instance of the bean, whose fields may then be populated using the appropriate mutator methods.


Person

public Person(java.lang.String nick,
              java.lang.String name,
              java.lang.String sn,
              java.lang.String cn,
              java.lang.String email,
              java.util.List addresses,
              java.lang.String office,
              java.lang.String home,
              java.lang.String mobile,
              java.lang.String pager,
              java.lang.String fax)
Constructor that populates all the class fields.

Parameters:
nick - - The nickname value to set.
name - - The givenname value to set.
sn - - The surname value to set.
cn - - The commonname value to set.
email - - The mail value to set.
addresses - - The addresses reference to set.
office - - The officePhone value to set.
home - - The homePhone value to set.
mobile - - The mobilePhone value to set.
pager - - The pagerNumber value to set.
fax - - The faxNumber value to set.

Person

public Person(java.lang.String nick,
              java.lang.String name,
              java.lang.String sn,
              java.lang.String cn,
              java.lang.String email)
Constructor that populates just the name fields.

Parameters:
nick - - The nickname value to set.
name - - The givenname value to set.
sn - - The surname value to set.
cn - - The commonname value to set.
email - - The mail value to set.
Method Detail

addAddress

public final void addAddress(Address address)
Add the specified Address to the addresses List. If addresses is null, create a new List and add the specified Address to it.

Parameters:
address - - The Address that is to be added to the addresses.

getNickname

public final java.lang.String getNickname()
Return the value/reference of the nickname.

Returns:
String - The value/reference of nickname.

setNickname

public final void setNickname(java.lang.String nickname)
Set the value of nickname.

Parameters:
nickname - - The value to set.

getGivenname

public final java.lang.String getGivenname()
Return the value/reference of the givenname.

Returns:
String - The value/reference of givenname.

setGivenname

public final void setGivenname(java.lang.String givenname)
Set the value of givenname.

Parameters:
givenname - - The value to set.

getSurname

public final java.lang.String getSurname()
Return the value/reference of the surname.

Returns:
String - The value/reference of surname.

setSurname

public final void setSurname(java.lang.String surname)
Set the value of surname.

Parameters:
surname - - The value to set.

getCommonname

public final java.lang.String getCommonname()
Return the value/reference of the commonname.

Returns:
String - The value/reference of commonname.

setCommonname

public final void setCommonname(java.lang.String commonname)
Set the value of commonname.

Parameters:
commonname - - The value to set.

getMail

public final java.lang.String getMail()
Return the value/reference of the mail.

Returns:
String - The value/reference of mail.

setMail

public final void setMail(java.lang.String mail)
Set the value of mail.

Parameters:
mail - - The value to set.

getOfficePhone

public final java.lang.String getOfficePhone()
Return the value/reference of the officePhone.

Returns:
String - The value/reference of officePhone.

setOfficePhone

public final void setOfficePhone(java.lang.String officePhone)
Set the value of officePhone.

Parameters:
officePhone - - The value to set.

getHomePhone

public final java.lang.String getHomePhone()
Return the value/reference of the homePhone.

Returns:
String - The value/reference of homePhone.

setHomePhone

public final void setHomePhone(java.lang.String homePhone)
Set the value of homePhone.

Parameters:
homePhone - - The value to set.

getMobilePhone

public final java.lang.String getMobilePhone()
Return the value/reference of the mobilePhone.

Returns:
String - The value/reference of mobilePhone.

setMobilePhone

public final void setMobilePhone(java.lang.String mobilePhone)
Set the value of mobilePhone.

Parameters:
mobilePhone - - The value to set.

getFaxNumber

public final java.lang.String getFaxNumber()
Return the value/reference of the faxNumber.

Returns:
String - The value/reference of faxNumber.

setFaxNumber

public final void setFaxNumber(java.lang.String faxNumber)
Set the value of faxNumber.

Parameters:
faxNumber - - The value to set.

getAddresses

public final java.util.List getAddresses()
Return the value/reference of the addresses.

Returns:
List - The value/reference of addresses.

setAddresses

public final void setAddresses(java.util.List addresses)
Set the value of addresses.

Parameters:
addresses - - The value to set.

getPagerNumber

public final java.lang.String getPagerNumber()
Return the value/reference of the pagerNumber.

Returns:
String - The value/reference of pagerNumber.

setPagerNumber

public final void setPagerNumber(java.lang.String pagerNumber)
Set the value of pagerNumber.

Parameters:
pagerNumber - - The value to set.

Rakesh API

Copyright © 2002-2005 - Rakesh Vidyadharan