org.opennms.netmgt.config.provisiond
Class ProvisiondConfiguration

java.lang.Object
  extended by org.opennms.netmgt.config.provisiond.ProvisiondConfiguration
All Implemented Interfaces:
Serializable

public class ProvisiondConfiguration
extends Object
implements Serializable

Behavior configuration for the Provisioner Daemon

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

Constructor Summary
ProvisiondConfiguration()
           
 
Method Summary
 void addRequisitionDef(int index, RequisitionDef vRequisitionDef)
           
 void addRequisitionDef(RequisitionDef vRequisitionDef)
           
 void deleteImportThreads()
           
 void deleteRescanThreads()
           
 void deleteScanThreads()
           
 void deleteWriteThreads()
           
 Enumeration<RequisitionDef> enumerateRequisitionDef()
          Method enumerateRequisitionDef.
 boolean equals(Object obj)
          Overrides the java.lang.Object.equals method.
 String getForeignSourceDir()
          Returns the value of field 'foreignSourceDir'.
 long getImportThreads()
          Returns the value of field 'importThreads'.
 RequisitionDef[] getRequisitionDef()
          Method getRequisitionDef.Returns the contents of the collection in an Array.
 RequisitionDef getRequisitionDef(int index)
          Method getRequisitionDef.
 List<RequisitionDef> getRequisitionDefCollection()
          Method getRequisitionDefCollection.Returns a reference to '_requisitionDefList'.
 int getRequisitionDefCount()
          Method getRequisitionDefCount.
 String getRequistionDir()
          Returns the value of field 'requistionDir'.
 long getRescanThreads()
          Returns the value of field 'rescanThreads'.
 long getScanThreads()
          Returns the value of field 'scanThreads'.
 long getWriteThreads()
          Returns the value of field 'writeThreads'.
 int hashCode()
          Overrides the java.lang.Object.hashCode method.
 boolean hasImportThreads()
          Method hasImportThreads.
 boolean hasRescanThreads()
          Method hasRescanThreads.
 boolean hasScanThreads()
          Method hasScanThreads.
 boolean hasWriteThreads()
          Method hasWriteThreads.
 boolean isValid()
          Method isValid.
 Iterator<RequisitionDef> iterateRequisitionDef()
          Method iterateRequisitionDef.
 void marshal(ContentHandler handler)
           
 void marshal(Writer out)
           
 void removeAllRequisitionDef()
           
 boolean removeRequisitionDef(RequisitionDef vRequisitionDef)
          Method removeRequisitionDef.
 RequisitionDef removeRequisitionDefAt(int index)
          Method removeRequisitionDefAt.
 void setForeignSourceDir(String foreignSourceDir)
          Sets the value of field 'foreignSourceDir'.
 void setImportThreads(long importThreads)
          Sets the value of field 'importThreads'.
 void setRequisitionDef(int index, RequisitionDef vRequisitionDef)
           
 void setRequisitionDef(List<RequisitionDef> vRequisitionDefList)
          Sets the value of '_requisitionDefList' by copying the given Vector.
 void setRequisitionDef(RequisitionDef[] vRequisitionDefArray)
           
 void setRequisitionDefCollection(List<RequisitionDef> requisitionDefList)
          Deprecated.  
 void setRequistionDir(String requistionDir)
          Sets the value of field 'requistionDir'.
 void setRescanThreads(long rescanThreads)
          Sets the value of field 'rescanThreads'.
 void setScanThreads(long scanThreads)
          Sets the value of field 'scanThreads'.
 void setWriteThreads(long writeThreads)
          Sets the value of field 'writeThreads'.
static ProvisiondConfiguration 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

ProvisiondConfiguration

public ProvisiondConfiguration()
Method Detail

addRequisitionDef

public void addRequisitionDef(RequisitionDef vRequisitionDef)
                       throws IndexOutOfBoundsException
Parameters:
vRequisitionDef -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

addRequisitionDef

public void addRequisitionDef(int index,
                              RequisitionDef vRequisitionDef)
                       throws IndexOutOfBoundsException
Parameters:
index -
vRequisitionDef -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

deleteImportThreads

public void deleteImportThreads()

deleteRescanThreads

public void deleteRescanThreads()

deleteScanThreads

public void deleteScanThreads()

deleteWriteThreads

public void deleteWriteThreads()

enumerateRequisitionDef

