| Namespace | http://www.mulesoft.org/schema/mule/mongohq |
| Schema Location | http://www.mulesoft.org/schema/mule/mongohq/current/mule-mongohq.xsd (View Schema) |
| Schema Version | 1.0 |
| Minimum Mule Version | 3.2 |
Module Overview
This connector provides functionality to connect with MongoHQ
a mongoDB hosting provider.
Configuration
To use the this module within a flow the namespace to the module must be included. The resulting flow will look
similar to the following:
<mule xmlns="http://www.mulesoft.org/schema/mule/core"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mongohq="http://www.mulesoft.org/schema/mule/mongohq"
xsi:schemaLocation="
http://www.mulesoft.org/schema/mule/core
http://www.mulesoft.org/schema/mule/core/current/mule.xsd
http://www.mulesoft.org/schema/mule/mongohq
http://www.mulesoft.org/schema/mule/mongohq/current/mule-mongohq.xsd">
<!-- here goes your flows and configuration elements -->
</mule>
This module is configured using the config element. This element must be placed outside of your flows and at
the root of your Mule application. You can create as many configurations as you deem necessary as long as each carries
its own name.
Each message processor, message source or transformer carries a config-ref attribute that allows the invoker to
specify which configuration to use.
| Attributes |
| Type | Name | Default Value | Description | Java Type | MIME Type | Encoding |
xs:string |
name |
|
Optional. Give a name to this configuration so it can be later referenced. |
| | |
|
xs:string |
apiKey |
|
API Key
|
|
|
|
Message Processors
<mongohq:create-database>
Attributes
| Name | Default Value | Description | Java Type | MIME Type | Encoding |
| config-ref |
|
Optional. Specify which configuration to use. |
|
|
|
| databaseRequest |
|
Data required to create a database (name and slug of the plan) |
DatabaseRequest |
*/* |
|
Returns
| Return Type |
Description |
| void |
The status of the operation |
Exception Payloads
| Payload Class | Description |
| IOException |
if the connection fails
|
<mongohq:delete-database>
Attributes
| Name | Default Value | Description | Java Type | MIME Type | Encoding |
| config-ref |
|
Optional. Specify which configuration to use. |
|
|
|
| dbName |
|
Name of the database to remove |
String |
*/* |
UTF-8 |
Returns
| Return Type |
Description |
| void |
The status of the operation |
Exception Payloads
| Payload Class | Description |
| IOException |
if the connection fails
|
<mongohq:list-databases>
Attributes
| Name | Default Value | Description | Java Type | MIME Type | Encoding |
| config-ref |
|
Optional. Specify which configuration to use. |
|
|
|
Returns
| Return Type |
Description |
| List<Database> |
The list of the user databases |
Exception Payloads
| Payload Class | Description |
| IOException |
if the connection fails
|
<mongohq:retrieve-database-info>
Retrieve information about a particular database
Attributes
| Name | Default Value | Description | Java Type | MIME Type | Encoding |
| config-ref |
|
Optional. Specify which configuration to use. |
|
|
|
| dbName |
|
Name of the database to retrieve |
String |
*/* |
UTF-8 |
Returns
| Return Type |
Description |
| Database |
The database data |
Exception Payloads
| Payload Class | Description |
| IOException |
if the connection fails
|
Message Sources
Transformers
<mongohq:transform-database-request-to-json>
Transform DatabaseRequest to JSON
Attributes
| Name | Default Value | Description | Java Type | MIME Type | Encoding |
| config-ref |
|
Optional. Specify which configuration to use. |
|
|
|
| databaseRequest |
|
Request to create a JSON database (name and slug) |
DatabaseRequest |
*/* |
|
Returns
| Return Type |
Description |
| String |
string JSON representation of the request |
Exception Payloads
| Payload Class | Description |
| IOException |
if the connection fails
|
<mongohq:transform-json-to-database>
Transform JSON to database
Attributes
| Name | Default Value | Description | Java Type | MIME Type | Encoding |
| config-ref |
|
Optional. Specify which configuration to use. |
|
|
|
| json |
|
JSON string to transform |
String |
*/* |
UTF-8 |
Exception Payloads
| Payload Class | Description |
| IOException |
if the connection fails
|
<mongohq:transform-json-to-databases>
Transform JSON to a list of databases
Attributes
| Name | Default Value | Description | Java Type | MIME Type | Encoding |
| config-ref |
|
Optional. Specify which configuration to use. |
|
|
|
| json |
|
JSON string to transform |
String |
*/* |
UTF-8 |
Exception Payloads
| Payload Class | Description |
| IOException |
if the connection fails
|