Class BoxFoldersManager
java.lang.Object
org.apache.camel.component.box.api.BoxFoldersManager
Provides operations to manage Box folders.
-
Constructor Summary
ConstructorsConstructorDescriptionBoxFoldersManager(com.box.sdk.BoxAPIConnection boxConnection) Create folder manager to manage folders of Box connection's authenticated user. -
Method Summary
Modifier and TypeMethodDescriptioncom.box.sdk.BoxFoldercopyFolder(String folderId, String destinationFolderId, String newName) Copy folder to destination folder while optionally giving it a new name.com.box.sdk.BoxFoldercreateFolder(String parentFolderId, String folderName) Create a folder in parent folder with givenparentFolderId.com.box.sdk.BoxFoldercreateFolder(String parentFolderId, String... path) Create a folder specified by path from parent folder with givenparentFolderId, creating intermediate directories as required.com.box.sdk.BoxSharedLinkcreateFolderSharedLink(String folderId, com.box.sdk.BoxSharedLink.Access access, Date unshareDate, com.box.sdk.BoxSharedLink.Permissions permissions) Create a shared link to folder.voiddeleteFolder(String folderId) Delete folder.com.box.sdk.BoxFolderReturn the Box folder referenced bypath.com.box.sdk.BoxFolder.InfogetFolderInfo(String folderId, String... fields) Get folder information.Collection<com.box.sdk.BoxItem.Info> getFolderItems(String folderId, Long offset, Long limit, String... fields) Returns a specific range of child items in folder and specifies which fields of each item to retrieve.com.box.sdk.BoxFolderReturn the root folder of authenticated user.com.box.sdk.BoxFoldermoveFolder(String folderId, String destinationFolderId, String newName) Move folder to destination folder while optionally giving it a new name.com.box.sdk.BoxFolderrenameFolder(String folderId, String newFolderName) Rename folder giving it the namenewNamecom.box.sdk.BoxFolderupdateFolderInfo(String folderId, com.box.sdk.BoxFolder.Info info) Update folder information.
-
Constructor Details
-
BoxFoldersManager
public BoxFoldersManager(com.box.sdk.BoxAPIConnection boxConnection) Create folder manager to manage folders of Box connection's authenticated user.- Parameters:
boxConnection- - Box connection to authenticated user account.
-
-
Method Details
-
getRootFolder
public com.box.sdk.BoxFolder getRootFolder()Return the root folder of authenticated user.- Returns:
- The root folder of authenticated user.
-
getFolder
Return the Box folder referenced bypath.- Parameters:
path- - Sequence of Box folder names from root folder to returned folder.- Returns:
- The Box folder referenced by
pathornullif folder is not found.
-
getFolderItems
public Collection<com.box.sdk.BoxItem.Info> getFolderItems(String folderId, Long offset, Long limit, String... fields) Returns a specific range of child items in folder and specifies which fields of each item to retrieve.- Parameters:
folderId- - the id of folder.offset- - the index of first child item to retrieve; ifnullall child items are retrieved.limit- - the maximum number of children to retrieve after the offset; ifnullall child items are retrieved.fields- - the item fields to retrieve for each child item; ifnullall item fields are retrieved.- Returns:
- The Items in folder
-
createFolder
Create a folder in parent folder with givenparentFolderId.- Parameters:
parentFolderId- - the id of parent folder.folderName- the name of created folder.- Returns:
- The created folder.
-
createFolder
Create a folder specified by path from parent folder with givenparentFolderId, creating intermediate directories as required.- Parameters:
parentFolderId- - the id of parent folder.path- - Sequence of Box folder names from parent folder to returned folder.- Returns:
- The last folder in path, no fault will be thrown if it already exists.
-
copyFolder
public com.box.sdk.BoxFolder copyFolder(String folderId, String destinationFolderId, String newName) Copy folder to destination folder while optionally giving it a new name.- Parameters:
folderId- - the id of folder to copy.destinationFolderId- - the id of the destination folder.newName- - the new name for copied folder; ifnewNameisnull, the copied folder has same name as the original.- Returns:
- The copied folder.
-
moveFolder
public com.box.sdk.BoxFolder moveFolder(String folderId, String destinationFolderId, String newName) Move folder to destination folder while optionally giving it a new name.- Parameters:
folderId- - the id of folder to move.destinationFolderId- - the id of the destination folder.newName- - the new name of moved folder; ifnewNameisnull, the moved folder has same name as the original.- Returns:
- The moved folder.
-
renameFolder
Rename folder giving it the namenewName- Parameters:
folderId- - the id of folder to rename.newFolderName- - the new name of folder.- Returns:
- The renamed folder.
-
deleteFolder
Delete folder.- Parameters:
folderId- - the id of folder to delete.
-
getFolderInfo
Get folder information.- Parameters:
folderId- - the id of folder.fields- - the information fields to retrieve; ifnullall information fields are retrieved.- Returns:
- The folder information.
-
updateFolderInfo
Update folder information.- Parameters:
folderId- - the id of folder to update.info- - the updated information- Returns:
- The updated folder.
-