org.opennms.netmgt.config.vulnscand
Class VulnscandConfiguration

java.lang.Object
  extended by org.opennms.netmgt.config.vulnscand.VulnscandConfiguration
All Implemented Interfaces:
Serializable

public class VulnscandConfiguration
extends Object
implements Serializable

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

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

Constructor Summary
VulnscandConfiguration()
           
 
Method Summary
 void addScanLevel(int index, ScanLevel vScanLevel)
           
 void addScanLevel(ScanLevel vScanLevel)
           
 void deleteInitialSleepTime()
           
 void deleteMaxRescanThreadPoolSize()
           
 void deleteMaxSuspectThreadPoolSize()
           
 void deleteRescanFrequency()
           
 void deleteServerPort()
           
 void deleteStatus()
           
 Enumeration<ScanLevel> enumerateScanLevel()
          Method enumerateScanLevel.
 Excludes getExcludes()
          Returns the value of field 'excludes'.
 long getInitialSleepTime()
          Returns the value of field 'initialSleepTime'.
 ManagedInterfaces getManagedInterfaces()
          Returns the value of field 'managedInterfaces'.
 int getMaxRescanThreadPoolSize()
          Returns the value of field 'maxRescanThreadPoolSize'.
 int getMaxSuspectThreadPoolSize()
          Returns the value of field 'maxSuspectThreadPoolSize'.
 long getRescanFrequency()
          Returns the value of field 'rescanFrequency'.
 ScanLevel[] getScanLevel()
          Method getScanLevel.Returns the contents of the collection in an Array.
 ScanLevel getScanLevel(int index)
          Method getScanLevel.
 List<ScanLevel> getScanLevelCollection()
          Method getScanLevelCollection.Returns a reference to '_scanLevelList'.
 int getScanLevelCount()
          Method getScanLevelCount.
 String getServerAddress()
          Returns the value of field 'serverAddress'.
 String getServerPassword()
          Returns the value of field 'serverPassword'.
 int getServerPort()
          Returns the value of field 'serverPort'.
 String getServerUsername()
          Returns the value of field 'serverUsername'.
 boolean getStatus()
          Returns the value of field 'status'.
 boolean hasInitialSleepTime()
          Method hasInitialSleepTime.
 boolean hasMaxRescanThreadPoolSize()
          Method hasMaxRescanThreadPoolSize.
 boolean hasMaxSuspectThreadPoolSize()
          Method hasMaxSuspectThreadPoolSize.
 boolean hasRescanFrequency()
          Method hasRescanFrequency.
 boolean hasServerPort()
          Method hasServerPort.
 boolean hasStatus()
          Method hasStatus.
 boolean isStatus()
          Returns the value of field 'status'.
 boolean isValid()
          Method isValid.
 Iterator<ScanLevel> iterateScanLevel()
          Method iterateScanLevel.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllScanLevel()
           
 boolean removeScanLevel(ScanLevel vScanLevel)
          Method removeScanLevel.
 ScanLevel removeScanLevelAt(int index)
          Method removeScanLevelAt.
 void setExcludes(Excludes excludes)
          Sets the value of field 'excludes'.
 void setInitialSleepTime(long initialSleepTime)
          Sets the value of field 'initialSleepTime'.
 void setManagedInterfaces(ManagedInterfaces managedInterfaces)
          Sets the value of field 'managedInterfaces'.
 void setMaxRescanThreadPoolSize(int maxRescanThreadPoolSize)
          Sets the value of field 'maxRescanThreadPoolSize'.
 void setMaxSuspectThreadPoolSize(int maxSuspectThreadPoolSize)
          Sets the value of field 'maxSuspectThreadPoolSize'.
 void setRescanFrequency(long rescanFrequency)
          Sets the value of field 'rescanFrequency'.
 void setScanLevel(int index, ScanLevel vScanLevel)
           
 void setScanLevel(List<ScanLevel> vScanLevelList)
          Sets the value of '_scanLevelList' by copying the given Vector.
 void setScanLevel(ScanLevel[] vScanLevelArray)
           
 void setScanLevelCollection(List<ScanLevel> scanLevelList)
          Deprecated.  
 void setServerAddress(String serverAddress)
          Sets the value of field 'serverAddress'.
 void setServerPassword(String serverPassword)
          Sets the value of field 'serverPassword'.
 void setServerPort(int serverPort)
          Sets the value of field 'serverPort'.
 void setServerUsername(String serverUsername)
          Sets the value of field 'serverUsername'.
 void setStatus(boolean status)
          Sets the value of field 'status'.
