org.opennms.netmgt.config.map.adapter
Class MapsAdapterConfiguration

java.lang.Object
  extended by org.opennms.netmgt.config.map.adapter.MapsAdapterConfiguration
All Implemented Interfaces:
Serializable

public class MapsAdapterConfiguration
extends Object
implements Serializable

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

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

Constructor Summary
MapsAdapterConfiguration()
           
 
Method Summary
 void addPackage(int index, Package vPackage)
           
 void addPackage(Package vPackage)
           
 void deleteElementDimension()
           
 Enumeration<Package> enumeratePackage()
          Method enumeratePackage.
 boolean equals(Object obj)
          Overrides the java.lang.Object.equals method.
 Cmaps getCmaps()
          Returns the value of field 'cmaps'.
 int getElementDimension()
          Returns the value of field 'elementDimension'.
 Package[] getPackage()
          Method getPackage.Returns the contents of the collection in an Array.
 Package getPackage(int index)
          Method getPackage.
 List<Package> getPackageCollection()
          Method getPackageCollection.Returns a reference to '_packageList'.
 int getPackageCount()
          Method getPackageCount.
 boolean hasElementDimension()
          Method hasElementDimension.
 int hashCode()
          Overrides the java.lang.Object.hashCode method.
 boolean isValid()
          Method isValid.
 Iterator<Package> iteratePackage()
          Method iteratePackage.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllPackage()
           
 boolean removePackage(Package vPackage)
          Method removePackage.
 Package removePackageAt(int index)
          Method removePackageAt.
 void setCmaps(Cmaps cmaps)
          Sets the value of field 'cmaps'.
 void setElementDimension(int elementDimension)
          Sets the value of field 'elementDimension'.
 void setPackage(int index, Package vPackage)
           
 void setPackage(List<Package> vPackageList)
          Sets the value of '_packageList' by copying the given Vector.
 void setPackage(Package[] vPackageArray)
           
 void setPackageCollection(List<Package> _packageList)
          Deprecated.  
static MapsAdapterConfiguration unmarshal(Reader reader)
          Method unmarshal.
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapsAdapterConfiguration

public MapsAdapterConfiguration()
Method Detail

addPackage

public void addPackage(Package vPackage)
                throws IndexOutOfBoundsException
Parameters:
vPackage -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addPackage

public void addPackage(int index,
                       Package vPackage)
                throws IndexOutOfBoundsException
Parameters:
index -
vPackage -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

deleteElementDimension

public void deleteElementDimension()

enumeratePackage

public Enumeration<Package> enumeratePackage()
Method enumeratePackage.

Returns:
an Enumeration over all possible elements of this collection

equals

public boolean equals(Object obj)
Overrides the java.lang.Object.equals method.

Overrides:
equals in class Object
Parameters:
obj -
Returns:
true if the objects are equal.

getCmaps

public Cmaps getCmaps()
Returns the value of field 'cmaps'. The field 'cmaps' has the following description: Configuration of maps functionality

Returns:
the value of field 'Cmaps'.

getElementDimension

public int getElementDimension()
Returns the value of field 'elementDimension'. The field 'elementDimension' has the following description: The Element dimension in pixel.

Returns:
the value of field 'ElementDimension'.

getPackage

public Package getPackage(int index)
                   throws IndexOutOfBoundsException
Method getPackage.

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

getPackage

public Package[] getPackage()
Method getPackage.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

getPackageCollection

public List<Package> getPackageCollection()
Method getPackageCollection.Returns a reference to '_packageList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getPackageCount

public int getPackageCount()
Method getPackageCount.

Returns:
the size of this collection

hasElementDimension

public boolean hasElementDimension()
Method hasElementDimension.

Returns:
true if at least one ElementDimension has been added

hashCode

public int hashCode()
Overrides the java.lang.Object.hashCode method.

The following steps came from Effective Java Programming Language Guide by Joshua Bloch, Chapter 3

Overrides:
hashCode in class Object
Returns:
a hash code value for the object.

isValid

public boolean isValid()
Method isValid.

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

iteratePackage

public Iterator<Package> iteratePackage()
Method iteratePackage.

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

removeAllPackage

public void removeAllPackage()

removePackage

public boolean removePackage(Package vPackage)
Method removePackage.

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

removePackageAt

public Package removePackageAt(int index)
Method removePackageAt.

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

setCmaps

public void setCmaps(Cmaps cmaps)
Sets the value of field 'cmaps'. The field 'cmaps' has the following description: Configuration of maps functionality

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

setElementDimension

public void setElementDimension(int elementDimension)
Sets the value of field 'elementDimension'. The field 'elementDimension' has the following description: The Element dimension in pixel.

Parameters:
elementDimension - the value of field 'elementDimension'

setPackage

public void setPackage(int index,
                       Package vPackage)
                throws IndexOutOfBoundsException
Parameters:
index -
vPackage -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setPackage

public void setPackage(Package[] vPackageArray)
Parameters:
vPackageArray -

setPackage

public void setPackage(List<Package> vPackageList)
Sets the value of '_packageList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vPackageList - the Vector to copy.

setPackageCollection

public void setPackageCollection(List<Package> _packageList)
Deprecated. 

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

Parameters:
_packageList - the Vector to set.

unmarshal

public static MapsAdapterConfiguration 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.map.adapter.MapsAdapterConfiguratio
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 © 2011. All Rights Reserved.