org.opennms.netmgt.config.users
Class User

java.lang.Object
  extended by org.opennms.netmgt.config.users.User
All Implemented Interfaces:
Serializable

public class User
extends Object
implements Serializable

Class User.

Version:
$Revision$ $Date$
See Also:
Serialized Form

Constructor Summary
User()
           
 
Method Summary
 void addContact(Contact vContact)
           
 void addContact(int index, Contact vContact)
           
 void addDutySchedule(int index, String vDutySchedule)
           
 void addDutySchedule(String vDutySchedule)
           
 Enumeration<Contact> enumerateContact()
          Method enumerateContact.
 Enumeration<String> enumerateDutySchedule()
          Method enumerateDutySchedule.
 Contact[] getContact()
          Method getContact.Returns the contents of the collection in an Array.
 Contact getContact(int index)
          Method getContact.
 List<Contact> getContactCollection()
          Method getContactCollection.Returns a reference to '_contactList'.
 int getContactCount()
          Method getContactCount.
 String[] getDutySchedule()
          Method getDutySchedule.Returns the contents of the collection in an Array.
 String getDutySchedule(int index)
          Method getDutySchedule.
 List<String> getDutyScheduleCollection()
          Method getDutyScheduleCollection.Returns a reference to '_dutyScheduleList'.
 int getDutyScheduleCount()
          Method getDutyScheduleCount.
 String getFullName()
          Returns the value of field 'fullName'.
 String getPassword()
          Returns the value of field 'password'.
 String getUserComments()
          Returns the value of field 'userComments'.
 String getUserId()
          Returns the value of field 'userId'.
 boolean isValid()
          Method isValid.
 Iterator<Contact> iterateContact()
          Method iterateContact.
 Iterator<String> iterateDutySchedule()
          Method iterateDutySchedule.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllContact()
           
 void removeAllDutySchedule()
           
 boolean removeContact(Contact vContact)
          Method removeContact.
 Contact removeContactAt(int index)
          Method removeContactAt.
 boolean removeDutySchedule(String vDutySchedule)
          Method removeDutySchedule.
 String removeDutyScheduleAt(int index)
          Method removeDutyScheduleAt.
 void setContact(Contact[] vContactArray)
           
 void setContact(int index, Contact vContact)
           
 void setContact(List<Contact> vContactList)
          Sets the value of '_contactList' by copying the given Vector.
 void setContactCollection(List<Contact> contactList)
          Deprecated.  
 void setDutySchedule(int index, String vDutySchedule)
           
 void setDutySchedule(List<String> vDutyScheduleList)
          Sets the value of '_dutyScheduleList' by copying the given Vector.
 void setDutySchedule(String[] vDutyScheduleArray)
           
 void setDutyScheduleCollection(List<String> dutyScheduleList)
          Deprecated.  
 void setFullName(String fullName)
          Sets the value of field 'fullName'.
 void setPassword(String password)
          Sets the value of field 'password'.
 void setUserComments(String userComments)
          Sets the value of field 'userComments'.
 void setUserId(String userId)
          Sets the value of field 'userId'.
static User unmarshal(Reader reader)
          Method unmarshal.
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

User

public User()
Method Detail

addContact

public void addContact(Contact vContact)
                throws IndexOutOfBoundsException
Parameters:
vContact -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addContact

public void addContact(int index,
                       Contact vContact)
                throws IndexOutOfBoundsException
Parameters:
index -
vContact -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addDutySchedule

public void addDutySchedule(String vDutySchedule)
                     throws IndexOutOfBoundsException
Parameters:
vDutySchedule -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addDutySchedule

public void addDutySchedule(int index,
                            String vDutySchedule)
                     throws IndexOutOfBoundsException
Parameters:
index -
vDutySchedule -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateContact

public Enumeration<Contact> enumerateContact()
Method enumerateContact.

Returns:
an Enumeration over all possible elements of this collection

enumerateDutySchedule

public Enumeration<String> enumerateDutySchedule()
Method enumerateDutySchedule.

Returns:
an Enumeration over all possible elements of this collection

getContact

public Contact getContact(int index)
                   throws IndexOutOfBoundsException
Method getContact.

Parameters:
index -
Returns:
the value of the org.opennms.netmgt.config.users.Contact at the given index
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getContact

public Contact[] getContact()
Method getContact.Returns the contents of the collection in an Array.

Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.

Returns:
this collection as an Array

getContactCollection

public List<Contact> getContactCollection()
Method getContactCollection.Returns a reference to '_contactList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getContactCount

public int getContactCount()
Method getContactCount.

Returns:
the size of this collection

getDutySchedule

public String getDutySchedule(int index)
                       throws IndexOutOfBoundsException
Method getDutySchedule.

Parameters:
index -
Returns:
the value of the java.lang.String at the given index
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

getDutySchedule

