Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
	<dependency>
    	<groupId>org.apache.camel</groupId>
    	<artifactId>camel-box</artifactId>
    	<version>${camel-version}</version>
	</dependency>

URI format

Code Block
    box://endpoint-prefix/endpoint?[options]

...

In case of Box API errors the endpoint will throw a RuntimeCamelException with a com.box.restclientv2.exceptions.BoxSDKException derived exception cause.

 

Consumer Endpoints:

Any of the producer endpoints that take a reading#reading parameter can be used as a consumer endpoint. The polling consumer uses the since and until fields to get responses within the polling interval. In addition to other reading fields, an initial since value can be provided in the endpoint for the first poll.

Rather than the endpoints returning a List (or facebook4j.ResponseList) through a single route exchange, camel-facebook creates one route exchange per returned object. As an example, if "facebook://home" results in five posts, the route will be executed five times (once for each Post).

...

Endpoint Prefix collaborations

The following endpoints can be invoked with the prefix collaborations as follows:

Code Block
    box://collaborations/endpoint?[options]
EndpointShorthand AliasOptionsResult Body Type
createCollaborationcreatecollabRequest, folderIdcom.box.boxjavalibv2.dao.BoxCollaboration
deleteCollaborationdeletecollabId, defaultRequest 
getAllCollaborationsallCollaborationsgetAllCollabsRequestjava.util.List
getCollaborationcollaborationcollabId, defaultRequestcom.box.boxjavalibv2.dao.BoxCollaboration
updateCollaborationupdatecollabId, collabRequestcom.box.boxjavalibv2.dao.BoxCollaboration
URI Options for collaborations

If a value is not provided for one of the option(s) [defaultRequest] either in the endpoint URI or in a message header, it will be assumed to be null. Note that the null value(s) will only be used if other options do not satisfy matching endpoints.

NameType
collabIdString
collabRequestcom.box.boxjavalibv2.requests.requestobjects.BoxCollabRequestObject
defaultRequestcom.box.restclientv2.requestsbase.BoxDefaultRequestObject
folderIdString
getAllCollabsRequestcom.box.boxjavalibv2.requests.requestobjects.BoxGetAllCollabsRequestObject

Endpoint Prefix events

The following endpoints can be invoked with the prefix events as follows:

Code Block
  box://events/endpoint?[options]

 
 

EndpointShorthand AliasOptionsResult Body Type
getEventOptionseventOptionsdefaultRequestcom.box.boxjavalibv2.dao.BoxCollection
getEventseventseventRequestcom.box.boxjavalibv2.dao.BoxEventCollection
URI Options for events

If a value is not provided for one of the option(s) [defaultRequest] either in the endpoint URI or in a message header, it will be assumed to be null. Note that the null value(s) will only be used if other options do not satisfy matching endpoints.

NameType
defaultRequestcom.box.restclientv2.requestsbase.BoxDefaultRequestObject
eventRequestcom.box.boxjavalibv2.requests.requestobjects.BoxEventRequestObject

Endpoint Prefix groups

The following endpoints can be invoked with the prefix groups as follows:

Code Block
    box://groups/endpoint?[options]
EndpointShorthand AliasOptionsResult Body Type
createGroup [groupRequest], [name]com.box.boxjavalibv2.dao.BoxGroup
createMembership [groupId, role, userId], [groupMembershipRequest]com.box.boxjavalibv2.dao.BoxGroupMembership
deleteGroupdeletedefaultRequest, groupId 
deleteMembershipdeletedefaultRequest, membershipId 
getAllCollaborationsallCollaborationsdefaultRequest, groupIdcom.box.boxjavalibv2.dao.BoxCollection
getAllGroupsallGroupsdefaultRequestcom.box.boxjavalibv2.dao.BoxCollection
getMembershipmembershipdefaultRequest, membershipIdcom.box.boxjavalibv2.dao.BoxGroupMembership
getMembershipsmembershipsdefaultRequest, groupIdcom.box.boxjavalibv2.dao.BoxCollection
updateGroupupdategroupId, groupRequestcom.box.boxjavalibv2.dao.BoxGroup
updateMembershipupdate[groupMembershipRequest], [role], membershipIdcom.box.boxjavalibv2.dao.BoxGroupMembership
URI Options for groups

If a value is not provided for one of the option(s) [defaultRequest] either in the endpoint URI or in a message header, it will be assumed to be null. Note that the null value(s) will only be used if other options do not satisfy matching endpoints.

NameType
defaultRequestcom.box.restclientv2.requestsbase.BoxDefaultRequestObject
groupIdString
groupMembershipRequestcom.box.boxjavalibv2.requests.requestobjects.BoxGroupMembershipRequestObject
groupRequestcom.box.boxjavalibv2.requests.requestobjects.BoxGroupRequestObject
membershipIdString
nameString
roleString
userIdString