static VulnscandConfiguration 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

VulnscandConfiguration

public VulnscandConfiguration()
Method Detail

addScanLevel

public void addScanLevel(ScanLevel vScanLevel)
                  throws IndexOutOfBoundsException
Parameters:
vScanLevel -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addScanLevel

public void addScanLevel(int index,
                         ScanLevel vScanLevel)
                  throws IndexOutOfBoundsException
Parameters:
index -
vScanLevel -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

deleteInitialSleepTime

public void deleteInitialSleepTime()

deleteMaxRescanThreadPoolSize

public void deleteMaxRescanThreadPoolSize()

deleteMaxSuspectThreadPoolSize

public void deleteMaxSuspectThreadPoolSize()

deleteRescanFrequency

public void deleteRescanFrequency()

deleteServerPort

public void deleteServerPort()

deleteStatus

public void deleteStatus()

enumerateScanLevel

public Enumeration<ScanLevel> enumerateScanLevel()
Method enumerateScanLevel.

Returns:
an Enumeration over all possible elements of this collection

getExcludes

public Excludes getExcludes()
Returns the value of field 'excludes'. The field 'excludes' has the following description: Excludes that override all includes (managed interfaces or scan levels)

Returns:
the value of field 'Excludes'.

getInitialSleepTime

public long getInitialSleepTime()
Returns the value of field 'initialSleepTime'.

Returns:
the value of field 'InitialSleepTime'.

getManagedInterfaces

public ManagedInterfaces getManagedInterfaces()
Returns the value of field 'managedInterfaces'. The field 'managedInterfaces' has the following description: Settings that apply to all managed interfaces

Returns:
the value of field 'ManagedInterfaces'.

getMaxRescanThreadPoolSize

public int getMaxRescanThreadPoolSize()
Returns the value of field 'maxRescanThreadPoolSize'.

Returns:
the value of field 'MaxRescanThreadPoolSize'.

getMaxSuspectThreadPoolSize

public int getMaxSuspectThreadPoolSize()
Returns the value of field 'maxSuspectThreadPoolSize'.

Returns:
the value of field 'MaxSuspectThreadPoolSize'.

getRescanFrequency

public long getRescanFrequency()
Returns the value of field 'rescanFrequency'.

Returns:
the value of field 'RescanFrequency'.

getScanLevel

public ScanLevel getScanLevel(int index)
                       throws IndexOutOfBoundsException
Method getScanLevel.

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

getScanLevel

public ScanLevel[] getScanLevel()
Method getScanLevel.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

getScanLevelCollection

public List<ScanLevel> getScanLevelCollection()
Method getScanLevelCollection.Returns a reference to '_scanLevelList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getScanLevelCount

public int getScanLevelCount()
Method getScanLevelCount.

Returns:
the size of this collection

getServerAddress

public String getServerAddress()
Returns the value of field 'serverAddress'.

Returns:
the value of field 'ServerAddress'.

getServerPassword

public String getServerPassword()
Returns the value of field 'serverPassword'.

Returns:
the value of field 'ServerPassword'.

getServerPort

public int getServerPort()
Returns the value of field 'serverPort'.

Returns:
the value of field 'ServerPort'.

getServerUsername

public String getServerUsername()
Returns the value of field 'serverUsername'.

Returns:
the value of field 'ServerUsername'.

getStatus

public boolean getStatus()
Returns the value of field 'status'.

