org.opennms.netmgt.config.modelimport
Class Interface

java.lang.Object
  extended by org.opennms.netmgt.config.modelimport.Interface
All Implemented Interfaces:
Serializable

public class Interface
extends Object
implements Serializable

A network interface.

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

Constructor Summary
Interface()
           
 
Method Summary
 void addCategory(Category vCategory)
           
 void addCategory(int index, Category vCategory)
           
 void addMonitoredService(int index, MonitoredService vMonitoredService)
           
 void addMonitoredService(MonitoredService vMonitoredService)
           
 void deleteManaged()
           
 void deleteStatus()
           
 Enumeration<Category> enumerateCategory()
          Method enumerateCategory.
 Enumeration<MonitoredService> enumerateMonitoredService()
          Method enumerateMonitoredService.
 Category[] getCategory()
          Method getCategory.Returns the contents of the collection in an Array.
 Category getCategory(int index)
          Method getCategory.
 List<Category> getCategoryCollection()
          Method getCategoryCollection.Returns a reference to '_categoryList'.
 int getCategoryCount()
          Method getCategoryCount.
 Object getDescr()
          Returns the value of field 'descr'.
 String getIpAddr()
          Returns the value of field 'ipAddr'.
 boolean getManaged()
          Returns the value of field 'managed'.
 MonitoredService[] getMonitoredService()
          Method getMonitoredService.Returns the contents of the collection in an Array.
 MonitoredService getMonitoredService(int index)
          Method getMonitoredService.
 List<MonitoredService> getMonitoredServiceCollection()
          Method getMonitoredServiceCollection.Returns a reference to '_monitoredServiceList'.
 int getMonitoredServiceCount()
          Method getMonitoredServiceCount.
 String getSnmpPrimary()
          Returns the value of field 'snmpPrimary'.
 int getStatus()
          Returns the value of field 'status'.
 boolean hasManaged()
          Method hasManaged.
 boolean hasStatus()
          Method hasStatus.
 boolean isManaged()
          Returns the value of field 'managed'.
 boolean isValid()
          Method isValid.
 Iterator<Category> iterateCategory()
          Method iterateCategory.
 Iterator<MonitoredService> iterateMonitoredService()
          Method iterateMonitoredService.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllCategory()
           
 void removeAllMonitoredService()
           
 boolean removeCategory(Category vCategory)
          Method removeCategory.
 Category removeCategoryAt(int index)
          Method removeCategoryAt.
 boolean removeMonitoredService(MonitoredService vMonitoredService)
          Method removeMonitoredService.
 MonitoredService removeMonitoredServiceAt(int index)
          Method removeMonitoredServiceAt.
 void setCategory(Category[] vCategoryArray)
           
 void setCategory(int index, Category vCategory)
           
 void setCategory(List<Category> vCategoryList)
          Sets the value of '_categoryList' by copying the given Vector.
 void setCategoryCollection(List<Category> categoryList)
          Deprecated.  
 void setDescr(Object descr)
          Sets the value of field 'descr'.
 void setIpAddr(String ipAddr)
          Sets the value of field 'ipAddr'.
 void setManaged(boolean managed)
          Sets the value of field 'managed'.
 void setMonitoredService(int index, MonitoredService vMonitoredService)
           
 void setMonitoredService(List<MonitoredService> vMonitoredServiceList)
          Sets the value of '_monitoredServiceList' by copying the given Vector.
 void setMonitoredService(MonitoredService[] vMonitoredServiceArray)
           
 void setMonitoredServiceCollection(List<MonitoredService> monitoredServiceList)
          Deprecated.  
 void setSnmpPrimary(String snmpPrimary)
          Sets the value of field 'snmpPrimary'.
 void setStatus(int status)
          Sets the value of field 'status'.
static Interface 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

Interface

public Interface()
Method Detail

addCategory

public void addCategory(Category vCategory)
                 throws IndexOutOfBoundsException
Parameters:
vCategory -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addCategory

public void addCategory(int index,
                        Category vCategory)
                 throws IndexOutOfBoundsException
Parameters:
index -
vCategory -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addMonitoredService

public void addMonitoredService(MonitoredService vMonitoredService)
                         throws IndexOutOfBoundsException
Parameters:
vMonitoredService -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addMonitoredService

public void addMonitoredService(int index,
                                MonitoredService vMonitoredService)
                         throws IndexOutOfBoundsException
Parameters:
index -
vMonitoredService -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

deleteManaged

public void deleteManaged()

deleteStatus

public void deleteStatus()

enumerateCategory

public Enumeration<Category> enumerateCategory()
Method enumerateCategory.

Returns:
an Enumeration over all possible elements of this collection

enumerateMonitoredService

public Enumeration<MonitoredService> enumerateMonitoredService()
Method enumerateMonitoredService.

Returns:
an Enumeration over all possible elements of this collection

getCategory

public Category getCategory(int index)
                     throws IndexOutOfBoundsException
Method getCategory.

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

getCategory

public Category[] getCategory()
Method getCategory.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

getCategoryCollection

public List<Category> getCategoryCollection()
Method getCategoryCollection.Returns a reference to '_categoryList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getCategoryCount

public int getCategoryCount()
Method getCategoryCount.

Returns:
the size of this collection

getDescr

public Object getDescr()
Returns the value of field 'descr'. The field 'descr' has the following description: This will be used to set a description field. Currently a calculation of (ifDescr | ifName | ifAlias)

Returns:
the value of field 'Descr'.

getIpAddr

public String getIpAddr()
Returns the value of field 'ipAddr'.