public Enumeration<RequisitionDef> enumerateRequisitionDef()
Method enumerateRequisitionDef.

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.

getForeignSourceDir

public String getForeignSourceDir()
Returns the value of field 'foreignSourceDir'.

Returns:
the value of field 'ForeignSourceDir'.

getImportThreads

public long getImportThreads()
Returns the value of field 'importThreads'.

Returns:
the value of field 'ImportThreads'.

getRequisitionDef

public RequisitionDef getRequisitionDef(int index)
                                 throws IndexOutOfBoundsException
Method getRequisitionDef.

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

getRequisitionDef

public RequisitionDef[] getRequisitionDef()
Method getRequisitionDef.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

getRequisitionDefCollection

public List<RequisitionDef> getRequisitionDefCollection()
Method getRequisitionDefCollection.Returns a reference to '_requisitionDefList'. No type checking is performed on any modifications to the Vector.

Returns:
a reference to the Vector backing this class

getRequisitionDefCount

public int getRequisitionDefCount()
Method getRequisitionDefCount.

Returns:
the size of this collection

getRequistionDir

public String getRequistionDir()
Returns the value of field 'requistionDir'.

Returns:
the value of field 'RequistionDir'.

getRescanThreads

public long getRescanThreads()
Returns the value of field 'rescanThreads'.

Returns:
the value of field 'RescanThreads'.

getScanThreads

public long getScanThreads()
Returns the value of field 'scanThreads'.

Returns:
the value of field 'ScanThreads'.

getWriteThreads

public long getWriteThreads()
Returns the value of field 'writeThreads'.

Returns:
the value of field 'WriteThreads'.

hasImportThreads

public boolean hasImportThreads()
Method hasImportThreads.

Returns:
true if at least one ImportThreads has been added

hasRescanThreads

public boolean hasRescanThreads()
Method hasRescanThreads.

Returns:
true if at least one RescanThreads has been added

hasScanThreads

public boolean hasScanThreads()
Method hasScanThreads.

Returns:
true if at least one ScanThreads has been added

hasWriteThreads

public boolean hasWriteThreads()
Method hasWriteThreads.

Returns:
true if at least one WriteThreads 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

iterateRequisitionDef

public Iterator<RequisitionDef> iterateRequisitionDef()
Method iterateRequisitionDef.

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

removeAllRequisitionDef

public void removeAllRequisitionDef()

removeRequisitionDef

public boolean removeRequisitionDef(RequisitionDef vRequisitionDef)
Method removeRequisitionDef.

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

removeRequisitionDefAt

public RequisitionDef removeRequisitionDefAt(int index)
Method removeRequisitionDefAt.

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

setForeignSourceDir

public void setForeignSourceDir(String foreignSourceDir)
Sets the value of field 'foreignSourceDir'.

Parameters:
foreignSourceDir - the value of field 'foreignSourceDir'

setImportThreads

public void setImportThreads(long importThreads)
Sets the value of field 'importThreads'.

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

setRequisitionDef

public void setRequisitionDef(int index,
                              RequisitionDef vRequisitionDef)
                       throws IndexOutOfBoundsException
Parameters:
index -
vRequisitionDef -
Throws:
IndexOutOfBoundsException - if the index given is outside the bounds of the collection

setRequisitionDef

public void setRequisitionDef(RequisitionDef[] vRequisitionDefArray)
Parameters:
vRequisitionDefArray -

setRequisitionDef

public void setRequisitionDef(List<RequisitionDef> vRequisitionDefList)
Sets the value of '_requisitionDefList' by copying the given Vector. All elements will be checked for type safety.

Parameters:
vRequisitionDefList - the Vector to copy.

setRequisitionDefCollection

public void setRequisitionDefCollection(List<RequisitionDef> requisitionDefList)
Deprecated. 

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

Parameters:
requisitionDefList - the Vector to set.

setRequistionDir

public void setRequistionDir(String requistionDir)
Sets the value of field 'requistionDir'.

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

setRescanThreads

public void setRescanThreads(long rescanThreads)
Sets the value of field 'rescanThreads'.

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

setScanThreads

public void setScanThreads(long scanThreads)
Sets the value of field 'scanThreads'.

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

setWriteThreads

public void setWriteThreads(long writeThreads)
Sets the value of field 'writeThreads'.

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

unmarshal

public static ProvisiondConfiguration 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.provisiond.ProvisiondConfiguration
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.