public String[] getDutySchedule()
Method getDutySchedule.Returns the contents of the collection in an Array.

Note: Just in case the collection contents are changing in another thread, we pass a 0-length Array of the correct type into the API call. This way we know that the Array returned is of exactly the correct length.

Returns:
this collection as an Array

getDutyScheduleCollection

public List<String> getDutyScheduleCollection()
Method getDutyScheduleCollection.Returns a reference to '_dutyScheduleList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getDutyScheduleCount

public int getDutyScheduleCount()
Method getDutyScheduleCount.

Returns:
the size of this collection

getFullName

public String getFullName()
Returns the value of field 'fullName'.

Returns:
the value of field 'FullName'.

getPassword

public String getPassword()
Returns the value of field 'password'.

Returns:
the value of field 'Password'.

getUserComments

public String getUserComments()
Returns the value of field 'userComments'.

Returns:
the value of field 'UserComments'.

getUserId

public String getUserId()
Returns the value of field 'userId'.

Returns:
the value of field 'UserId'.

isValid

public boolean isValid()
Method isValid.

Returns:
true if this object is valid according to the schema

iterateContact

public Iterator<Contact> iterateContact()
Method iterateContact.

Returns:
an Iterator over all possible elements in this collection

iterateDutySchedule

public Iterator<String> iterateDutySchedule()
Method iterateDutySchedule.

Returns:
an Iterator over all possible elements in this collection

marshal

public void marshal(Writer out)
             throws org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
out -
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

marshal

public void marshal(ContentHandler handler)
             throws IOException,
                    org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
handler -
Throws:
IOException - if an IOException occurs during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling

removeAllContact

public void removeAllContact()

removeAllDutySchedule

public void removeAllDutySchedule()

removeContact

public boolean removeContact(Contact vContact)
Method removeContact.

Parameters:
vContact -
Returns:
true if the object was removed from the collection.

removeContactAt

public Contact removeContactAt(int index)
Method removeContactAt.

Parameters:
index -
Returns:
the element removed from the collection

removeDutySchedule

public boolean removeDutySchedule(String vDutySchedule)
Method removeDutySchedule.

Parameters:
vDutySchedule -
Returns:
true if the object was removed from the collection.

removeDutyScheduleAt

public String removeDutyScheduleAt(int index)
Method removeDutyScheduleAt.

Parameters:
index -
Returns:
the element removed from the collection

setContact

public void setContact(int index,
                       Contact vContact)
                throws IndexOutOfBoundsException
Parameters:
index -
vContact -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setContact

public void setContact(Contact[] vContactArray)
Parameters:
vContactArray -

setContact

public void setContact(List<Contact> vContactList)
Sets the value of '_contactList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vContactList - the Vector to copy.

setContactCollection

public void setContactCollection(List<Contact> contactList)
Deprecated. 

Sets the value of '_contactList' by setting it to the given Vector. No type checking is performed.

Parameters:
contactList - the Vector to set.

setDutySchedule

public void setDutySchedule(int index,
                            String vDutySchedule)
                     throws IndexOutOfBoundsException
Parameters:
index -
vDutySchedule -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setDutySchedule

public void setDutySchedule(String[] vDutyScheduleArray)
Parameters:
vDutyScheduleArray -

setDutySchedule

public void setDutySchedule(List<String> vDutyScheduleList)
Sets the value of '_dutyScheduleList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vDutyScheduleList - the Vector to copy.

setDutyScheduleCollection

public void setDutyScheduleCollection(List<String> dutyScheduleList)
Deprecated. 

Sets the value of '_dutyScheduleList' by setting it to the given Vector. No type checking is performed.

Parameters:
dutyScheduleList - the Vector to set.

setFullName

public void setFullName(String fullName)
Sets the value of field 'fullName'.

Parameters:
fullName - the value of field 'fullName'.

setPassword

public void setPassword(String password)
Sets the value of field 'password'.

Parameters:
password - the value of field 'password'.

setUserComments

public void setUserComments(String userComments)
Sets the value of field 'userComments'.

Parameters:
userComments - the value of field 'userComments'.

setUserId

public void setUserId(String userId)
Sets the value of field 'userId'.

Parameters:
userId - the value of field 'userId'.

unmarshal

public static User unmarshal(Reader reader)
                      throws org.exolab.castor.xml.MarshalException,
                             org.exolab.castor.xml.ValidationException
Method unmarshal.

Parameters:
reader -
Returns:
the unmarshaled org.opennms.netmgt.config.users.User
Throws:
org.exolab.castor.xml.MarshalException - if object is null or if any SAXException is thrown during marshaling
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema

validate

public void validate()
              throws org.exolab.castor.xml.ValidationException
Throws:
org.exolab.castor.xml.ValidationException - if this object is an invalid instance according to the schema


Copyright ? 2008. All Rights Reserved.