public class BoxFoldersManager extends Object
| Constructor and Description |
|---|
BoxFoldersManager(com.box.sdk.BoxAPIConnection boxConnection)
Create folder manager to manage folders of Box connection's authenticated user.
|
| Modifier and Type | Method and Description |
|---|---|
com.box.sdk.BoxFolder |
copyFolder(String folderId,
String destinationFolderId,
String newName)
Copy folder to destination folder while optionally giving it a new name.
|
com.box.sdk.BoxFolder |
createFolder(String parentFolderId,
String... path)
Create a folder specified by path from parent folder with given
parentFolderId, creating
intermediate directories as required. |
com.box.sdk.BoxFolder |
createFolder(String parentFolderId,
String folderName)
Create a folder in parent folder with given
parentFolderId. |
com.box.sdk.BoxSharedLink |
createFolderSharedLink(String folderId,
com.box.sdk.BoxSharedLink.Access access,
Date unshareDate,
com.box.sdk.BoxSharedLink.Permissions permissions)
Create a shared link to folder.
|
void |
deleteFolder(String folderId)
Delete folder.
|
com.box.sdk.BoxFolder |
getFolder(String... path)
Return the Box folder referenced by
path. |
com.box.sdk.BoxFolder.Info |
getFolderInfo(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.BoxFolder |
getRootFolder()
Return the root folder of authenticated user.
|
com.box.sdk.BoxFolder |
moveFolder(String folderId,
String destinationFolderId,
String newName)
Move folder to destination folder while optionally giving it a new name.
|
com.box.sdk.BoxFolder |
renameFolder(String folderId,
String newFolderName)
Rename folder giving it the name
newName |
com.box.sdk.BoxFolder |
updateFolderInfo(String folderId,
com.box.sdk.BoxFolder.Info info)
Update folder information.
|
public BoxFoldersManager(com.box.sdk.BoxAPIConnection boxConnection)
boxConnection - - Box connection to authenticated user account.public com.box.sdk.BoxFolder getRootFolder()
public com.box.sdk.BoxFolder getFolder(String... path)
path.path - - Sequence of Box folder names from root folder to returned folder.path or null if folder is not found.public Collection<com.box.sdk.BoxItem.Info> getFolderItems(String folderId, Long offset, Long limit, String... fields)
folderId - - the id of folder.offset - - the index of first child item to retrieve; if null all child items are retrieved.limit - - the maximum number of children to retrieve after the offset; if null all child
items are retrieved.fields - - the item fields to retrieve for each child item; if null all item fields are
retrieved.public com.box.sdk.BoxFolder createFolder(String parentFolderId, String folderName)
parentFolderId.parentFolderId - - the id of parent folder.folderName - the name of created folder.public com.box.sdk.BoxFolder createFolder(String parentFolderId, String... path)
parentFolderId, creating
intermediate directories as required.parentFolderId - - the id of parent folder.path - - Sequence of Box folder names from parent folder to returned folder.public com.box.sdk.BoxFolder copyFolder(String folderId, String destinationFolderId, String newName)
folderId - - the id of folder to copy.destinationFolderId - - the id of the destination folder.newName - - the new name for copied folder; if newName is null, the
copied folder has same name as the original.public com.box.sdk.BoxFolder moveFolder(String folderId, String destinationFolderId, String newName)
folderId - - the id of folder to move.destinationFolderId - - the id of the destination folder.newName - - the new name of moved folder; if newName is null, the
moved folder has same name as the original.public com.box.sdk.BoxFolder renameFolder(String folderId, String newFolderName)
newNamefolderId - - the id of folder to rename.newFolderName - - the new name of folder.public void deleteFolder(String folderId)
folderId - - the id of folder to delete.public com.box.sdk.BoxFolder.Info getFolderInfo(String folderId, String... fields)
folderId - - the id of folder.fields - - the information fields to retrieve; if null all information fields are retrieved.public com.box.sdk.BoxFolder updateFolderInfo(String folderId, com.box.sdk.BoxFolder.Info info)
folderId - - the id of folder to update.info - - the updated informationpublic com.box.sdk.BoxSharedLink createFolderSharedLink(String folderId, com.box.sdk.BoxSharedLink.Access access, Date unshareDate, com.box.sdk.BoxSharedLink.Permissions permissions)
folderId - - the id of folder to create shared link on.access - - the access level of the shared link.unshareDate - - the date and time at which time the created shared link will expire; if
unsharedDate is null then a non-expiring link is created.permissions - - the permissions of the created link; if permissions is null then
the created shared link is create with default permissions.Apache Camel