Returns:
the value of field 'Status'.

hasInitialSleepTime

public boolean hasInitialSleepTime()
Method hasInitialSleepTime.

Returns:
true if at least one InitialSleepTime has been added

hasMaxRescanThreadPoolSize

public boolean hasMaxRescanThreadPoolSize()
Method hasMaxRescanThreadPoolSize.

Returns:
true if at least one MaxRescanThreadPoolSize has been added

hasMaxSuspectThreadPoolSize

public boolean hasMaxSuspectThreadPoolSize()
Method hasMaxSuspectThreadPoolSize.

Returns:
true if at least one MaxSuspectThreadPoolSize has been added

hasRescanFrequency

public boolean hasRescanFrequency()
Method hasRescanFrequency.

Returns:
true if at least one RescanFrequency has been added

hasServerPort

public boolean hasServerPort()
Method hasServerPort.

Returns:
true if at least one ServerPort has been added

hasStatus

public boolean hasStatus()
Method hasStatus.

Returns:
true if at least one Status has been added

isStatus

public boolean isStatus()
Returns the value of field 'status'.

Returns:
the value of field 'Status'.

isValid

public boolean isValid()
Method isValid.

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

iterateScanLevel

public Iterator<ScanLevel> iterateScanLevel()
Method iterateScanLevel.

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

removeAllScanLevel

public void removeAllScanLevel()

removeScanLevel

public boolean removeScanLevel(ScanLevel vScanLevel)
Method removeScanLevel.

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

removeScanLevelAt

public ScanLevel removeScanLevelAt(int index)
Method removeScanLevelAt.

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

setExcludes

public void setExcludes(Excludes excludes)
Sets the value of field 'excludes'. The field 'excludes' has the following description: Excludes that override all includes (managed interfaces or scan levels)

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

setInitialSleepTime

public void setInitialSleepTime(long initialSleepTime)
Sets the value of field 'initialSleepTime'.

Parameters:
initialSleepTime - the value of field 'initialSleepTime'

setManagedInterfaces

public void setManagedInterfaces(ManagedInterfaces managedInterfaces)
Sets the value of field 'managedInterfaces'. The field 'managedInterfaces' has the following description: Settings that apply to all managed interfaces

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

setMaxRescanThreadPoolSize

public void setMaxRescanThreadPoolSize(int maxRescanThreadPoolSize)
Sets the value of field 'maxRescanThreadPoolSize'.

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

setMaxSuspectThreadPoolSize

public void setMaxSuspectThreadPoolSize(int maxSuspectThreadPoolSize)
Sets the value of field 'maxSuspectThreadPoolSize'.

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

setRescanFrequency

public void setRescanFrequency(long rescanFrequency)
Sets the value of field 'rescanFrequency'.

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

setScanLevel

public void setScanLevel(int index,
                         ScanLevel vScanLevel)
                  throws IndexOutOfBoundsException
Parameters:
index -
vScanLevel -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setScanLevel

public void setScanLevel(ScanLevel[] vScanLevelArray)
Parameters:
vScanLevelArray -

setScanLevel

public void setScanLevel(List<ScanLevel> vScanLevelList)
Sets the value of '_scanLevelList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vScanLevelList - the Vector to copy.

setScanLevelCollection

public void setScanLevelCollection(List<ScanLevel> scanLevelList)
Deprecated. 

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

Parameters:
scanLevelList - the Vector to set.

setServerAddress

public void setServerAddress(String serverAddress)
Sets the value of field 'serverAddress'.

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

setServerPassword

public void setServerPassword(String serverPassword)
Sets the value of field 'serverPassword'.

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

setServerPort

public void setServerPort(int serverPort)
Sets the value of field 'serverPort'.

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

setServerUsername

public void setServerUsername(String serverUsername)
Sets the value of field 'serverUsername'.

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

setStatus

public void setStatus(boolean status)
Sets the value of field 'status'.

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

unmarshal

public static VulnscandConfiguration 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.vulnscand.VulnscandConfiguration
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.