@Test public void testCreateAdmin() { final List<MongoDbNode> nodes = new ArrayList<>(); nodes.add(new MongoDbNode("localhost", mongoRule.getDataBasePort())); mongoDbAccess = MongoDbAccessAdminFactory.create( new DbConfigurationImpl(nodes, mongoRule.getMongoDatabase().getName(), true, "user", "pwd"), Collections::emptyList); assertNotNull(mongoDbAccess); assertEquals(MongoRule.VITAM_DB, mongoDbAccess.getMongoDatabase().getName()); mongoDbAccess.close(); }
public static final MongoDbAccessAdminImpl create(DbConfiguration configuration, OntologyLoader ontologyLoader) { ParametersChecker.checkParameter("configuration is a mandatory parameter", configuration); final List<Class<?>> classList = new ArrayList<>(); for (final FunctionalAdminCollections e : FunctionalAdminCollections.class.getEnumConstants()) { classList.add(e.getClasz()); } FunctionalAdminCollections.class.getEnumConstants(); final MongoClient mongoClient = MongoDbAccess.createMongoClient(configuration, VitamCollection.getMongoClientOptions(classList)); return new MongoDbAccessAdminImpl(mongoClient, configuration.getDbName(), false, ontologyLoader); }
MongoDbAccessAdminFactory { public static final MongoDbAccessAdminImpl create(DbConfiguration configuration, OntologyLoader ontologyLoader) { ParametersChecker.checkParameter("configuration is a mandatory parameter", configuration); final List<Class<?>> classList = new ArrayList<>(); for (final FunctionalAdminCollections e : FunctionalAdminCollections.class.getEnumConstants()) { classList.add(e.getClasz()); } FunctionalAdminCollections.class.getEnumConstants(); final MongoClient mongoClient = MongoDbAccess.createMongoClient(configuration, VitamCollection.getMongoClientOptions(classList)); return new MongoDbAccessAdminImpl(mongoClient, configuration.getDbName(), false, ontologyLoader); } }
MongoDbAccessAdminFactory { public static final MongoDbAccessAdminImpl create(DbConfiguration configuration, OntologyLoader ontologyLoader) { ParametersChecker.checkParameter("configuration is a mandatory parameter", configuration); final List<Class<?>> classList = new ArrayList<>(); for (final FunctionalAdminCollections e : FunctionalAdminCollections.class.getEnumConstants()) { classList.add(e.getClasz()); } FunctionalAdminCollections.class.getEnumConstants(); final MongoClient mongoClient = MongoDbAccess.createMongoClient(configuration, VitamCollection.getMongoClientOptions(classList)); return new MongoDbAccessAdminImpl(mongoClient, configuration.getDbName(), false, ontologyLoader); } private  MongoDbAccessAdminFactory(); }
MongoDbAccessAdminFactory { public static final MongoDbAccessAdminImpl create(DbConfiguration configuration, OntologyLoader ontologyLoader) { ParametersChecker.checkParameter("configuration is a mandatory parameter", configuration); final List<Class<?>> classList = new ArrayList<>(); for (final FunctionalAdminCollections e : FunctionalAdminCollections.class.getEnumConstants()) { classList.add(e.getClasz()); } FunctionalAdminCollections.class.getEnumConstants(); final MongoClient mongoClient = MongoDbAccess.createMongoClient(configuration, VitamCollection.getMongoClientOptions(classList)); return new MongoDbAccessAdminImpl(mongoClient, configuration.getDbName(), false, ontologyLoader); } private  MongoDbAccessAdminFactory(); static final MongoDbAccessAdminImpl create(DbConfiguration configuration, OntologyLoader ontologyLoader); static final MongoDbAccessAdminImpl create(DbConfiguration configuration, String clusterName, List<ElasticsearchNode> nodes, OntologyLoader ontologyLoader); }
MongoDbAccessAdminFactory { public static final MongoDbAccessAdminImpl create(DbConfiguration configuration, OntologyLoader ontologyLoader) { ParametersChecker.checkParameter("configuration is a mandatory parameter", configuration); final List<Class<?>> classList = new ArrayList<>(); for (final FunctionalAdminCollections e : FunctionalAdminCollections.class.getEnumConstants()) { classList.add(e.getClasz()); } FunctionalAdminCollections.class.getEnumConstants(); final MongoClient mongoClient = MongoDbAccess.createMongoClient(configuration, VitamCollection.getMongoClientOptions(classList)); return new MongoDbAccessAdminImpl(mongoClient, configuration.getDbName(), false, ontologyLoader); } private  MongoDbAccessAdminFactory(); static final MongoDbAccessAdminImpl create(DbConfiguration configuration, OntologyLoader ontologyLoader); static final MongoDbAccessAdminImpl create(DbConfiguration configuration, String clusterName, List<ElasticsearchNode> nodes, OntologyLoader ontologyLoader);  }