Class JdbcDataSource
- java.lang.Object
-
- org.opennms.netmgt.config.opennmsDataSources.JdbcDataSource
-
- All Implemented Interfaces:
Serializable
public class JdbcDataSource extends Object implements Serializable
Top-level element for the opennms-database.xml configuration file.- Version:
- $Revision$ $Date$
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description JdbcDataSource()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description void
addParam(int index, Param vParam)
void
addParam(Param vParam)
Enumeration<Param>
enumerateParam()
Method enumerateParam.boolean
equals(Object obj)
Overrides the Object.equals method.String
getClassName()
Returns the value of field 'className'.String
getDatabaseName()
Returns the value of field 'databaseName'.String
getName()
Returns the value of field 'name'.Param[]
getParam()
Method getParam.Returns the contents of the collection in an Array.Param
getParam(int index)
Method getParam.List<Param>
getParamCollection()
Method getParamCollection.Returns a reference to 'paramList'.int
getParamCount()
Method getParamCount.String
getPassword()
String
getRawPassword()
Returns the value of field 'password'.String
getRawUserName()
Returns the value of field 'userName'.String
getSchemaName()
Returns the value of field 'schemaName'.String
getUrl()
Returns the value of field 'url'.String
getUserName()
int
hashCode()
Method hashCode.String
interpolateAttribute(String value)
String
interpolateAttribute(String value, String keystoreFile, String password)
Iterator<Param>
iterateParam()
Method iterateParam.void
removeAllParam()
boolean
removeParam(Param vParam)
Method removeParam.Param
removeParamAt(int index)
Method removeParamAt.void
setClassName(String className)
Sets the value of field 'className'.void
setDatabaseName(String databaseName)
Sets the value of field 'databaseName'.void
setName(String name)
Sets the value of field 'name'.void
setParam(int index, Param vParam)
void
setParam(List<Param> vParamList)
Sets the value of 'paramList' by copying the given Vector.void
setParam(Param[] vParamArray)
void
setParamCollection(List<Param> paramList)
Deprecated.void
setPassword(String rawPassword)
Sets the value of field 'rawPassword'.void
setSchemaName(String schemaName)
Sets the value of field 'schemaName'.void
setUrl(String url)
Sets the value of field 'url'.void
setUserName(String rawUserName)
Sets the value of field 'rawUserName'.
-
-
-
Method Detail
-
addParam
public void addParam(Param vParam) throws IndexOutOfBoundsException
- Parameters:
vParam
-- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
addParam
public void addParam(int index, Param vParam) throws IndexOutOfBoundsException
- Parameters:
index
-vParam
-- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
enumerateParam
public Enumeration<Param> enumerateParam()
Method enumerateParam.- Returns:
- an Enumeration over all possible elements of this collection
-
equals
public boolean equals(Object obj)
Overrides the Object.equals method.
-
getClassName
public String getClassName()
Returns the value of field 'className'.- Returns:
- the value of field 'ClassName'.
-
getDatabaseName
public String getDatabaseName()
Returns the value of field 'databaseName'.- Returns:
- the value of field 'DatabaseName'.
-
getName
public String getName()
Returns the value of field 'name'.- Returns:
- the value of field 'Name'.
-
getParam
public Param getParam(int index) throws IndexOutOfBoundsException
Method getParam.- Parameters:
index
-- Returns:
- the value of the org.opennms.netmgt.config.opennmsDataSources.Param at the given index
- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
getParam
public Param[] getParam()
Method getParam.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
-
getParamCollection
public List<Param> getParamCollection()
Method getParamCollection.Returns a reference to 'paramList'. No type checking is performed on any modifications to the Vector.- Returns:
- a reference to the Vector backing this class
-
getParamCount
public int getParamCount()
Method getParamCount.- Returns:
- the size of this collection
-
getRawPassword
public String getRawPassword()
Returns the value of field 'password'.- Returns:
- the value of field 'Password'.
-
getSchemaName
public String getSchemaName()
Returns the value of field 'schemaName'.- Returns:
- the value of field 'SchemaName'.
-
getUrl
public String getUrl()
Returns the value of field 'url'.- Returns:
- the value of field 'Url'.
-
getRawUserName
public String getRawUserName()
Returns the value of field 'userName'.- Returns:
- the value of field 'UserName'.
-
hashCode
public int hashCode()
Method hashCode.
-
iterateParam
public Iterator<Param> iterateParam()
Method iterateParam.- Returns:
- an Iterator over all possible elements in this collection
-
removeAllParam
public void removeAllParam()
-
removeParam
public boolean removeParam(Param vParam)
Method removeParam.- Parameters:
vParam
-- Returns:
- true if the object was removed from the collection.
-
removeParamAt
public Param removeParamAt(int index)
Method removeParamAt.- Parameters:
index
-- Returns:
- the element removed from the collection
-
setClassName
public void setClassName(String className)
Sets the value of field 'className'.- Parameters:
className
- the value of field 'className'.
-
setDatabaseName
public void setDatabaseName(String databaseName)
Sets the value of field 'databaseName'.- Parameters:
databaseName
- the value of field 'databaseName'.
-
setName
public void setName(String name)
Sets the value of field 'name'.- Parameters:
name
- the value of field 'name'.
-
setParam
public void setParam(int index, Param vParam) throws IndexOutOfBoundsException
- Parameters:
index
-vParam
-- Throws:
IndexOutOfBoundsException
- if the index given is outside the bounds of the collection
-
setParam
public void setParam(Param[] vParamArray)
- Parameters:
vParamArray
-
-
setParam
public void setParam(List<Param> vParamList)
Sets the value of 'paramList' by copying the given Vector. All elements will be checked for type safety.- Parameters:
vParamList
- the Vector to copy.
-
setParamCollection
public void setParamCollection(List<Param> paramList)
Deprecated.Sets the value of 'paramList' by setting it to the given Vector. No type checking is performed.- Parameters:
paramList
- the Vector to set.
-
setPassword
public void setPassword(String rawPassword)
Sets the value of field 'rawPassword'.- Parameters:
rawPassword
- the value of field 'rawPassword'.
-
setSchemaName
public void setSchemaName(String schemaName)
Sets the value of field 'schemaName'.- Parameters:
schemaName
- the value of field 'schemaName'.
-
setUrl
public void setUrl(String url)
Sets the value of field 'url'.- Parameters:
url
- the value of field 'url'.
-
setUserName
public void setUserName(String rawUserName)
Sets the value of field 'rawUserName'.- Parameters:
rawUserName
- the value of field 'rawUserName'.
-
interpolateAttribute
public String interpolateAttribute(String value, String keystoreFile, String password)
-
getUserName
public String getUserName()
-
getPassword
public String getPassword()
-
-