org.wso2.carbon.registry.core.config
Class DataBaseConfiguration

java.lang.Object
  extended by org.wso2.carbon.registry.core.config.DataBaseConfiguration

public class DataBaseConfiguration
extends Object

This class is to hold, database configurations such as URL, userName, and password. Users can define them in registry.xml or at specify them at runtime using the APIs provided.


Constructor Summary
DataBaseConfiguration()
           
 
Method Summary
 String getConfigName()
          Method to obtain the name of the configuration.
 String getDataSourceName()
          Method to obtain the name of the data source.
 String getDbUrl()
          Method to obtain the database URL.
 String getDriverName()
          Method to obtain the name of the driver.
 String getMaxActive()
          Method to obtain the maxActive value.
 String getMaxIdle()
          Method to obtain the maxIdle value.
 String getMaxWait()
          Method to obtain the maxWait value.
 String getMinEvictableIdleTimeMillis()
          Method to obtain the min evictable idle time millis of the data source.
 String getMinIdle()
          Method to obtain the minIdle value.
 String getNumTestsPerEvictionRun()
          Method to obtain the name of the data source.
 String getPassWord()
          Method to obtain the password.
 String getResolvedPassword()
          If the password is protected , then decrypts the password and returns the plain text Otherwise, returns the given password as-is
 String getTestWhileIdle()
          Method to obtain the test while idle of the data source.
 String getTimeBetweenEvictionRunsMillis()
          Method to obtain the time between eviction runs millis of the data source.
 String getUserName()
          Method to obtain the user name.
 String getValidationQuery()
          Method to obtain the validation query value.
 void setConfigName(String configName)
          Method to set the name of the configuration.
 void setDataSourceName(String dataSourceName)
          Method to set the name of the data source.
 void setDbUrl(String dbUrl)
          Method to set the database URL.
 void setDriverName(String driverName)
          Method to set the name of the driver.
 void setMaxActive(String maxActive)
          Method to set the maxActive value.
 void setMaxIdle(String maxIdle)
          Method to set the maxIdle value.
 void setMaxWait(String maxWait)
          Method to set the maxWait value.
 void setMinEvictableIdleTimeMillis(String minEvictableIdleTimeMillis)
          Method to set the Min Evictable Idle Time Millis of the data source.
 void setMinIdle(String minIdle)
          Method to set the minIdle value.
 void setNumTestsPerEvictionRun(String numTestsPerEvictionRun)
          Method to set the Num Tests PerEviction Run of the data source.
 void setPassWord(String password)
          Method to set the password.
 void setPasswordManager(org.wso2.securevault.SecretResolver secretResolver)
           
 void setTestWhileIdle(String testWhileIdle)
          Method to set the TestWhileIdle of the data source.
 void setTimeBetweenEvictionRunsMillis(String timeBetweenEvictionRunsMillis)
          Method to set the Time Between Eviction Runs Millis of the data source.
 void setUserName(String userName)
          Method to set the user name.
 void setValidationQuery(String validationQuery)
          Method to set the validation query value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DataBaseConfiguration

public DataBaseConfiguration()
Method Detail

getTestWhileIdle

public String getTestWhileIdle()
Method to obtain the test while idle of the data source.

Returns:
the testWhileIdle of the data source.

setTestWhileIdle

public void setTestWhileIdle(String testWhileIdle)
Method to set the TestWhileIdle of the data source.

Parameters:
testWhileIdle - the value of TestWhileIdle of the data source.

getTimeBetweenEvictionRunsMillis

public String getTimeBetweenEvictionRunsMillis()
Method to obtain the time between eviction runs millis of the data source.

Returns:
the timeBetweenEvictionRunsMillis of the data source.

setTimeBetweenEvictionRunsMillis

public void setTimeBetweenEvictionRunsMillis(String timeBetweenEvictionRunsMillis)
Method to set the Time Between Eviction Runs Millis of the data source.

Parameters:
timeBetweenEvictionRunsMillis - the value of the timeBetweenEvictionRunsMillis of the data source.

