cbmongodb.Mongo

## Class Config

    lucee.Component
        cbmongodb.Mongo.Config

Main configuration for MongoDB Connections

Class Attributes:
- singleton : true
- output : false
- license : Apache v2.0
- package : cbmongodb.models.Mongo
- synchronized : false
- accessors : true
- persistent : false
- author : Jon Clausen

Property Summary
type | property | default | serializable | required
--- | --- | --- | --- | ---
`any` | configStruct access = public returntype = any |  | `true` | `false`
`any` | jLoader CBJavaloader. access = public returntype = any inject = id:loader@cbjavaloader |  | `true` | `false`

Constructor Summary
init([any configStruct]) Constructor.

Method Summary
`any` | addServer([any serverName], [any serverPort])
`any` | buildMongoClientOptions([struct mongoClientOptions])
`string` | configureEnvironment() Main extension point: do whatever it takes to decide environment;.
`string` | getConfigStruct()
`string` | getDBName()
`struct` | getDefaults()
`string` | getJLoader()
`any` | getMongoClientOptions()
`array` | getServers()
`any` | onDIComplete() After init the autowire properties.
`private any` | readConcern(string concern)
`private any` | readPreference(string preference)
`any` | removeAllServers()
`any` | setConfigStruct(any configStruct)
`any` | setJLoader(any jLoader)
`private any` | writeConcern(string concern)

Methods inherited from class `lucee.Component`
None

Constructor Detail

### init

`public init([any configStruct])`

Constructor

Parameters:
  `configStruct`

Property Detail

### configStruct

`property any configStruct`

Attributes:
  `access` - public
  `required` - false
  `returntype` - any
  `serializable` - true

### jLoader

`property any jLoader`

CBJavaloader

Attributes:
  `access` - public
  `required` - false
  `returntype` - any
  `inject` - id:loader@cbjavaloader
  `serializable` - true

Method Detail

### addServer

`public any addServer([any serverName], [any serverPort])`

Parameters:
  `serverName`
  `serverPort`

### buildMongoClientOptions

`public any buildMongoClientOptions([struct mongoClientOptions])`

Parameters:
  `mongoClientOptions`

### configureEnvironment

`public string configureEnvironment()`

Main extension point: do whatever it takes to decide environment; set environment-specific defaults by overriding the environment-specific structure keyed on the environment name you decide

### getConfigStruct

`public string getConfigStruct()`

### getDBName

`public string getDBName()`

### getDefaults

`public struct getDefaults()`

### getJLoader

`public string getJLoader()`

### getMongoClientOptions

`public any getMongoClientOptions()`

### getServers

`public array getServers()`

### onDIComplete

`public any onDIComplete()`

After init the autowire properties

### readConcern

`private any readConcern(string concern)`

Parameters:
  `concern`

### readPreference

`private any readPreference(string preference)`

Parameters:
  `preference`

### removeAllServers

`public any removeAllServers()`

### setConfigStruct

`public any setConfigStruct(any configStruct)`

Parameters:
  `configStruct`

### setJLoader

`public any setJLoader(any jLoader)`

Parameters:
  `jLoader`

### writeConcern

`private any writeConcern(string concern)`

Parameters:
  `concern`