File request objects represent a file request associated with a folder.
- Get a File Request's Information
- Copy a File Request's Information
- Update a File Request's Information
- Delete a File Request
Calling getInfo()
returns information on a file request.
BoxFileRequest fileRequest = new BoxFileRequest(api, "id");
BoxFileRequest.Info fileRequestInfo = fileRequest.getInfo();
Calling copyInfo(String folderId)
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)
.
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");
Calling updateInfo(BoxFileRequest.Info info)
updates a file request. This can be used to activate
or deactivate a file request.
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);
Calling delete()
deletes a file request permanently.
BoxFileRequest fileRequest = new BoxFileRequest(api, "id");
fileRequest.delete();