org.opennms.netmgt.config.rws
Class RwsConfiguration

java.lang.Object
  extended by org.opennms.netmgt.config.rws.RwsConfiguration
All Implemented Interfaces:
Serializable

public class RwsConfiguration
extends Object
implements Serializable

Top-level element for the rws-configuration.xml configuration file.

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

Constructor Summary
RwsConfiguration()
           
 
Method Summary
 void addStandbyUrl(int index, StandbyUrl vStandbyUrl)
           
 void addStandbyUrl(StandbyUrl vStandbyUrl)
           
 Enumeration<StandbyUrl> enumerateStandbyUrl()
          Method enumerateStandbyUrl.
 BaseUrl getBaseUrl()
          Returns the value of field 'baseUrl'.
 StandbyUrl[] getStandbyUrl()
          Method getStandbyUrl.Returns the contents of the collection in an Array.
 StandbyUrl getStandbyUrl(int index)
          Method getStandbyUrl.
 List<StandbyUrl> getStandbyUrlCollection()
          Method getStandbyUrlCollection.Returns a reference to '_standbyUrlList'.
 int getStandbyUrlCount()
          Method getStandbyUrlCount.
 boolean isValid()
          Method isValid.
 Iterator<StandbyUrl> iterateStandbyUrl()
          Method iterateStandbyUrl.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllStandbyUrl()
           
 boolean removeStandbyUrl(StandbyUrl vStandbyUrl)
          Method removeStandbyUrl.
 StandbyUrl removeStandbyUrlAt(int index)
          Method removeStandbyUrlAt.
 void setBaseUrl(BaseUrl baseUrl)
          Sets the value of field 'baseUrl'.
 void setStandbyUrl(int index, StandbyUrl vStandbyUrl)
           
 void setStandbyUrl(List<StandbyUrl> vStandbyUrlList)
          Sets the value of '_standbyUrlList' by copying the given Vector.
 void setStandbyUrl(StandbyUrl[] vStandbyUrlArray)
           
 void setStandbyUrlCollection(List<StandbyUrl> standbyUrlList)
          Deprecated.  
static RwsConfiguration 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

RwsConfiguration

public RwsConfiguration()
Method Detail

addStandbyUrl

public void addStandbyUrl(StandbyUrl vStandbyUrl)
                   throws IndexOutOfBoundsException
Parameters:
vStandbyUrl -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addStandbyUrl

public void addStandbyUrl(int index,
                          StandbyUrl vStandbyUrl)
                   throws IndexOutOfBoundsException
Parameters:
index -
vStandbyUrl -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

enumerateStandbyUrl

public Enumeration<StandbyUrl> enumerateStandbyUrl()
Method enumerateStandbyUrl.

Returns:
an Enumeration over all possible elements of this collection

getBaseUrl

public BaseUrl getBaseUrl()
Returns the value of field 'baseUrl'. The field 'baseUrl' has the following description: Base Url(s) for Rancid Server.

Returns:
the value of field 'BaseUrl'.

getStandbyUrl

public StandbyUrl getStandbyUrl(int index)
                         throws IndexOutOfBoundsException
Method getStandbyUrl.

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

getStandbyUrl

public StandbyUrl[] getStandbyUrl()
Method getStandbyUrl.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

getStandbyUrlCollection

public List<StandbyUrl> getStandbyUrlCollection()
Method getStandbyUrlCollection.Returns a reference to '_standbyUrlList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getStandbyUrlCount

public int getStandbyUrlCount()
Method getStandbyUrlCount.

Returns:
the size of this collection

isValid

public boolean isValid()
Method isValid.

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

iterateStandbyUrl

public Iterator<StandbyUrl> iterateStandbyUrl()
Method iterateStandbyUrl.

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

removeAllStandbyUrl

public void removeAllStandbyUrl()

removeStandbyUrl

public boolean removeStandbyUrl(StandbyUrl vStandbyUrl)
Method removeStandbyUrl.

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

removeStandbyUrlAt

public StandbyUrl removeStandbyUrlAt(int index)
Method removeStandbyUrlAt.

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

setBaseUrl

public void setBaseUrl(BaseUrl baseUrl)
Sets the value of field 'baseUrl'. The field 'baseUrl' has the following description: Base Url(s) for Rancid Server.

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

setStandbyUrl

public void setStandbyUrl(int index,
                          StandbyUrl vStandbyUrl)
                   throws IndexOutOfBoundsException
Parameters:
index -
vStandbyUrl -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setStandbyUrl

public void setStandbyUrl(StandbyUrl[] vStandbyUrlArray)
Parameters:
vStandbyUrlArray -

setStandbyUrl

public void setStandbyUrl(List<StandbyUrl> vStandbyUrlList)
Sets the value of '_standbyUrlList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vStandbyUrlList - the Vector to copy.

setStandbyUrlCollection

public void setStandbyUrlCollection(List<StandbyUrl> standbyUrlList)
Deprecated. 

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

Parameters:
standbyUrlList - the Vector to set.

unmarshal

public static RwsConfiguration 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.rws.RwsConfiguration
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 © 2009. All Rights Reserved.