OpenNMS API 1.2.3

org.opennms.netmgt.config.categories
Class Category

java.lang.Object
  extended byorg.opennms.netmgt.config.categories.Category
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
RTCCategory

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

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

Field Summary
private  java.lang.String _comment
           
private  boolean _has_normal
          keeps track of state for field: _normal
private  boolean _has_warning
          keeps track of state for field: _warning
private  java.lang.String _label
           
private  double _normal
           
private  java.lang.String _rule
           
private  java.util.ArrayList _serviceList
           
private  double _warning
           
private  java.util.Vector propertyChangeListeners
           
 
Constructor Summary
Category()
           
 
Method Summary
 void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
          Registers a PropertyChangeListener with this class.
 void addService(int index, java.lang.String vService)
           
 void addService(java.lang.String vService)
           
 void clearService()
           
 java.util.Enumeration enumerateService()
           
 boolean equals(java.lang.Object obj)
          Note: hashCode() has not been overriden
 java.lang.String getComment()
          Returns the value of field 'comment'.
 java.lang.String getLabel()
          Returns the value of field 'label'.
 double getNormal()
          Returns the value of field 'normal'.
 java.lang.String getRule()
          Returns the value of field 'rule'.
 java.lang.String[] getService()
           
 java.lang.String getService(int index)
           
 java.util.Collection getServiceCollection()
           
 int getServiceCount()
           
 double getWarning()
          Returns the value of field 'warning'.
 boolean hasNormal()
           
 boolean hasWarning()
           
 boolean isValid()
           
 void marshal(org.xml.sax.DocumentHandler handler)
           
 void marshal(java.io.Writer out)
           
protected  void notifyPropertyChangeListeners(java.lang.String fieldName, java.lang.Object oldValue, java.lang.Object newValue)
          Notifies all registered PropertyChangeListeners when a bound property's value changes.
 boolean removePropertyChangeListener(java.beans.PropertyChangeListener pcl)
          Removes the given PropertyChangeListener from this classes list of ProperyChangeListeners.
 boolean removeService(java.lang.String vService)
           
 void setComment(java.lang.String comment)
          Sets the value of field 'comment'.
 void setLabel(java.lang.String label)
          Sets the value of field 'label'.
 void setNormal(double normal)
          Sets the value of field 'normal'.
 void setRule(java.lang.String rule)
          Sets the value of field 'rule'.
 void setService(int index, java.lang.String vService)
           
 void setService(java.lang.String[] serviceArray)
           
 void setServiceCollection(java.util.Collection vService)
           
 void setWarning(double warning)
          Sets the value of field 'warning'.
static Category unmarshal(java.io.Reader reader)
           
 void validate()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_label

private java.lang.String _label

_comment

private java.lang.String _comment

_normal

private double _normal

_has_normal

private boolean _has_normal
keeps track of state for field: _normal


_warning

private double _warning

_has_warning

private boolean _has_warning
keeps track of state for field: _warning


_serviceList

private java.util.ArrayList _serviceList

_rule

private java.lang.String _rule

propertyChangeListeners

private java.util.Vector propertyChangeListeners
Constructor Detail

Category

public Category()
Method Detail

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener pcl)
Registers a PropertyChangeListener with this class.

Parameters:
pcl - The PropertyChangeListener to register.

addService

public void addService(java.lang.String vService)
                throws java.lang.IndexOutOfBoundsException
Parameters:
vService -
Throws:
java.lang.IndexOutOfBoundsException

addService

public void addService(int index,
                       java.lang.String vService)
                throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vService -
Throws:
java.lang.IndexOutOfBoundsException

clearService

public void clearService()

enumerateService

public java.util.Enumeration enumerateService()

equals

public boolean equals(java.lang.Object obj)
Note: hashCode() has not been overriden

Parameters:
obj -

getComment

public java.lang.String getComment()
Returns the value of field 'comment'.

Returns:
the value of field 'comment'.

getLabel

public java.lang.String getLabel()
Returns the value of field 'label'.

Returns:
the value of field 'label'.

getNormal

public double getNormal()
Returns the value of field 'normal'.

Returns:
the value of field 'normal'.

getRule

public java.lang.String getRule()
Returns the value of field 'rule'.

Returns:
the value of field 'rule'.

getService

public java.lang.String getService(int index)
                            throws java.lang.IndexOutOfBoundsException
Parameters:
index -
Throws:
java.lang.IndexOutOfBoundsException

getService

public java.lang.String[] getService()

getServiceCollection

public java.util.Collection getServiceCollection()

getServiceCount

public int getServiceCount()

getWarning

public double getWarning()
Returns the value of field 'warning'.

Returns:
the value of field 'warning'.

hasNormal

public boolean hasNormal()

hasWarning

public boolean hasWarning()

isValid

public boolean isValid()

marshal

public void marshal(java.io.Writer out)
             throws org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
out -
Throws:
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

marshal

public void marshal(org.xml.sax.DocumentHandler handler)
             throws org.exolab.castor.xml.MarshalException,
                    org.exolab.castor.xml.ValidationException
Parameters:
handler -
Throws:
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

notifyPropertyChangeListeners

protected void notifyPropertyChangeListeners(java.lang.String fieldName,
                                             java.lang.Object oldValue,
                                             java.lang.Object newValue)
Notifies all registered PropertyChangeListeners when a bound property's value changes.

Parameters:
fieldName - the name of the property that has changed.
newValue - the new value of the property.
oldValue - the old value of the property.

removePropertyChangeListener

public boolean removePropertyChangeListener(java.beans.PropertyChangeListener pcl)
Removes the given PropertyChangeListener from this classes list of ProperyChangeListeners.

Parameters:
pcl - The PropertyChangeListener to remove.
Returns:
true if the given PropertyChangeListener was removed.

removeService

public boolean removeService(java.lang.String vService)
Parameters:
vService -

setComment

public void setComment(java.lang.String comment)
Sets the value of field 'comment'.

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

setLabel

public void setLabel(java.lang.String label)
Sets the value of field 'label'.

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

setNormal

public void setNormal(double normal)
Sets the value of field 'normal'.

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

setRule

public void setRule(java.lang.String rule)
Sets the value of field 'rule'.

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

setService

public void setService(int index,
                       java.lang.String vService)
                throws java.lang.IndexOutOfBoundsException
Parameters:
index -
vService -
Throws:
java.lang.IndexOutOfBoundsException

setService

public void setService(java.lang.String[] serviceArray)
Parameters:
serviceArray -

setServiceCollection

public void setServiceCollection(java.util.Collection vService)
Parameters:
vService -

setWarning

public void setWarning(double warning)
Sets the value of field 'warning'.

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

unmarshal

public static Category unmarshal(java.io.Reader reader)
                          throws org.exolab.castor.xml.MarshalException,
                                 org.exolab.castor.xml.ValidationException
Parameters:
reader -
Throws:
org.exolab.castor.xml.MarshalException
org.exolab.castor.xml.ValidationException

validate

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

OpenNMS API 1.2.3

Generated by eevans on May 29 2005 2015.