Returns:
the value of field 'IpAddr'.

getManaged

public boolean getManaged()
Returns the value of field 'managed'.

Returns:
the value of field 'Managed'.

getMonitoredService

public MonitoredService getMonitoredService(int index)
                                     throws IndexOutOfBoundsException
Method getMonitoredService.

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

getMonitoredService

public MonitoredService[] getMonitoredService()
Method getMonitoredService.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

getMonitoredServiceCollection

public List<MonitoredService> getMonitoredServiceCollection()
Method getMonitoredServiceCollection.Returns a reference to '_monitoredServiceList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getMonitoredServiceCount

public int getMonitoredServiceCount()
Method getMonitoredServiceCount.

Returns:
the size of this collection

getSnmpPrimary

public String getSnmpPrimary()
Returns the value of field 'snmpPrimary'. The field 'snmpPrimary' has the following description: This attribute is used by OpenNMS to control SNMP data collection. P - Primary interface. This is the "preferred interface used in data collection. S - Secondary interface. This interface meets all the qualifications to be a primary interface. C - Collectable interface. This is a manual setting controlled by the user. N - Not a collectable interface. This is a manual setting controlled by the user. If the snmpStorageFlag is set to "all", then all interfaces not set to 'N' will be collected. If the snmpStorageFlag is set to "select", then all interfaces with 'P|S|C' will be collected. If the snmpStorageFlag is set to "primary", then only the interfaces set to 'P' will be collected.

Returns:
the value of field 'SnmpPrimary'.

getStatus

public int getStatus()
Returns the value of field 'status'. The field 'status' has the following description: Set this optional value to 3 to indicate "testing". Any other value is ignored.

Returns:
the value of field 'Status'.

hasManaged

public boolean hasManaged()
Method hasManaged.

Returns:
true if at least one Managed has been added

hasStatus

public boolean hasStatus()
Method hasStatus.

Returns:
true if at least one Status has been added

isManaged

public boolean isManaged()
Returns the value of field 'managed'.

Returns:
the value of field 'Managed'.

isValid

public boolean isValid()
Method isValid.

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

iterateCategory

public Iterator<Category> iterateCategory()
Method iterateCategory.

Returns:
an Iterator over all possible elements in this collection

iterateMonitoredService

public Iterator<MonitoredService> iterateMonitoredService()
Method iterateMonitoredService.

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

removeAllCategory

public void removeAllCategory()

removeAllMonitoredService

public void removeAllMonitoredService()

removeCategory

public boolean removeCategory(Category vCategory)
Method removeCategory.

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

removeCategoryAt

public Category removeCategoryAt(int index)
Method removeCategoryAt.

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

removeMonitoredService

public boolean removeMonitoredService(MonitoredService vMonitoredService)
Method removeMonitoredService.

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

removeMonitoredServiceAt

public MonitoredService removeMonitoredServiceAt(int index)
Method removeMonitoredServiceAt.

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

setCategory

public void setCategory(int index,
                        Category vCategory)
                 throws IndexOutOfBoundsException
Parameters:
index -
vCategory -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setCategory

public void setCategory(Category[] vCategoryArray)
Parameters:
vCategoryArray -

setCategory

public void setCategory(List<Category> vCategoryList)
Sets the value of '_categoryList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vCategoryList - the Vector to copy.

setCategoryCollection

public void setCategoryCollection(List<Category> categoryList)
Deprecated. 

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

Parameters:
categoryList - the Vector to set.

setDescr

public void setDescr(Object descr)
Sets the value of field 'descr'. The field 'descr' has the following description: This will be used to set a description field. Currently a calculation of (ifDescr | ifName | ifAlias)

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

setIpAddr

public void setIpAddr(String ipAddr)
Sets the value of field 'ipAddr'.

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

setManaged

public void setManaged(boolean managed)
Sets the value of field 'managed'.

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

setMonitoredService

public void setMonitoredService(int index,
                                MonitoredService vMonitoredService)
                         throws IndexOutOfBoundsException
Parameters:
index -
vMonitoredService -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setMonitoredService

public void setMonitoredService(MonitoredService[] vMonitoredServiceArray)
Parameters:
vMonitoredServiceArray -

setMonitoredService

public void setMonitoredService(List<MonitoredService> vMonitoredServiceList)
Sets the value of '_monitoredServiceList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vMonitoredServiceList - the Vector to copy.

setMonitoredServiceCollection

public void setMonitoredServiceCollection(List<MonitoredService> monitoredServiceList)
Deprecated. 

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

Parameters:
monitoredServiceList - the Vector to set.

setSnmpPrimary

public void setSnmpPrimary(String snmpPrimary)
Sets the value of field 'snmpPrimary'. The field 'snmpPrimary' has the following description: This attribute is used by OpenNMS to control SNMP data collection. P - Primary interface. This is the "preferred interface used in data collection. S - Secondary interface. This interface meets all the qualifications to be a primary interface. C - Collectable interface. This is a manual setting controlled by the user. N - Not a collectable interface. This is a manual setting controlled by the user. If the snmpStorageFlag is set to "all", then all interfaces not set to 'N' will be collected. If the snmpStorageFlag is set to "select", then all interfaces with 'P|S|C' will be collected. If the snmpStorageFlag is set to "primary", then only the interfaces set to 'P' will be collected.

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

setStatus

public void setStatus(int status)
Sets the value of field 'status'. The field 'status' has the following description: Set this optional value to 3 to indicate "testing". Any other value is ignored.

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

unmarshal

public static Interface 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.modelimport.Interface
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.