-
Notifications
You must be signed in to change notification settings - Fork 186
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c7bb1fe
commit c3cd6c3
Showing
8 changed files
with
768 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,73 @@ | ||
File Requests | ||
============= | ||
|
||
File request objects represent a file request associated with a folder. | ||
|
||
<!-- START doctoc generated TOC please keep comment here to allow auto update --> | ||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE --> | ||
|
||
- [Get a File Request's Information](#get-a-file-requests-information) | ||
- [Copy a File Request's Information](#copy-a-file-requests-information) | ||
- [Update a File Request's Information](#update-a-file-requests-information) | ||
- [Delete a File Request](#delete-a-file-request) | ||
|
||
<!-- END doctoc generated TOC please keep comment here to allow auto update --> | ||
|
||
Get a File Request's Information | ||
------------------------ | ||
|
||
Calling [`getInfo()`][get-info] returns information on a file request. | ||
|
||
```java | ||
BoxFileRequest fileRequest = new BoxFileRequest(api, "id"); | ||
BoxFileRequest.Info fileRequestInfo = fileRequest.getInfo(); | ||
``` | ||
|
||
[get-info]: http://opensource.box.com/box-java-sdk/javadoc/com/box/sdk/BoxFileRequest.html#getInfo | ||
|
||
Copy a File Request's Information | ||
--------------------------- | ||
|
||
Calling [`copyInfo(String folderId)`][copy-info] copies an existing file request that is already present | ||
on one folder, and applies it to another folder. If you want to set certain fields of the newly copied file request when it is created, | ||
set those fields in the `BoxFileRequest.Info` that you pass into this method [`copyInfo(BoxFileRequest.Info info, String folderId)`][copy-info]. | ||
|
||
```java | ||
BoxFileRequest fileRequest = new BoxFileRequest(api, "id"); | ||
BoxFileRequest.Info fileRequestInfo = fileRequest.new Info(); | ||
fileRequestInfo.setDescription("Following documents are requested for your process"); | ||
fileRequestInfo.setIsDescriptionRequired(true); | ||
fileRequestInfo.setStatus(BoxFileRequest.Status.ACTIVE); | ||
fileRequestInfo = fileRequest.copyInfo(fileRequestInfo, "folderId"); | ||
``` | ||
|
||
[copy-info]: http://opensource.box.com/box-java-sdk/javadoc/com/box/sdk/BoxTask.html#copyInfo | ||
|
||
Update a File Request's Information | ||
--------------------------- | ||
|
||
Calling [`updateInfo(BoxFileRequest.Info info)`][update-info] updates a file request. This can be used to activate | ||
or deactivate a file request. | ||
|
||
```java | ||
BoxFileRequest fileRequest = new BoxFileRequest(api, "id"); | ||
BoxFileRequest.Info fileRequestInfo = fileRequest.new Info(); | ||
fileRequestInfo.setDescription("Following documents are requested for your process"); | ||
fileRequestInfo.setIsDescriptionRequired(true); | ||
fileRequestInfo.setStatus(BoxFileRequest.Status.ACTIVE); | ||
fileRequestInfo = fileRequest.updateInfo(fileRequestInfo); | ||
``` | ||
|
||
[update-info]: http://opensource.box.com/box-java-sdk/javadoc/com/box/sdk/BoxFileRequest.html#updateInfo | ||
|
||
Delete a File Request | ||
------------- | ||
|
||
Calling [`delete()`][delete] deletes a file request permanently. | ||
|
||
```java | ||
BoxFileRequest fileRequest = new BoxFileRequest(api, "id"); | ||
fileRequest.delete(); | ||
``` | ||
|
||
[delete]: https://box.github.io/box-java-sdk/javadoc/com/box/sdk/BoxFileRequest.html#delete |
Oops, something went wrong.