Package org.nuxeo.runtime.mongodb
Interface MongoDBConnectionService
- All Known Implementing Classes:
MongoDBComponent
public interface MongoDBConnectionService
Service used to get a database connection to MongoDB.
- Since:
- 9.1
-
Method Summary
Modifier and TypeMethodDescriptioncom.mongodb.client.MongoClient
Gets the MongoDB client for the given id.Gets the MongoDB configuration for the given id.com.mongodb.client.MongoDatabase
getDatabase
(String id) Gets the MongoDB database name for the given id.Iterable<com.mongodb.client.MongoDatabase>
Deprecated.since 11.1, unused
-
Method Details
-
getClient
Gets the MongoDB client for the given id.- Parameters:
id
- the connection id- Returns:
- the client configured by
MongoDBConnectionConfig
for the input id, or the default one if it doesn't exist - Since:
- 11.1
-
getConfig
Gets the MongoDB configuration for the given id.- Since:
- 11.1
-
getDatabaseName
Gets the MongoDB database name for the given id.- Parameters:
id
- the connection id- Returns:
- the database name configured by
MongoDBConnectionConfig
for the input id, or the default one if it doesn't exist - Since:
- 11.1
-
getDatabase
- Parameters:
id
- the connection id- Returns:
- the database configured by
MongoDBConnectionConfig
for the input id, or the default one if it doesn't exist
-
getDatabases
Deprecated.since 11.1, unused- Returns:
- all configured databases
-