5. Endpoint Prefix search

...

The following endpoints can be invoked with the prefix search as follows:

        box://search/endpoint?[options]
    
EndpointShorthand AliasOptionsResult Body Type
search defaultRequest, searchQuerycom.box.boxjavalibv2.dao.BoxCollection

URI Options for search

...

If a value is not provided for one of the option(s) [defaultRequest] either in the endpoint URI or in a message header, it will be assumed to be null. Note that the null value(s) will only be used if other options do not satisfy matching endpoints.

NameType
defaultRequestcom.box.restclientv2.requestsbase.BoxDefaultRequestObject
searchQueryString

6. Endpoint Prefix shared-comments

...

The following endpoints can be invoked with the prefix shared-comments as follows:

        box://shared-comments/endpoint?[options]
    
EndpointShorthand AliasOptionsResult Body Type
addComment [commentRequest], [commentedItemId, commentedItemType, message]com.box.boxjavalibv2.dao.BoxComment
deleteCommentdeletecommentId, defaultRequest 
getCommentcommentcommentId, defaultRequestcom.box.boxjavalibv2.dao.BoxComment
updateCommentupdatecommentId, commentRequestcom.box.boxjavalibv2.dao.BoxComment

URI Options for shared-comments

...

If a value is not provided for one of the option(s) [defaultRequest] either in the endpoint URI or in a message header, it will be assumed to be null. Note that the null value(s) will only be used if other options do not satisfy matching endpoints.

NameType
commentIdString
commentRequestcom.box.boxjavalibv2.requests.requestobjects.BoxCommentRequestObject
commentedItemIdString
commentedItemTypecom.box.boxjavalibv2.dao.IBoxType
defaultRequestcom.box.restclientv2.requestsbase.BoxDefaultRequestObject
messageString

7. Endpoint Prefix shared-files

...

The following endpoints can be invoked with the prefix shared-files as follows:

        box://shared-files/endpoint?[options]
    
EndpointShorthand AliasOptionsResult Body Type
copyFile fileId, itemCopyRequestcom.box.boxjavalibv2.dao.BoxFile
createSharedLinkcreatefileId, sharedLinkRequestcom.box.boxjavalibv2.dao.BoxFile
deleteFile defaultRequest, fileId 
downloadFiledownload[destination, listener], [listener, outputStreams], defaultRequest, fileIdjava.io.InputStream
downloadThumbnaildownloadextension, fileId, imageRequestjava.io.InputStream
getFilefiledefaultRequest, fileIdcom.box.boxjavalibv2.dao.BoxFile
getFileCommentsfileCommentsdefaultRequest, fileIdcom.box.boxjavalibv2.dao.BoxCollection
getFileVersionsfileVersionsdefaultRequest, fileIdjava.util.List
getPreviewpreviewextension, fileId, imageRequestcom.box.boxjavalibv2.dao.BoxPreview
getThumbnailthumbnailextension, fileId, imageRequestcom.box.boxjavalibv2.dao.BoxThumbnail
updateFileInfoupdatefileId, fileRequestcom.box.boxjavalibv2.dao.BoxFile
uploadFileuploadfileUploadRequestcom.box.boxjavalibv2.dao.BoxFile
uploadNewVersionuploadfileId, fileUploadRequestcom.box.boxjavalibv2.dao.BoxFile

URI Options for shared-files

...

If a value is not provided for one of the option(s) [defaultRequest] either in the endpoint URI or in a message header, it will be assumed to be null. Note that the null value(s) will only be used if other options do not satisfy matching endpoints.

NameType
defaultRequestcom.box.restclientv2.requestsbase.BoxDefaultRequestObject
destinationjava.io.File
extensionString
fileIdString
fileRequestcom.box.boxjavalibv2.requests.requestobjects.BoxFileRequestObject
fileUploadRequestcom.box.restclientv2.requestsbase.BoxFileUploadRequestObject
imageRequestcom.box.boxjavalibv2.requests.requestobjects.BoxImageRequestObject
itemCopyRequestcom.box.boxjavalibv2.requests.requestobjects.BoxItemCopyRequestObject
listenercom.box.boxjavalibv2.filetransfer.IFileTransferListener
outputStreamsjava.io.OutputStream[]
sharedLinkRequestcom.box.boxjavalibv2.requests.requestobjects.BoxSharedLinkRequestObject

8. Endpoint Prefix shared-folders

...

The following endpoints can be invoked with the prefix shared-folders as follows:

        box://shared-folders/endpoint?[options]
    
