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
ConstructorDescriptionDbConfiguration empty constructor for YAMLFactoryDbConfigurationImpl
(List<MongoDbNode> mongoDbNodes, String dbName) DbConfiguration constructorDbConfigurationImpl
(List<MongoDbNode> mongoDbNodes, String dbName, boolean dbAuthentication, String dbUserName, String dbPassword) DbConfiguration constructor with authentication -
Method Summary
Modifier and TypeMethodDescriptionMust return the value of a 'dbName' attributeMust return the value of a 'dbName' attributeMust return the value of a 'dbName' attributeMust return the value of a 'mongoDbNodes' attributeboolean
Must return the value of a 'dbName' attributesetDbAuthentication
(boolean authentication) setDbPassword
(String password) setDbUserName
(String userName) 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 portdbName
- database namedbAuthentication
-dbUserName
-dbPassword
-- Throws:
IllegalArgumentException
- if host or dbName null or empty, or if port <= 0
-
DbConfigurationImpl
DbConfiguration constructor- Parameters:
mongoDbNodes
- database server IP address and portdbName
- database name- Throws:
IllegalArgumentException
- if host or dbName null or empty, or if port <= 0
-
-
Method Details
-
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
Description copied from interface:DbConfiguration
Must return the value of a 'dbName' attribute- Specified by:
getDbName
in interfaceDbConfiguration
- Returns:
- the database host value
-
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
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
- Parameters:
mongoDbNodes
- to set- Returns:
- this
- Throws:
IllegalArgumentException
- if dbHost is null or empty
-
setDbName
- Parameters:
dbName
- the Db Name to set- Returns:
- this
- Throws:
IllegalArgumentException
- if dbName is null or empty
-
setDbUserName
- Parameters:
userName
-- Returns:
- MetaDataConfiguration
-
setDbPassword
- Parameters:
password
-- Returns:
- MetaDataConfiguration
-
setDbAuthentication
- Parameters:
authentication
-- Returns:
- MetaDataConfiguration
-