org.opennms.netmgt.config.users
Class Users

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

public class Users
extends Object
implements Serializable

Class Users.

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

Constructor Summary
Users()
           
 
Method Summary
 void addUser(int index, User vUser)
           
 void addUser(User vUser)
           
 Enumeration<User> enumerateUser()
          Method enumerateUser.
 User[] getUser()
          Method getUser.Returns the contents of the collection in an Array.
 User getUser(int index)
          Method getUser.
 List<User> getUserCollection()
          Method getUserCollection.Returns a reference to '_userList'.
 int getUserCount()
          Method getUserCount.
 boolean isValid()
          Method isValid.
 Iterator<User> iterateUser()
          Method iterateUser.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllUser()
           
 boolean removeUser(User vUser)
          Method removeUser.
 User removeUserAt(int index)
          Method removeUserAt.
 void setUser(int index, User vUser)
           
 void setUser(List<User> vUserList)
          Sets the value of '_userList' by copying the given Vector.
 void setUser(User[] vUserArray)
           
 void setUserCollection(List<User> userList)
          Deprecated.  
static Users 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

Users

public Users()
Method Detail

addUser

public void addUser(User vUser)
             throws IndexOutOfBoundsException
Parameters:
vUser -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addUser

public void addUser(int index,
                    User vUser)
             throws IndexOutOfBoundsException
Parameters:
index -
vUser -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateUser

public Enumeration<User> enumerateUser()
Method enumerateUser.

Returns:
an Enumeration over all possible elements of this collection

getUser

public User getUser(int index)
             throws IndexOutOfBoundsException
Method getUser.

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

getUser

public User[] getUser()
Method getUser.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

getUserCollection

public List<User> getUserCollection()
Method getUserCollection.Returns a reference to '_userList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getUserCount

public int getUserCount()
Method getUserCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

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

iterateUser

public Iterator<User> iterateUser()
Method iterateUser.

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

removeAllUser

public void removeAllUser()

removeUser

public boolean removeUser(User vUser)
Method removeUser.

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

removeUserAt

public User removeUserAt(int index)
Method removeUserAt.

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

setUser

public void setUser(int index,
                    User vUser)
             throws IndexOutOfBoundsException
Parameters:
index -
vUser -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setUser

public void setUser(User[] vUserArray)
Parameters:
vUserArray -

setUser

public void setUser(List<User> vUserList)
Sets the value of '_userList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vUserList - the Vector to copy.

setUserCollection

public void setUserCollection(List<User> userList)
Deprecated. 

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

Parameters:
userList - the Vector to set.

unmarshal

public static Users 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.Users
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.