EndpointShorthand AliasOptionsResult Body Type
copyFolder folderId, itemCopyRequestcom.box.boxjavalibv2.dao.BoxFolder
createFoldercreatefolderRequestcom.box.boxjavalibv2.dao.BoxFolder
createSharedLinkcreatefolderId, sharedLinkRequestcom.box.boxjavalibv2.dao.BoxFolder
deleteFolderdeletefolderDeleteRequest, folderId 
getFolderfolderdefaultRequest, folderIdcom.box.boxjavalibv2.dao.BoxFolder
getFolderCollaborationsfolderCollaborationsdefaultRequest, folderIdjava.util.List
getFolderItemsfolderItemsfolderId, pagingRequestcom.box.boxjavalibv2.dao.BoxCollection
updateFolderInfoupdatefolderId, folderRequestcom.box.boxjavalibv2.dao.BoxFolder

URI Options for shared-folders

...

If a value is not provided for one of the option(s) [defaultRequest] either in the endpoint URI or in a message header, it will be assumed to be null. Note that the null value(s) will only be used if other options do not satisfy matching endpoints.

NameType
defaultRequestcom.box.restclientv2.requestsbase.BoxDefaultRequestObject
folderDeleteRequestcom.box.boxjavalibv2.requests.requestobjects.BoxFolderDeleteRequestObject
folderIdString
folderRequestcom.box.boxjavalibv2.requests.requestobjects.BoxFolderRequestObject
itemCopyRequestcom.box.boxjavalibv2.requests.requestobjects.BoxItemCopyRequestObject
pagingRequestcom.box.boxjavalibv2.requests.requestobjects.BoxPagingRequestObject
sharedLinkRequestcom.box.boxjavalibv2.requests.requestobjects.BoxSharedLinkRequestObject

9. Endpoint Prefix shared-items

...

The following endpoints can be invoked with the prefix shared-items as follows:

        box://shared-items/endpoint?[options]
    
EndpointShorthand AliasOptionsResult Body Type
getSharedItemsharedItemdefaultRequestcom.box.boxjavalibv2.dao.BoxItem

URI Options for shared-items

...

If a value is not provided for one of the option(s) [defaultRequest] either in the endpoint URI or in a message header, it will be assumed to be null. Note that the null value(s) will only be used if other options do not satisfy matching endpoints.

NameType
defaultRequestcom.box.restclientv2.requestsbase.BoxDefaultRequestObject

10. Endpoint Prefix users

...

The following endpoints can be invoked with the prefix users as follows:

        box://users/endpoint?[options]
    
EndpointShorthand AliasOptionsResult Body Type
addEmailAlias emailAliasRequest, userIdcom.box.boxjavalibv2.dao.BoxEmailAlias
createEnterpriseUsercreateuserRequestcom.box.boxjavalibv2.dao.BoxUser
deleteEmailAlias defaultRequest, emailId, userId 
deleteEnterpriseUser userDeleteRequest, userId 
getAllEnterpriseUserallEnterpriseUserdefaultRequest, filterTermjava.util.List
getCurrentUsercurrentUserdefaultRequestcom.box.boxjavalibv2.dao.BoxUser
getEmailAliasesemailAliasesdefaultRequest, userIdjava.util.List
moveFolderToAnotherUser folderId, simpleUserRequest, userIdcom.box.boxjavalibv2.dao.BoxFolder
updateUserInformaitonupdateuserId, userRequestcom.box.boxjavalibv2.dao.BoxUser
updateUserPrimaryLoginupdateuserId, userUpdateLoginRequestcom.box.boxjavalibv2.dao.BoxUser

URI Options for users

...

If a value is not provided for one of the option(s) [defaultRequest] either in the endpoint URI or in a message header, it will be assumed to be null. Note that the null value(s) will only be used if other options do not satisfy matching endpoints.

NameType
defaultRequestcom.box.restclientv2.requestsbase.BoxDefaultRequestObject
emailAliasRequestcom.box.boxjavalibv2.requests.requestobjects.BoxEmailAliasRequestObject
emailIdString
filterTermString
folderIdString
simpleUserRequestcom.box.boxjavalibv2.requests.requestobjects.BoxSimpleUserRequestObject
userDeleteRequestcom.box.boxjavalibv2.requests.requestobjects.BoxUserDeleteRequestObject
userIdString
userRequestcom.box.boxjavalibv2.requests.requestobjects.BoxUserRequestObject
userUpdateLoginRequestcom.box.boxjavalibv2.requests.requestobjects.BoxUserUpdateLoginRequestObject

Consumer Endpoints:

Consumer endpoints can only use the endpoint prefix poll-events as shown in the example next. By default the consumer will split the com.box.boxjavalibv2.dao.BoxEventCollection from every long poll and create an exchange for every com.box.boxjavalibv2.dao.BoxEvent. To make the consumer return the entire collection in a single exchange, use the URI option consumer.splitResult=false.

 