getMinEvictableIdleTimeMillis

public String getMinEvictableIdleTimeMillis()
Method to obtain the min evictable idle time millis of the data source.

Returns:
the minEvictableIdleTimeMillis of the data source.

setMinEvictableIdleTimeMillis

public void setMinEvictableIdleTimeMillis(String minEvictableIdleTimeMillis)
Method to set the Min Evictable Idle Time Millis of the data source.

Parameters:
minEvictableIdleTimeMillis - the value of the minEvictableIdleTimeMillis of the data source.

getNumTestsPerEvictionRun

public String getNumTestsPerEvictionRun()
Method to obtain the name of the data source.

Returns:
the name of the data source.

setNumTestsPerEvictionRun

public void setNumTestsPerEvictionRun(String numTestsPerEvictionRun)
Method to set the Num Tests PerEviction Run of the data source.

Parameters:
numTestsPerEvictionRun - the value of NumTestsPerEvictionRun of the data source.

getDataSourceName

public String getDataSourceName()
Method to obtain the name of the data source.

Returns:
the name of the data source.

setDataSourceName

public void setDataSourceName(String dataSourceName)
Method to set the name of the data source.

Parameters:
dataSourceName - the name of the data source.

getDbUrl

public String getDbUrl()
Method to obtain the database URL.

Returns:
the database URL.

setDbUrl

public void setDbUrl(String dbUrl)
Method to set the database URL.

Parameters:
dbUrl - the database URL.

getUserName

public String getUserName()
Method to obtain the user name.

Returns:
the user name.

setUserName

public void setUserName(String userName)
Method to set the user name.

Parameters:
userName - the user name.

getPassWord

public String getPassWord()
Method to obtain the password.

Returns:
the password.

setPassWord

public void setPassWord(String password)
Method to set the password.

Parameters:
password - the password.

getDriverName

public String getDriverName()
Method to obtain the name of the driver.

Returns:
the name of the driver.

setDriverName

public void setDriverName(String driverName)
Method to set the name of the driver.

Parameters:
driverName - the name of the driver.

getConfigName

public String getConfigName()
Method to obtain the name of the configuration.

Returns:
the name of the configuration.

setConfigName

public void setConfigName(String configName)
Method to set the name of the configuration.

Parameters:
configName - the name of the configuration.

getMaxWait

public String getMaxWait()
Method to obtain the maxWait value.

Returns:
the maxWait value defined.

setMaxWait

public void setMaxWait(String maxWait)
Method to set the maxWait value.

Parameters:
maxWait - the maxWait value defined.

getMaxActive

public String getMaxActive()
Method to obtain the maxActive value.

Returns:
the maxActive value defined.

setMaxActive

public void setMaxActive(String maxActive)
Method to set the maxActive value.

Parameters:
maxActive - the maxActive value defined.

getMaxIdle

public String getMaxIdle()
Method to obtain the maxIdle value.

Returns:
the maxIdle value defined.

setMaxIdle

public void setMaxIdle(String maxIdle)
Method to set the maxIdle value.

Parameters:
maxIdle - the maxIdle value defined.

getMinIdle

public String getMinIdle()
Method to obtain the minIdle value.

Returns:
the minIdle value defined.

setMinIdle

public void setMinIdle(String minIdle)
Method to set the minIdle value.

Parameters:
minIdle - the minIdle value defined.

setPasswordManager

public void setPasswordManager(org.wso2.securevault.SecretResolver secretResolver)

getResolvedPassword

public String getResolvedPassword()
If the password is protected , then decrypts the password and returns the plain text Otherwise, returns the given password as-is

Returns:
Resolved password

getValidationQuery

public String getValidationQuery()
Method to obtain the validation query value.

Returns:
the validation query value defined.

setValidationQuery

public void setValidationQuery(String validationQuery)
Method to set the validation query value.

Parameters:
validationQuery - the validation query value defined.


Copyright © 2013 WSO2 Inc. All Rights Reserved.