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
,CollectConfiguration
,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 YAMLFactoryDbConfigurationImpl(java.util.List<MongoDbNode> mongoDbNodes, java.lang.String dbName)
DbConfiguration constructorDbConfigurationImpl(java.util.List<MongoDbNode> mongoDbNodes, java.lang.String dbName, boolean dbAuthentication, java.lang.String dbUserName, java.lang.String dbPassword)
DbConfiguration constructor with authentication
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.lang.String
getDbName()
Must return the value of a 'dbName' attributejava.lang.String
getDbPassword()
Must return the value of a 'dbName' attributejava.lang.String
getDbUserName()
Must return the value of a 'dbName' attributejava.util.List<MongoDbNode>
getMongoDbNodes()
Must return the value of a 'mongoDbNodes' attributeboolean
isDbAuthentication()
Must return the value of a 'dbName' attributeDbConfigurationImpl
setDbAuthentication(boolean authentication)
DbConfigurationImpl
setDbName(java.lang.String dbName)
DbConfigurationImpl
setDbPassword(java.lang.String password)
DbConfigurationImpl
setDbUserName(java.lang.String userName)
DbConfigurationImpl
setMongoDbNodes(java.util.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, getStaticContent, isAuthentication, isTenantFilter, setAuthentication, setBaseUri, setBaseUrl, setJettyConfig, setStaticContent, setTenantFilter
-
-
-
-
Constructor Detail
-
DbConfigurationImpl
public DbConfigurationImpl()
DbConfiguration empty constructor for YAMLFactory
-
DbConfigurationImpl
public DbConfigurationImpl(java.util.List<MongoDbNode> mongoDbNodes, java.lang.String dbName, boolean dbAuthentication, java.lang.String dbUserName, java.lang.String dbPassword)
DbConfiguration constructor with authentication- Parameters:
mongoDbNodes
- database server IP address and portdbName
- database namedbAuthentication
-dbUserName
-dbPassword
-- Throws:
java.lang.IllegalArgumentException
- if host or dbName null or empty, or if port <= 0
-
DbConfigurationImpl
public DbConfigurationImpl(java.util.List<MongoDbNode> mongoDbNodes, java.lang.String dbName)
DbConfiguration constructor- Parameters:
mongoDbNodes
- database server IP address and portdbName
- database name- Throws:
java.lang.IllegalArgumentException
- if host or dbName null or empty, or if port <= 0
-
-
Method Detail
-
getMongoDbNodes
public java.util.List<MongoDbNode> getMongoDbNodes()
Description copied from interface:DbConfiguration
Must return the value of a 'mongoDbNodes' attribute- Specified by:
getMongoDbNodes
in interfaceDbConfiguration
- Returns:
- the list of mongodb node which contains the dbHost and dbPort
-
getDbName
public java.lang.String getDbName()
Description copied from interface:DbConfiguration
Must return the value of a 'dbName' attribute- Specified by:
getDbName
in interfaceDbConfiguration
- Returns:
- the database host value
-
getDbUserName
public java.lang.String getDbUserName()
Description copied from interface:DbConfiguration
Must return the value of a 'dbName' attribute- Specified by:
getDbUserName
in interfaceDbConfiguration
- Returns:
- the database user name
-
getDbPassword
public java.lang.String getDbPassword()
Description copied from interface:DbConfiguration
Must return the value of a 'dbName' attribute- Specified by:
getDbPassword
in interfaceDbConfiguration
- 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 interfaceDbConfiguration
- Returns:
- boolean is autenticated or not
-
setMongoDbNodes
public DbConfigurationImpl setMongoDbNodes(java.util.List<MongoDbNode> mongoDbNodes)
- Parameters:
mongoDbNodes
- to set- Returns:
- this
- Throws:
java.lang.IllegalArgumentException
- if dbHost is null or empty
-
setDbName
public DbConfigurationImpl setDbName(java.lang.String dbName)
- Parameters:
dbName
- the Db Name to set- Returns:
- this
- Throws:
java.lang.IllegalArgumentException
- if dbName is null or empty
-
setDbUserName
public DbConfigurationImpl setDbUserName(java.lang.String userName)
- Parameters:
userName
-- Returns:
- MetaDataConfiguration
-
setDbPassword
public DbConfigurationImpl setDbPassword(java.lang.String password)
- Parameters:
password
-- Returns:
- MetaDataConfiguration
-
setDbAuthentication
public DbConfigurationImpl setDbAuthentication(boolean authentication)
- Parameters:
authentication
-- Returns:
- MetaDataConfiguration
-
-