| java.lang.Object | |
| ↳ | org.mule.modules.box.BoxConnector |
Known Direct Subclasses
|
Known Indirect Subclasses
|
Box Cloud Connector for API V2.
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| accessToken | |||||||||||
| accessTokenIdentifier | |||||||||||
| apiResource | |||||||||||
| baseUrl | The api's base url | ||||||||||
| client | |||||||||||
| clientId | The OAuth2 client id | ||||||||||
| clientSecret | The OAuth2 client secret | ||||||||||
| jerseyUtil | |||||||||||
| longPollingClient | |||||||||||
| pendingSubscriptions | This list holds the source callbacks for long polling that can't yet be served because authorization hasn't happened | ||||||||||
| uploadResource | |||||||||||
| uploadUrl | The url of the endpoints dedicated to file uploading operations | ||||||||||
| useGzip | If set to true, Box will be asked to gzip all its responses | ||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Public Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Used to convert one of the user’s confirmed email aliases into the user’s primary login.
| |||||||||||
Used to add a comment to a discussion.
| |||||||||||
Used to add a comment by the user to a specific file
| |||||||||||
Used to create a copy of a file in another folder.
| |||||||||||
Used to create a shared link for this particular folder
| |||||||||||
Used to add a collaboration for a single user to a folder.
| |||||||||||
Used to create the metadata for a new discussion for a particular folder.
| |||||||||||
Adds a new email alias to the given user’s account.
| |||||||||||
Creates a new folder and returns a folder object with all its associated information
| |||||||||||
Used to provision a new user in an enterprise.
| |||||||||||
Used to delete a single collaboration.
| |||||||||||
Delets a comment.
| |||||||||||
Removes an email alias from a user.
| |||||||||||
Discards a file to the trash.
| |||||||||||
Deletes a folder
| |||||||||||
Deletes a user in an enterprise account.
| |||||||||||
Downloads a file
| |||||||||||
Used to get information about a single collaboration.
| |||||||||||
Used to retrieve the message and metadata about a specific comment.
| |||||||||||
Used to retrieve the metadata about a specific discussion.
| |||||||||||
Used to retrieve all comments for a given discussion.
| |||||||||||
Retrieves all email aliases for this user.
| |||||||||||
Retrieves events for all users in an enterprise.
| |||||||||||
Use this to get events for a given user.
| |||||||||||
Requests access to a long polling server that
notifies about events in real time.
| |||||||||||
Retrieves the comments on a particular file, if any exist.
| |||||||||||
Used to retrieve the metadata about a file.
| |||||||||||
Retrieves a thumbnail, or smaller image representation, of this file.
| |||||||||||
Retrieves information about a given folder.
| |||||||||||
Returns the folder information for a given path
| |||||||||||
Retrieves the discussions on a particular folder, if any exist.
| |||||||||||
Traverses a given folder looking for a resource (file or folder) of a given name.
| |||||||||||
Retrieves the files and/or folders contained within this folder without any other metadata about the folder in the mini format is returned for each item by default.
| |||||||||||
Returns the item information for a given path.
| |||||||||||
Used to retrieve all pending collaboration invites for this user.
| |||||||||||
Retrieves the metadata of a trashed file
| |||||||||||
Retrieves a folder that has been moved to the trash.
| |||||||||||
Get the folders in the Trash.
| |||||||||||
Retrieves information about the user who is currently logged in
i.e.
| |||||||||||
Returns a list of all users for the Enterprise
| |||||||||||
If there are previous versions of this file, this method can be used to retrieve metadata about the older versions.
| |||||||||||
This method initiaes the box client and the auth callback.
| |||||||||||
Message source that subscribes to the events long polling server and will trigger a new message each time an event is generated.
| |||||||||||
Moves all of the content from within one user’s folder into a new folder in another user’s account.
| |||||||||||
Permanently deletes an item that is in the trash.
| |||||||||||
Permanently deletes an item that is in the trash.
| |||||||||||
Restores a file that has been moved to the trash.
| |||||||||||
Restores an item that has been moved to the trash.
| |||||||||||
The search endpoint provides a simple way of finding items that are accessible in a given user’s Box account.
| |||||||||||
Used to create a shared link for this particular file.
| |||||||||||
Used to create a shared link for this particular folder
| |||||||||||
Deletes the shared link associated to a file
| |||||||||||
Deletes the shared link associated to a folder
| |||||||||||
Used to update an existing collaboration.
| |||||||||||
Used to update the message of the comment.
| |||||||||||
Used to update the metadata for an existing discussion.
| |||||||||||
Update a file’s information.
| |||||||||||
Used to update information about the folder.
| |||||||||||
Used to edit the settings and information about a user.
| |||||||||||
Uploads a new version of a file by reading the contents from a path in local storage
| |||||||||||
Uploads a new version of a file from an input stream
| |||||||||||
Receives the path of a file in local storage and uploads its content
| |||||||||||
Creates a new file with the contents of a java.io.InputStream.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
The api's base url
The OAuth2 client id
The OAuth2 client secret
This list holds the source callbacks for long polling that can't yet be served because authorization hasn't happened
The url of the endpoints dedicated to file uploading operations
If set to true, Box will be asked to gzip all its responses
Used to convert one of the user’s confirmed email aliases into the user’s primary login.
| userId | The id of the user being updated |
|---|---|
| login | The new login |
User with the modified state
Used to add a comment to a discussion.
| discussionId | The id of the discussion to comment on |
|---|---|
| message | The text of the comment to be posted |
Comment representing the created message
Used to add a comment by the user to a specific file
| fileId | The id of the file to be commented on |
|---|---|
| message | Text of the comment to be posted |
Comment representing the created message
Used to create a copy of a file in another folder. The original version of the file will not be altered.
| targetFolderId | The if of the target folder. Defaults to the root folder |
|---|---|
| fileId | The id of the file you want to copy |
File representing the copy of the file
Used to create a shared link for this particular folder
| targetFolderId | The id of the parent folder that will hold the copy. If not provided then the root will be used |
|---|---|
| folderId | The if od the folder being copied |
Folder representing the copy
Used to add a collaboration for a single user to a folder. Either an email address or a user ID can be used to create the collaboration. Transferring ownership: To transfer ownership of a folder (as the current owner of the folder), first create a collaboration for the new user with any role. Then update that collaboration with a role of ‘owner’.
| collaboration | Object representing the collaboration to be created |
|---|
Collaboration with the state of the newly created collab
Used to create the metadata for a new discussion for a particular folder. The parent, id and name attributes of the request object are required
| discussion | The discussion object to be created |
|---|
Discussion with the metadata of the created discussion
Adds a new email alias to the given user’s account.
| userId | The id of the user getting the alias |
|---|---|
| The new email alias |
EmailAlias
Creates a new folder and returns a folder object with all its associated information
| parentId | The id of the parent folder. If not provided then the root will be used |
|---|---|
| folderName | The name of the folder |
Folder representing the newly created folder
Used to delete a single collaboration.
| collaborationId | The id of the collaboration to be deleted |
|---|
Delets a comment.
| commentId | The id of the comment to be deleted |
|---|
Removes an email alias from a user.
| userId | The id of the user owning the alias |
|---|---|
| emailAliasId | The id of the alias being deleted |
Discards a file to the trash. The etag of the file can be included as an ‘If-Match’ header to prevent race conditions. Depending on the enterprise settings for this user, the item will either be actually deleted from Box or moved to the trash.
| fileId | The id of the file to be deleted |
|---|---|
| etag | If provided, it will be used to verify that no newer version of the file is available at box |
Deletes a folder
| folderId | The id of the folder to be deleted |
|---|---|
| recursive | Whether to delete this folder if it has items inside of it |
Deletes a user in an enterprise account.
| userId | The id of the user being delete |
|---|---|
| notify | Determines if the destination user should receive email notification of the transfer. |
| force | Whether or not the user should be deleted even if this user still own files. |
Downloads a file
| fileId | The id of the file you want |
|---|---|
| version | The ID specific version of this file to download. |
Used to get information about a single collaboration.
| collaborationId | The id of the collaboration you want |
|---|
Collaboration
Used to retrieve the message and metadata about a specific comment. Information about the user who created the comment is also included.
| commentId | The id of the comment you want |
|---|
Comment representing the message
Used to retrieve the metadata about a specific discussion. Information about the user who created the discussion is also included.
| discussionId | The id of the discussion you wnat |
|---|
Discussion with the discussion metadata
Used to retrieve all comments for a given discussion.
| discussionId | The id of the discussions which comments you want |
|---|
GetCommentsResponse
Retrieves all email aliases for this user. The collection of email aliases does not include the primary login for the user
| userId | The id of the user whose aliases you want |
|---|
GetEmailAliasResponse
Retrieves events for all users in an enterprise. Upper and lower bounds as well as filters can be applied to the results.
| createdAfter | A lower bound on the timestamp of the events returned |
|---|---|
| createdBefore | An upper bound on the timestamp of the events returned |
| eventTypes | List of events to filter by |
| limit | Limits the number of events returned |
| offset | The item at which to start |
GetEventsResponse
Use this to get events for a given user. A chunk of event objects is returned for the user based on the parameters passed in. Parameters indicating how many chunks are left as well as the next streamPosition are also returned.
| streamPosition | The location in the event stream at which you want to start receiving events. Can specify special case ‘now’ to get 0 events and the latest stream position for initialization. |
|---|---|
| streamType | Limits the type of events returned |
| limit | Limits the number of events returned |
GetEventsResponse
Requests access to a long polling server that notifies about events in real time. This is just a request for connection details. A subscription to such topic is not made
LongPollingServer
Retrieves the comments on a particular file, if any exist.
| fileId | The id of the while which comments you want |
|---|
GetCommentsResponse
Used to retrieve the metadata about a file.
| fileId | The id of the file you want to inspect |
|---|
File
Retrieves a thumbnail, or smaller image representation, of this file. Sizes of 32x32, 64x64, 128x128, and 256x256 can be returned. Currently thumbnails are only available in .png format and will only be generated for image file formats.
| fileId | The id of the file which thumb you want |
|---|---|
| minSize | The minimum size you're interested in |
| maxSize | The maximum size you're interested in |
Retrieves information about a given folder. If the folderId parameter is not provided or equals 0, then the root folder will be returned.
| folderId | The id of the fodler you want to get. 0 means root |
|---|
Folder
Returns the folder information for a given path
| resourcePath | The resource to retrieve from Box |
|---|
Folder with that about the found Folder. null if the folder is not found
Retrieves the discussions on a particular folder, if any exist.
| folderId | The id of the folder which discussions you want |
|---|
Entries
Traverses a given folder looking for a resource (file or folder) of a given name.
| folderId | The id of the folder you want to inspect. If not provided then the root folder is assumed |
|---|---|
| resourceName | The name you want to test |
Item with that about the found item. null if the item is not found
Retrieves the files and/or folders contained within this folder without any other metadata about the folder in the mini format is returned for each item by default. Paginated results can be retrieved using the limit and offset parameters.
| folderId | The id of the folder you want to inspect. If not provided then the root folder is assumed |
|---|---|
| limit | The maximum amount of items to be returned (default=100, max=1000) |
| offset | Pagination offset (default=0) |
GetItemsResponse
Returns the item information for a given path.
| resourcePath | The resource to retrieve from Box |
|---|
Item with that about the found item. null if the item is not found
Used to retrieve all pending collaboration invites for this user.
GetCollaborationsResponse
Retrieves the metadata of a trashed file
| fileId | The id of the trashed file you want |
|---|
File
Retrieves a folder that has been moved to the trash.
| folderId | The id of the folder you want |
|---|
Folder
Get the folders in the Trash. Retrieves the files and/or folders that have been moved to the trash using the mini format. Paginated results can be retrieved using the limit and offset parameters.
| limit | The maximum amount of items to be returned (default=100, max=1000) |
|---|---|
| offset | Pagination offset (default=0) |
GetItemsResponse
Retrieves information about the user who is currently logged in i.e. the user for whom this auth token was generated.
User
Returns a list of all users for the Enterprise
| filterTerm | A string used to filter the results to only users starting with the filter_term in either the name or the login |
|---|---|
| limit | The number of records to return. |
| offset | The record at which to start |
GetUsersResponse
If there are previous versions of this file, this method can be used to retrieve metadata about the older versions. Alert: Versions are only tracked for Box users with premium accounts.
| fileId | The id of the file which versions you want to pull |
|---|
FileVersionResponse with the metadata about the versions
This method initiaes the box client and the auth callback. Also, it fetches the save/restore flows (if specified). If those are specified but don't exist in the registry, then IllegalArgumentException is thrown
| IllegalArgumentException | if restore/save token flows are specified but don't exist |
|---|---|
| MuleException |
Message source that subscribes to the events long polling server and will trigger a new message each time an event is generated. Such message will have an instance of @{link org.mule.modules.box.model.PollingEvent} as payload and an inbound property called 'boxAccessTokenId' that will carry the accessTokenId of the user that owns the event. This source will not provide the events that are generated, it's just a notification that there're new events available. You'll need to use the get-events processor to actually get them. Managing the stream position while doing so is up to you.
| callback | Callback to be invoked when a message arribes |
|---|
Moves all of the content from within one user’s folder into a new folder in another user’s account. You can move folders across users as long as the you have administrative permissions. To move everything from the root folder, use 0 (zero) which always represents the root folder of a Box account
| targetUser | An instance of User representing the user that will receive the folder |
|---|---|
| folderId | The id of the folder to be moved |
| notify | Determines if the destination user should receive email notification of the transfer. |
Folder representing the moved folder
Permanently deletes an item that is in the trash. The item will no longer exist in Box. This action cannot be undone.
| fileId | The id of the file to be permanently deleted |
|---|
Permanently deletes an item that is in the trash. The item will no longer exist in Box. This action cannot be undone.
| folderId | The id of the folder to be permanently deleted |
|---|
Restores a file that has been moved to the trash. Default behavior is to restore the item to the folder it was in before it was moved to the trash. If that parent folder no longer exists or if there is now an item with the same name in that parent folder, the new parent folder and/or new name will need to be included in the request.
| fileId | The id of the trashed file being restored |
|---|---|
| request | An instance of RestoreTrashedItemRequest with the request parameters |
Folder with the restored folder new state
Restores an item that has been moved to the trash. Default behavior is to restore the item to the folder it was in before it was moved to the trash. If that parent folder no longer exists or if there is now an item with the same name in that parent folder, the new parent folder and/or new name will need to be included in the request.
| folderId | The id of the trashed folder being restored |
|---|---|
| request | An instance of RestoreTrashedItemRequest with the request parameters |
Folder with the restored folder new state
The search endpoint provides a simple way of finding items that are accessible in a given user’s Box account.
| query | The string to search for; can be matched against item names, descriptions, text content of a file, and other fields of the different item types. |
|---|---|
| limit | Number of search results to return |
| offset | The search result at which to start the response |
SearchResponse
| accessToken |
|---|
| baseUrl |
|---|
| clientId |
|---|
| clientSecret |
|---|
| uploadUrl |
|---|
| useGzip |
|---|
Used to create a shared link for this particular file.
| fileId | The id of the file you want to share |
|---|---|
| sharedLink | An instance of SharedLink with the information about the share |
File representing the shared folder
Used to create a shared link for this particular folder
| folderId | The id of the folder you want to share |
|---|---|
| sharedLink | An instance of SharedLink with the information about the share |
Folder representing the shared folder
Deletes the shared link associated to a file
| fileId | The id of the file you want to unshare |
|---|
File representing the unshared folder
Deletes the shared link associated to a folder
| folderId | The id of the folder you want to unshare |
|---|
Folder representing the unshared folder
Used to update an existing collaboration.
| collaboration | Object holding the new state for the collaboration |
|---|---|
| collaborationId | The id of the collaboration to be updated |
Collaboration with the state of the collab
Used to update the message of the comment.
| commentId | The id of the comment to be updated |
|---|---|
| newMessage | The new message |
Comment representing the updated message
Used to update the metadata for an existing discussion.
| discussion | Discussion object carrying the new state |
|---|---|
| discussionId | The id of the discussion to be updated |
Discussion carrying the updated state
Update a file’s information. Used to update individual or multiple fields in the file object, including renaming the file, changing it’s description, and creating a shared link for the file. To move a file, change the ID of its parent folder. An optional etag can be provided to ensure that client only updates the file if it knows about the latest version
| fileId | The id of the file which metadata you want to update |
|---|---|
| request | An instance of UpdateItemRequest carrying the update parameters |
| etag | If provided, it will be used to verify that no newer version of the file is available at box |
File with the updated state of the file
Used to update information about the folder. To move a folder, update the ID of its parent. To enable an email address that can be used to upload files to this folder, update the folderUploadEmail attribute. An optional If-Match header can be included to ensure that client only updates the folder if it knows about the latest version by setting the etag attribute.
| request | An instance of UpdateItemRequest with the attributes you want to change |
|---|---|
| folderId | The id of the folder to be modified |
| etag | If provided, it will be used to verify that no newer version of the file is available at box |
Folder that represents the updated folder
Used to edit the settings and information about a user. This method only works for enterprise admins. To roll a user out of the enterprise (and convert them to a standalone free user), update the special enterprise attribute to be null
| userId | The id of the user you want to update |
|---|---|
| user | The user object with the updated state |
| notify | Whether the user should receive an email when they are rolled out of an enterprise |
User with the updated user state
Uploads a new version of a file by reading the contents from a path in local storage
| path | The path of the file in local storage |
|---|---|
| fileId | The id of the file to be updated |
| filename | New name for the file |
| etag | If provided, it will be used to verify that no newer version of the file is available at box |
| contentModifiedAt | The time this file was modified on the user’s machine. An example of a valid date is 2012-12-12T10:55:30-08:00 |
File with the information of the updated file
Uploads a new version of a file from an input stream
| content | A java.io.InputStream with the contents of the file. This stream will leave this processor in a closed state |
|---|---|
| fileId | The id of the file to be updated |
| etag | If provided, it will be used to verify that no newer version of the file is available at box |
| filename | New name for the file |
| contentModifiedAt | The time this file was modified on the user’s machine. An example of a valid date is 2012-12-12T10:55:30-08:00 |
File with the information of the updated file
Receives the path of a file in local storage and uploads its content
| path | The path of the file in local storage |
|---|---|
| folderId | The id of the target folder. |
| filename | The name you want the file to have at box. If not provided, the name on current storage will be used |
| includeHash | If true a sha1 hash of the file will be calculated prior to upload. Box will use that hash to verify that the content's hasn't been corrupted. |
| contentCreatedAt | The time this file was created on the user’s machine. An example of a valid date is 2012-12-12T10:55:30-08:00 |
| contentModifiedAt | The time this file was modified on the user’s machine. An example of a valid date is 2012-12-12T10:55:30-08:00 |
File with the information of the created file
Creates a new file with the contents of a java.io.InputStream. You need to take in count that since this is a stream, using the option of including a verification hash will cause the contents of the input stream to be fully read and loaded in memory.
| folderId | The id of the target folder. |
|---|---|
| filename | The name you want the file to have at box. |
| content | A java.io.InputStream with the contents of the file. This stream will leave this processor in a closed state |
| includeHash | If true a sha1 hash of the file will be calculated prior to upload. Box will use that hash to verify that the content's hasn't been corrupted. |
| contentCreatedAt | The time this file was created on the user’s machine. An example of a valid date is 2012-12-12T10:55:30-08:00 |
| contentModifiedAt | The time this file was modified on the user’s machine. An example of a valid date is 2012-12-12T10:55:30-08:00 |
File with the information of the created file