@BoxResourceType(value="file_request") public class BoxFileRequest extends BoxResource
Modifier and Type | Class and Description |
---|---|
class |
BoxFileRequest.Info
Contains information about a BoxFileRequest.
|
static class |
BoxFileRequest.Status
The status of the file request.
|
Modifier and Type | Field and Description |
---|---|
static URLTemplate |
COPY_FILE_REQUEST_URL_TEMPLATE
Copy File Request URL Template.
|
static URLTemplate |
FILE_REQUEST_URL_TEMPLATE
File Request URL Template.
|
Constructor and Description |
---|
BoxFileRequest(BoxAPIConnection api,
String id)
Constructs a BoxFileRequest for a file request with a given ID.
|
Modifier and Type | Method and Description |
---|---|
BoxFileRequest.Info |
copyInfo(BoxFileRequest.Info info,
String folderId)
Copies this file request that is already present on one folder, and applies it to another folder.
|
BoxFileRequest.Info |
copyInfo(String folderId)
Copies this file request that is already present on one folder, and applies it to another folder.
|
void |
delete()
Delete this file request.
|
BoxFileRequest.Info |
getInfo()
Gets information about this file request.
|
BoxFileRequest.Info |
updateInfo(BoxFileRequest.Info info)
Updates the information about this file request with any info fields that have been modified locally.
|
equals, getAPI, getID, getResourceType, hashCode
public static final URLTemplate FILE_REQUEST_URL_TEMPLATE
public static final URLTemplate COPY_FILE_REQUEST_URL_TEMPLATE
public BoxFileRequest(BoxAPIConnection api, String id)
api
- the API connection to be used by the file request.id
- the ID of the file request.public BoxFileRequest.Info getInfo()
public BoxFileRequest.Info copyInfo(String folderId)
folderId
- the ID of the folder for the file request.public BoxFileRequest.Info copyInfo(BoxFileRequest.Info info, String folderId)
Info fields that have been modified locally will overwrite the values in the original file request.
info
- the info.folderId
- the ID of the folder for the file request.public BoxFileRequest.Info updateInfo(BoxFileRequest.Info info)
The only fields that will be updated are the ones that have been modified locally. For example, the following code won't update any information (or even send a network request) since none of the info's fields were changed:
BoxFileRequest fileRequest = new BoxFileRequest(api, id); BoxFileRequest.Info info = fileRequest.getInfo(); info.updateInfo(info);
info
- the updated info.public void delete()