| Namespace | http://www.mulesoft.org/schema/mule/boxnet |
|---|---|
| Schema Location | http://www.mulesoft.org/schema/mule/boxnet/current/mule-boxnet.xsd (View Schema) |
| Schema Version | 1.0 |
| Minimum Mule Version | 3.2 |
Box.net Cloud Connector Module.
| Configuration | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Configure an instance of this module
| |||||||||||
| Message Processors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
This processor adds file or folder to tags list.
| |||||||||||
After the user authenticates the ticket obtained with the get-ticket processor,
there're two ways to get the required auth token:
| |||||||||||
Create a new folder
| |||||||||||
Deletes a file or folder
| |||||||||||
Downloads a file an returns its contents as a byte[]
| |||||||||||
This processor returns all the user's tags.
| |||||||||||
Gets information about a file
| |||||||||||
Get and access ticket using the configured apiKey.
| |||||||||||
This processor is used to get a user's files and folders tree.
| |||||||||||
Logs out the user associated with the authorization token
| |||||||||||
This processor moves a file or folder to another folder.
| |||||||||||
This processor privately shares a file or folder with another user(s).
| |||||||||||
Makes a public share of a file or folder
| |||||||||||
This processor unshares a public shared file or folder
| |||||||||||
Create a new user in box.net
| |||||||||||
This processor renames a file or folder.
| |||||||||||
This processor sets a description to a file or folder.
| |||||||||||
Receives a comma separated list of paths and uploads the corresponding
files.
| |||||||||||
Receives an input stream and uploads its content as a file
| |||||||||||
This method is used to verify user registration email
| |||||||||||
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:boxnet="http://www.mulesoft.org/schema/mule/boxnet"
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/boxnet
http://www.mulesoft.org/schema/mule/boxnet/current/mule-boxnet.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 | Optional. Give a name to this configuration so it can be later referenced. | |||||||
| The API key obtained when registering a project with the Box platform. | |||||||||||
| box_auth_callback | Optional. The url where box.net will direct the authentication callback. | ||||||||||
| 8080 | Optional. The port where the authentication callback will be listening on Defaults to 8080 | ||||||||||
| false | Optional. If true, an http inbound endpoint will be set in place to receive a callback from box.net with the authToken once the user has authenticated. | ||||||||||
This processor adds file or folder to tags list.
INCLUDE_ERROR
| Name | Default Value | Description |
|---|---|---|
| Optional. Specify which configuration to use. | ||
| Comma separated list of tags | ||
| Can be either 'file' or 'folder' depending on what do you want to add | ||
| The id of a file or folder to be added |
| Payload Class | Description |
|---|---|
| IllegalArgumentException} if target is invalid or csvTags is empty |
After the user authenticates the ticket obtained with the get-ticket processor, there're two ways to get the required auth token:
INCLUDE_ERROR
| Name | Default Value | Description |
|---|---|---|
| Optional. Specify which configuration to use. |
| Payload Class | Description |
|---|---|
| IllegalArgumentException | if the ticket does not match a logged user |
| IllegalStateException | if you use this processor before getting a ticket |
Create a new folder
INCLUDE_ERROR
| Name | Default Value | Description |
|---|---|---|
| Optional. Specify which configuration to use. | ||
| The id of the parent folder | ||
| The name of the folder you want to create | ||
| false | Optional. Specifies if the folder is shared. This parameter is optional and defaults to false |
CreateFolderResponse with
data about the operation status and info about the newly created folder (if successful)
Deletes a file or folder
INCLUDE_ERROR
| Name | Default Value | Description |
|---|---|---|
| Optional. Specify which configuration to use. | ||
| The type of item to be shared. This can be set as 'file' or 'folder'. Any other value will throw a IllegalArgumentException | ||
| The id of the item you wish to delete. If the target is a folder, this will be the folder_id. If the target is a file, this will be the file_id. |
DeleteResponse with data about the operation status| Payload Class | Description |
|---|---|
| IllegalArgumentException} if target is invalid |
Downloads a file an returns its contents as a byte[]
INCLUDE_ERROR
| Name | Default Value | Description |
|---|---|---|
| Optional. Specify which configuration to use. | ||
| The id of the file we want to download |
This processor returns all the user's tags.
On successful you will get an xml representing the tags that looks like this:
INCLUDE_ERROR
| Name | Default Value | Description |
|---|---|---|
| Optional. Specify which configuration to use. | ||
| UTF-8 | Optional. Encoding to use when decoding from BASE64. Optional, defaults to UTF-8 |
Gets information about a file
INCLUDE_ERROR
| Name | Default Value | Description |
|---|---|---|
| Optional. Specify which configuration to use. | ||
| The id of the file you want info about |
GetFileInfoResponse
Get and access ticket using the configured apiKey.
With this ticket, the user needs to manually go to https://www.box.net/api/1.0/auth/XML Sample
INCLUDE_ERROR
| Name | Default Value | Description |
|---|---|---|
| Optional. Specify which configuration to use. |
This processor is used to get a user's files and folders tree. 'folderId' param defines root folder from which the tree begins. 'csvParams' is comma separated list where you can set additional parameters, which are: onelevel - make a tree of one level depth, so you will get only files and folders stored in folder which folder_id you have provided. nofiles - include folders only in result tree, no files. nozip - do not zip tree xml. On successful result you will receive 'listing_ok' as status and the tree xml. if you haven't set 'nozip' as a parameter (it's set by default), then you have to unzip it. Then you will get xml like this: (note that updatedand createdare UNIX timestamps in PST).
INCLUDE_ERROR
| Name | Default Value | Description |
|---|---|---|
| Optional. Specify which configuration to use. | ||
| 0 | Optional. The ID of the root folder from which the tree begins. If this value is "0", the user's full account tree is returned. Defaults to zero | |
| nozip | Optional. Comma separated list of params. This is optional and defaults to 'nozip' | |
| UTF-8 | Optional. Optional parameter to specify the encoding to use when decoding BASE64. Defaults to UTF-8 |
GetAccountTreeResponse with
data about the operation status and info about the inspected folder (if successful)
Logs out the user associated with the authorization token
INCLUDE_ERROR
| Name | Default Value | Description |
|---|---|---|
| Optional. Specify which configuration to use. |
LogoutResponse with data about the operation status
This processor moves a file or folder to another folder. On a successful result, status will be 's_move_node'. If the result wasn't successful, status field can be: 'e_move_node', 'not_logged_in', 'application_restricted'.
INCLUDE_ERROR
| Name | Default Value | Description |
|---|---|---|
| Optional. Specify which configuration to use. | ||
| Can be either 'file' or 'folder' depending on what do you | ||
| Is the id of a file or folder to be moved | ||
| Is the destination folder id. |
This processor privately shares a file or folder with another user(s). 'target' param, 'target_id' is . 'emails' params is an array of emails of users' to share files with. if 'notify' param is , 'message' param . Note: currently only files can be shared privately.
INCLUDE_ERROR
| Name | Default Value | Description |
|---|---|---|
| Optional. Specify which configuration to use. | ||
| Should be either 'file' or 'folder' | ||
| The id of the file or folder to be shared | ||
| Comma separated list of email addresses of the users that will receive the share | ||
| true | Optional. If true, then a notification email will be sent to users. Optional parameter, defaults to true | |
| Optional. Is a message to be included in the notification email. Optional parameter, defaults to an empty string |
| Payload Class | Description |
|---|---|
| IllegalArgumentException} if target is invalid or csvMails is null or empty |
Makes a public share of a file or folder
INCLUDE_ERROR
| Name | Default Value | Description |
|---|---|---|
| Optional. Specify which configuration to use. | ||
| The type of item to be shared. This can be set as 'file' or 'folder'. Any other value will throw a IllegalArgumentException | ||
| The id of the item you wish to share. If the target is a folder, this will be the folder_id. If the target is a file, this will be the file_id. | ||
| The password to protect the folder or file. | ||
| An message to be included in a notification email. |
PublicShareResponse with
data about the operation status and info about the shared folder (if successful)| Payload Class | Description |
|---|---|
| IllegalArgumentException} if target is invalid |
This processor unshares a public shared file or folder
INCLUDE_ERROR
| Name | Default Value | Description |
|---|---|---|
| Optional. Specify which configuration to use. | ||
| Shoud be either 'file' or 'folder' | ||
| Is id of a file or folder to be unshared |
| Payload Class | Description |
|---|---|
| IllegalArgumentException} if target is invalid |
Create a new user in box.net
INCLUDE_ERROR
| Name | Default Value | Description |
|---|---|---|
| Optional. Specify which configuration to use. | ||
| The user's email | ||
| The user's password |
RegisterNewUserResponse with
data about the operation status and info about the newly created user (if successful)
This processor renames a file or folder.
INCLUDE_ERROR
| Name | Default Value | Description |
|---|---|---|
| Optional. Specify which configuration to use. | ||
| Can be either 'file' or 'folder' depending on what you want to rename | ||
| Is the id of a file or folder to be renamed | ||
| Is the new name for a file or folder |
This processor sets a description to a file or folder.
INCLUDE_ERROR
| Name | Default Value | Description |
|---|---|---|
| Optional. Specify which configuration to use. | ||
| Can be either 'file' or 'folder' | ||
| The id of the folder/file you want to modify | ||
| The description you want to set |
Receives a comma separated list of paths and uploads the corresponding files.
INCLUDE_ERROR
| Name | Default Value | Description |
|---|---|---|
| Optional. Specify which configuration to use. | ||
| 0 | Optional. The id of the parent folder. Defaults to 0 (the root folder) |
UploadResponse with
data about the operation status and info about the newly uploaded files (if successful)
Receives an input stream and uploads its content as a file
INCLUDE_ERROR
| Name | Default Value | Description |
|---|---|---|
| Optional. Specify which configuration to use. | ||
| 0 | Optional. The id of the parent folder. Defaults to 0 which is the root folder | |
| The name we want the file to have on box.net | ||
| InputStream with the contents of the file. It's taken from the message payload. |
UploadResponse with
data about the operation status and info about the newly uploaded file (if successful)
This method is used to verify user registration email
INCLUDE_ERROR
| Name | Default Value | Description |
|---|---|---|
| Optional. Specify which configuration to use. | ||
| The login username of the user for which you would like to verify registration. |