Code Block
    box://poll-events/endpoint?[options]
EndpointShorthand AliasOptionsResult Body Type
poll limit, streamPosition, streamType com.box.boxjavalibv2.dao.BoxEvent by default, or com.box.boxjavalibv2.dao.BoxEventCollection when consumer.splitResult=false
URI Options for poll-events
NameType
limitInteger
streamPositionLong
streamTypeString
splitResultboolean

...

  1. URI Options #

Name

Type

Description

achievementURL

java.net.URL

The unique URL of the achievement

albumCreate

facebook4j.AlbumCreate

The facebook Album to be created

albumId

String

The album ID

allowNewOptions

boolean

True if allows other users to add new options

appId

String

The ID of the Facebook Application

center

facebook4j.GeoLocation

Location latitude and longitude

checkinCreate

facebook4j.CheckinCreate

The checkin to be created. Deprecated, instead create a Post with an attached location

checkinId

String

The checkin ID

commentId

String

The comment ID

description

String

The description text

distance

int

Distance in meters

domainId

String

The domain ID

domainName

String

The domain name

domainNames

String[]

The domain names

eventId

String

The event ID

eventUpdate

facebook4j.EventUpdate

The event to be created or updated

friendId

String

The friend ID

friendUserId

String

The friend user ID

friendlistId

String

The friend list ID

friendlistName

String

The friend list Name

groupId

String

The group ID

ids

String[]

The ids of users

includeRead

boolean

Enables notifications that the user has already read in addition to unread ones

link

java.net.URL

Link URL

linkId

String

The link ID

locale

java.util.Locale

Desired FQL locale

message

String

The message text

messageId

String

The message ID

metric

String

The metric name

name

String

Test user name, must be of the form 'first last'

noStory

boolean

If set to true, optionally suppresses the feed story that is automatically generated on a user’s profile when they upload a photo using your application.

noteId

String

The note ID

notificationId

String

The notification ID

objectId

String

The insight object ID

optionDescription

String

The question's answer option description

options

java.util.List<String>

The question's answer options

permissionName

String

The permission name

permissions

String

Test user permissions in the format perm1,perm2,...

photoId

String

The photo ID

place

String

The Facebook ID of the place associated with the Photo

placeId

String

The place ID

postId

String

The post ID

postUpdate

facebook4j.PostUpdate

The post to create or update

queries

java.util.Map<String>

FQL queries

query

String

FQL query or search terms for search* endpoints

question

String

The question text

questionId

String

The question id

reading

facebook4j.Reading

Optional reading parameters. See Reading Options(#reading)

scoreValue

int

The numeric score with value

size

facebook4j.PictureSize

The picture size, one of large, normal, small or square

source

facebook4j.Media

The media content from either a java.io.File or java.io.Inputstream

subject

String

The note of the subject

tagUpdate

facebook4j.TagUpdate

Photo tag information

testUser1

facebook4j.TestUser

Test user

testUser2

facebook4j.TestUser

Test user

testUserId

String

The ID of the test user

title

String

The title text

toUserId

String

The ID of the user to tag

toUserIds

java.util.List<String>

The IDs of the users to tag

userId

String

The Facebook user ID

userId1

String

The ID of a user

userId2

String

The ID of a user

userIds

String[]

The IDs of users to invite to event

userLocale

String

The test user locale

videoId

String

The video ID

...

Reading Options

The reading option of type facebook4j.Reading adds support for reading parameters, which allow selecting specific fields, limits the number of results, etc. For more information see Graph API#reading - Facebook Developers.

It is also used by consumer endpoints to poll Facebook data to avoid sending duplicate messages across polls.

The reading option can be a reference or value of type facebook4j.Reading, or can be specified using the following reading options in either the endpoint URI or exchange header with CamelFacebook. prefix.

User's stream filter key. See Facebook stream_filter

Option

Description

reading.fields

Field names to retrieve, in the format field1,field2,...

reading.limit

Limit for number of items to return for list results, e.g. a limit of 10 returns items 1 through 10

reading.offset

Starting offset for list results, e.g. a limit of 10, and offset of 10 returns items 11 through 20

reading.until

A Unix timestamp or strtotime data value that points to the end of the range of time-based data

reading.since

A Unix timestamp or strtotime data value that points to the start of the range of time-based data

reading.locale

Retrieve localized content in a particular locale, specified as a String with the format language[,country][,variant]

reading.with

Retrieve information about objects that have location information attached, set it to true

reading.metadata

Use Facebook Graph API Introspection to retrieve object metadata, set it to true

reading.filter

Message header

Any of the URI options#urioptions can be provided in a message header for producer endpoints with CamelFacebook. prefix.

...