public interface IBoxFilesManager extends IBoxResourceManager
Modifier and Type | Method and Description |
---|---|
BoxFile |
copyFile(java.lang.String fileId,
BoxItemCopyRequestObject requestObject)
Copy a file.
|
BoxFile |
createSharedLink(java.lang.String fileId,
BoxSharedLinkRequestObject requestObject)
Create a shared link for a file, given the id of the file/folder.
|
void |
deleteFile(java.lang.String fileId,
BoxDefaultRequestObject requestObject)
Delete a file.
|
java.io.InputStream |
downloadFile(java.lang.String fileId,
BoxDefaultRequestObject requestObject)
Execute the download and return the raw InputStream.
|
void |
downloadFile(java.lang.String fileId,
java.io.File destination,
IFileTransferListener listener,
BoxDefaultRequestObject requestObject)
Download a file.
|
void |
downloadFile(java.lang.String fileId,
java.io.OutputStream[] outputStreams,
IFileTransferListener listener,
BoxDefaultRequestObject requestObject)
Download a file.
|
java.io.InputStream |
downloadThumbnail(java.lang.String fileId,
java.lang.String extension,
BoxImageRequestObject requestObject)
Deprecated.
|
BoxFile |
getFile(java.lang.String fileId,
BoxDefaultRequestObject requestObject)
Get file given a file id.
|
BoxCollection |
getFileComments(java.lang.String fileId,
BoxDefaultRequestObject requestObject)
Get comments on a file.
|
java.util.List<BoxFileVersion> |
getFileVersions(java.lang.String fileId,
BoxDefaultRequestObject requestObject)
Get file versions(Note: Versions are only tracked for Box users with premium accounts.).
|
BoxPreview |
getPreview(java.lang.String fileId,
java.lang.String extension,
BoxImageRequestObject requestObject)
Get preview of a file.
|
BoxThumbnail |
getThumbnail(java.lang.String fileId,
java.lang.String extension,
BoxImageRequestObject requestObject)
Get thumbnail of a file.
|
BoxFile |
updateFileInfo(java.lang.String fileId,
BoxFileRequestObject requestObject)
Update info for a file.
|
BoxFile |
uploadFile(BoxFileUploadRequestObject requestObject)
Upload file/files.
|
BoxFile |
uploadNewVersion(java.lang.String fileId,
BoxFileUploadRequestObject requestObject)
Upload a new version of a file.
|
BoxFile getFile(java.lang.String fileId, BoxDefaultRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
fileId
- id of the filerequestObject
- object that goes into request.BoxRestException
- See BoxRestException
for more info.BoxServerException
- See com.box.restclientv2.exceptions.BoxServerException
for more info.AuthFatalFailureException
- See com.box.restclientv2.exceptions.AuthFatalFailureException
for more info.void deleteFile(java.lang.String fileId, BoxDefaultRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
fileId
- id of the filerequestObject
- object that goes into request.BoxRestException
- See BoxRestException
for more info.BoxServerException
- See com.box.restclientv2.exceptions.BoxServerException
for more info.AuthFatalFailureException
- See com.box.restclientv2.exceptions.AuthFatalFailureException
for more info.BoxPreview getPreview(java.lang.String fileId, java.lang.String extension, BoxImageRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
fileId
- id of the fileextension
- requested of the preview image file extensionrequestObject
- request objectBoxRestException
- See BoxRestException
for more info.BoxServerException
- See com.box.restclientv2.exceptions.BoxServerException
for more info.AuthFatalFailureException
- See com.box.restclientv2.exceptions.AuthFatalFailureException
for more info.@Deprecated java.io.InputStream downloadThumbnail(java.lang.String fileId, java.lang.String extension, BoxImageRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
BoxThumbnail getThumbnail(java.lang.String fileId, java.lang.String extension, BoxImageRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
fileId
- id of the fileextension
- file extension of requested thumbnailrequestObject
- request objectBoxRestException
- See BoxRestException
for more info.BoxServerException
- See com.box.restclientv2.exceptions.BoxServerException
for more info.AuthFatalFailureException
- See com.box.restclientv2.exceptions.AuthFatalFailureException
for more info.BoxFile uploadFile(BoxFileUploadRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException, java.lang.InterruptedException
requestObject
- reqeust objectBoxRestException
- See BoxRestException
for more info.BoxServerException
- See com.box.restclientv2.exceptions.BoxServerException
for more info.AuthFatalFailureException
- See com.box.restclientv2.exceptions.AuthFatalFailureException
for more info.java.lang.InterruptedException
BoxFile copyFile(java.lang.String fileId, BoxItemCopyRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
fileId
- id of the filerequestObject
- request objectBoxRestException
- See BoxRestException
for more info.BoxServerException
- See com.box.restclientv2.exceptions.BoxServerException
for more info.AuthFatalFailureException
- See com.box.restclientv2.exceptions.AuthFatalFailureException
for more info.void downloadFile(java.lang.String fileId, java.io.File destination, IFileTransferListener listener, BoxDefaultRequestObject requestObject) throws BoxRestException, BoxServerException, java.lang.IllegalStateException, java.io.IOException, java.lang.InterruptedException, AuthFatalFailureException
fileId
- id of the filedestination
- destination of the downloaded filelistener
- listener to monitor the download progressrequestObject
- extra request object going into api requestBoxRestException
- See BoxRestException
for more info.BoxServerException
- See com.box.restclientv2.exceptions.BoxServerException
for more info.AuthFatalFailureException
- See com.box.restclientv2.exceptions.AuthFatalFailureException
for more info.java.lang.IllegalStateException
- IllegalStateExceptionjava.io.IOException
- IOExceptionjava.lang.InterruptedException
- InterruptedExceptionjava.io.InputStream downloadFile(java.lang.String fileId, BoxDefaultRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
fileId
- id of the file to be downloadedrequestObject
- request objectBoxRestException
- See BoxRestException
for more info.BoxServerException
- See com.box.restclientv2.exceptions.BoxServerException
for more info.AuthFatalFailureException
- See com.box.restclientv2.exceptions.AuthFatalFailureException
for more info.void downloadFile(java.lang.String fileId, java.io.OutputStream[] outputStreams, IFileTransferListener listener, BoxDefaultRequestObject requestObject) throws BoxRestException, java.io.IOException, BoxServerException, java.lang.InterruptedException, AuthFatalFailureException
fileId
- id of the fileoutputStreams
- OutputStream's the file will be downloaded intolistener
- listener to monitor the download progressrequestObject
- request objectBoxRestException
- See BoxRestException
for more info.BoxServerException
- See com.box.restclientv2.exceptions.BoxServerException
for more info.AuthFatalFailureException
- See com.box.restclientv2.exceptions.AuthFatalFailureException
for more info.java.io.IOException
- exceptionjava.lang.InterruptedException
- exceptionBoxFile uploadNewVersion(java.lang.String fileId, BoxFileUploadRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException, java.lang.InterruptedException
fileId
- id of the filerequestObject
- requestObjectBoxRestException
- See BoxRestException
for more info.BoxServerException
- See com.box.restclientv2.exceptions.BoxServerException
for more info.AuthFatalFailureException
- See com.box.restclientv2.exceptions.AuthFatalFailureException
for more info.java.lang.InterruptedException
java.util.List<BoxFileVersion> getFileVersions(java.lang.String fileId, BoxDefaultRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
fileId
- id of the filerequestObject
- request objectBoxRestException
- See BoxRestException
for more info.BoxServerException
- See com.box.restclientv2.exceptions.BoxServerException
for more info.AuthFatalFailureException
- See com.box.restclientv2.exceptions.AuthFatalFailureException
for more info.BoxFile updateFileInfo(java.lang.String fileId, BoxFileRequestObject requestObject) throws java.io.UnsupportedEncodingException, BoxRestException, BoxServerException, AuthFatalFailureException
fileId
- id of the filerequestObject
- request objectjava.io.UnsupportedEncodingException
- exceptionBoxRestException
- See BoxRestException
for more info.BoxServerException
- See com.box.restclientv2.exceptions.BoxServerException
for more info.AuthFatalFailureException
- See com.box.restclientv2.exceptions.AuthFatalFailureException
for more info.BoxFile createSharedLink(java.lang.String fileId, BoxSharedLinkRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
fileId
- id of the filerequestObject
- request objectBoxRestException
- See BoxRestException
for more info.BoxServerException
- See com.box.restclientv2.exceptions.BoxServerException
for more info.AuthFatalFailureException
- See com.box.restclientv2.exceptions.AuthFatalFailureException
for more info.BoxCollection getFileComments(java.lang.String fileId, BoxDefaultRequestObject requestObject) throws BoxRestException, BoxServerException, AuthFatalFailureException
fileId
- id of the filerequestObject
- object that goes into request.BoxRestException
- See BoxRestException
for more info.BoxServerException
- See com.box.restclientv2.exceptions.BoxServerException
for more info.AuthFatalFailureException
- See com.box.restclientv2.exceptions.AuthFatalFailureException
for more info.