org.opennms.netmgt.config.monitoringLocations
Class Locations

java.lang.Object
  extended by org.opennms.netmgt.config.monitoringLocations.Locations
All Implemented Interfaces:
java.io.Serializable

public class Locations
extends java.lang.Object
implements java.io.Serializable

The name and polling configuration for each monitoring location. Note: multiple monitors can use the same monitoring location, they will get assigned and ID with the name of the location prepended (example: location name "SFO" instance could be "SFO-1" or "SFO-Building A" as the instance is defined by the user during registration of the distributed monitor).

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

Constructor Summary
Locations()
           
 
Method Summary
 void addLocationDef(int index, LocationDef vLocationDef)
          Method addLocationDef
 void addLocationDef(LocationDef vLocationDef)
          Method addLocationDef
 void clearLocationDef()
          Method clearLocationDef
 java.util.Enumeration enumerateLocationDef()
          Method enumerateLocationDef
 LocationDef[] getLocationDef()
          Method getLocationDef
 LocationDef getLocationDef(int index)
          Method getLocationDef
 java.util.ArrayList getLocationDefCollection()
          Method getLocationDefCollection Returns a reference to 'locationDef'.
 int getLocationDefCount()
          Method getLocationDefCount
 boolean isValid()
          Method isValid
 void marshal(org.xml.sax.ContentHandler handler)
          Method marshal
 void marshal(java.io.Writer out)
          Method marshal
 boolean removeLocationDef(LocationDef vLocationDef)
          Method removeLocationDef
 void setLocationDef(java.util.ArrayList locationDefCollection)
          Method setLocationDef Sets the value of 'locationDef' by copying the given ArrayList.
 void setLocationDef(int index, LocationDef vLocationDef)
          Method setLocationDef
 void setLocationDef(LocationDef[] locationDefArray)
          Method setLocationDef
 void setLocationDefCollection(java.util.ArrayList locationDefCollection)
          Method setLocationDefCollection Sets the value of 'locationDef' by setting it to the given ArrayList.
static java.lang.Object unmarshal(java.io.Reader reader)
          Method unmarshal
 void validate()
          Method validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Locations

public Locations()
Method Detail

addLocationDef

public void addLocationDef(LocationDef vLocationDef)
                    throws java.lang.IndexOutOfBoundsException
Method addLocationDef

Parameters:
vLocationDef -
Throws:
java.lang.IndexOutOfBoundsException

addLocationDef

public void addLocationDef(int index,
                           LocationDef vLocationDef)
                    throws java.lang.IndexOutOfBoundsException
Method addLocationDef

Parameters:
index -
vLocationDef -
Throws:
java.lang.IndexOutOfBoundsException

clearLocationDef

public void clearLocationDef()
Method clearLocationDef


enumerateLocationDef

public java.util.Enumeration enumerateLocationDef()
Method enumerateLocationDef

Returns:
Enumeration

getLocationDef

public LocationDef getLocationDef(int index)
                           throws java.lang.IndexOutOfBoundsException
Method getLocationDef

Parameters:
index -
Returns:
LocationDef
Throws:
java.lang.IndexOutOfBoundsException

getLocationDef

public LocationDef[] getLocationDef()
Method getLocationDef

Returns:
LocationDef

getLocationDefCollection

public java.util.ArrayList getLocationDefCollection()
Method getLocationDefCollection Returns a reference to 'locationDef'. No type checking is performed on any modications to the Collection.

Returns:
ArrayList

getLocationDefCount

public int getLocationDefCount()
Method getLocationDefCount

Returns:
int

isValid

public boolean isValid()
Method isValid

Returns:
boolean

marshal

public void marshal(java.io.Writer out)
             throws org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Method marshal

Parameters:
out -
Throws:
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

marshal

public void marshal(org.xml.sax.ContentHandler handler)
             throws java.io.IOException,
                    org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Method marshal

Parameters:
handler -
Throws:
java.io.IOException
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

removeLocationDef

public boolean removeLocationDef(LocationDef vLocationDef)
Method removeLocationDef

Parameters:
vLocationDef -
Returns:
boolean

setLocationDef

public void setLocationDef(int index,
                           LocationDef vLocationDef)
                    throws java.lang.IndexOutOfBoundsException
Method setLocationDef

Parameters:
index -
vLocationDef -
Throws:
java.lang.IndexOutOfBoundsException

setLocationDef

public void setLocationDef(LocationDef[] locationDefArray)
Method setLocationDef

Parameters:
locationDefArray -

setLocationDef

public void setLocationDef(java.util.ArrayList locationDefCollection)
Method setLocationDef Sets the value of 'locationDef' by copying the given ArrayList.

Parameters:
locationDefCollection - the Vector to copy.

setLocationDefCollection

public void setLocationDefCollection(java.util.ArrayList locationDefCollection)
Method setLocationDefCollection Sets the value of 'locationDef' by setting it to the given ArrayList. No type checking is performed.

Parameters:
locationDefCollection - the ArrayList to copy.

unmarshal

public static java.lang.Object unmarshal(java.io.Reader reader)
                                  throws org.exolab.castor.xml.MarshalException,
                                         org.exolab.castor.xml.ValidationException
Method unmarshal

Parameters:
reader -
Returns:
Object
Throws:
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

validate

public void validate()
              throws org.exolab.castor.xml.ValidationException
Method validate

Throws:
org.exolab.castor.xml.ValidationException


Copyright © 2007. All Rights Reserved.