Package fr.gouv.vitam.common.server.application.configuration

# Class DbConfigurationImpl

java.lang.Object
fr.gouv.vitam.common.server.application.configuration.DefaultVitamApplicationConfiguration
fr.gouv.vitam.common.server.application.configuration.DbConfigurationImpl

All Implemented Interfaces:
  `DbConfiguration`, `VitamApplicationConfiguration`, `VitamApplicationConfigurationInterface`

Direct Known Subclasses:
  `AdminManagementConfiguration`, `BatchReportConfiguration`, `CollectInternalConfiguration`, `InterceptorConfiguration`, `InternalSecurityConfiguration`, `LogbookConfiguration`, `MetaDataConfiguration`, `OfferConfiguration`, `WebApplicationConfig`

public class DbConfigurationImpl extends DefaultVitamApplicationConfiguration implements DbConfiguration
Implementation of DbConfiguraton Interface

- ## Field Summary

  ### Fields inherited from class fr.gouv.vitam.common.server.application.configuration.DefaultVitamApplicationConfiguration

  `IS_A_MANDATORY_PARAMETER, jettyConfig`

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `DbConfigurationImpl()`
  DbConfiguration empty constructor for YAMLFactory
  `DbConfigurationImpl(List<MongoDbNode> mongoDbNodes, String dbName)`
  DbConfiguration constructor
  `DbConfigurationImpl(List<MongoDbNode> mongoDbNodes, String dbName, boolean dbAuthentication, String dbUserName, String dbPassword)`
  DbConfiguration constructor with authentication

- ## Method Summary

  Modifier and Type
  Method
  Description
  `String`
  `getDbName()`
  Must return the value of a 'dbName' attribute
  `String`
  `getDbPassword()`
  Must return the value of a 'dbName' attribute
  `String`
  `getDbUserName()`
  Must return the value of a 'dbName' attribute
  `List<MongoDbNode>`
  `getMongoDbNodes()`
  Must return the value of a 'mongoDbNodes' attribute
  `boolean`
  `isDbAuthentication()`
  Must return the value of a 'dbName' attribute
  `DbConfigurationImpl`
  `setDbAuthentication(boolean authentication)`
  `DbConfigurationImpl`
  `setDbName(String dbName)`
  `DbConfigurationImpl`
  `setDbPassword(String password)`
  `DbConfigurationImpl`
  `setDbUserName(String userName)`
  `DbConfigurationImpl`
  `setMongoDbNodes(List<MongoDbNode> mongoDbNodes)`

  ### Methods inherited from class fr.gouv.vitam.common.server.application.configuration.DefaultVitamApplicationConfiguration

  `getAdminBasicAuth, getJettyConfig, isAuthentication, isAuthorizeTrackTotalHits, isEnableSession, isEnableXsrFilter, isTenantFilter, setAdminBasicAuth, setAuthentication, setAuthorizeTrackTotalHits, setEnableSession, setEnableXsrFilter, setJettyConfig, setTenantFilter`

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

  ### Methods inherited from interface fr.gouv.vitam.common.server.application.configuration.VitamApplicationConfiguration

  `isEnableSession, isEnableXsrFilter, setEnableSession, setEnableXsrFilter`

  ### Methods inherited from interface fr.gouv.vitam.common.server.application.configuration.VitamApplicationConfigurationInterface

  `getBaseUri, getBaseUrl, getJettyConfig, isAuthentication, isTenantFilter, setAuthentication, setBaseUri, setBaseUrl, setJettyConfig, setTenantFilter`

- ## Constructor Details

  - ### DbConfigurationImpl

    public DbConfigurationImpl()
    DbConfiguration empty constructor for YAMLFactory

  - ### DbConfigurationImpl

    public DbConfigurationImpl(List<MongoDbNode> mongoDbNodes, String dbName, boolean dbAuthentication, String dbUserName, String dbPassword)
    DbConfiguration constructor with authentication
    Parameters:
      `mongoDbNodes` - database server IP address and port
      `dbName` - database name
      `dbAuthentication` -
      `dbUserName` -
      `dbPassword` -
    Throws:
      `IllegalArgumentException` - if host or dbName null or empty, or if port <= 0

  - ### DbConfigurationImpl

    public DbConfigurationImpl(List<MongoDbNode> mongoDbNodes, String dbName)
    DbConfiguration constructor
    Parameters:
      `mongoDbNodes` - database server IP address and port
      `dbName` - database name
    Throws:
      `IllegalArgumentException` - if host or dbName null or empty, or if port <= 0

- ## Method Details

  - ### getMongoDbNodes

    public List<MongoDbNode> getMongoDbNodes()
    Description copied from interface: `DbConfiguration`
    Must return the value of a 'mongoDbNodes' attribute
    Specified by:
      `getMongoDbNodes` in interface `DbConfiguration`
    Returns:
      the list of mongodb node which contains the dbHost and dbPort

  - ### getDbName

    public String getDbName()
    Description copied from interface: `DbConfiguration`
    Must return the value of a 'dbName' attribute
    Specified by:
      `getDbName` in interface `DbConfiguration`
    Returns:
      the database host value

  - ### getDbUserName

    public String getDbUserName()
    Description copied from interface: `DbConfiguration`
    Must return the value of a 'dbName' attribute
    Specified by:
      `getDbUserName` in interface `DbConfiguration`
    Returns:
      the database user name

  - ### getDbPassword

    public String getDbPassword()
    Description copied from interface: `DbConfiguration`
    Must return the value of a 'dbName' attribute
    Specified by:
      `getDbPassword` in interface `DbConfiguration`
    Returns:
      the database user's password

  - ### isDbAuthentication

    public boolean isDbAuthentication()
    Description copied from interface: `DbConfiguration`
    Must return the value of a 'dbName' attribute
    Specified by:
      `isDbAuthentication` in interface `DbConfiguration`
    Returns:
      boolean is autenticated or not

  - ### setMongoDbNodes

    public DbConfigurationImpl setMongoDbNodes(List<MongoDbNode> mongoDbNodes)
    Parameters:
      `mongoDbNodes` - to set
    Returns:
      this
    Throws:
      `IllegalArgumentException` - if dbHost is null or empty

  - ### setDbName

    public DbConfigurationImpl setDbName(String dbName)
    Parameters:
      `dbName` - the Db Name to set
    Returns:
      this
    Throws:
      `IllegalArgumentException` - if dbName is null or empty

  - ### setDbUserName

    public DbConfigurationImpl setDbUserName(String userName)
    Parameters:
      `userName` -
    Returns:
      MetaDataConfiguration

  - ### setDbPassword

    public DbConfigurationImpl setDbPassword(String password)
    Parameters:
      `password` -
    Returns:
      MetaDataConfiguration

  - ### setDbAuthentication

    public DbConfigurationImpl setDbAuthentication(boolean authentication)
    Parameters:
      `authentication` -
    Returns:
      MetaDataConfiguration