public class BoxApiPreview
extends com.box.androidsdk.content.BoxApiFile
| Modifier and Type | Class and Description |
|---|---|
static class |
BoxApiPreview.Extensions
Enumeration of all preview supported extensions
|
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
METADATA_FILE_INFO_TAG |
static java.lang.String |
TAG |
| Constructor and Description |
|---|
BoxApiPreview(com.box.androidsdk.content.models.BoxSession session) |
| Modifier and Type | Method and Description |
|---|---|
BoxRequestsPreview.GetAudioID3Metadata |
getAudioID3MetadataRequest(java.lang.String requestUrl,
com.box.androidsdk.content.models.BoxSession session,
com.box.androidsdk.content.models.BoxFile file,
PreviewStorage storage)
Returns a request that retrieves the ID3 metadata from the preview endpoint
|
BoxRequestsPreview.CheckFileConsistency |
getCheckFileConsistencyRequest(java.lang.String fileId,
java.lang.String versionId,
BoxApiPreview.Extensions ext)
Returns a request that we will use to check file consistency.
|
java.lang.String |
getContentUrl(java.lang.String fileId) |
BoxRequestsPreview.DownloadPreview |
getDownloadPreviewRequest(java.io.OutputStream outputStream,
java.lang.String fileId,
BoxApiPreview.Extensions ext)
Returns a request that retrieves and caches a preview
|
static com.box.androidsdk.content.requests.BoxRequestsFile.GetFileInfo |
getFileInfoRequest(PreviewController previewController,
com.box.androidsdk.content.models.BoxFile fileInfo)
Returns a request that retrieves file information
|
protected java.lang.String |
getFilesUrl() |
protected BoxRequestsPreview.PreviewBatchRequest |
getOfflineRequests(PreviewController previewController,
com.box.androidsdk.content.models.BoxFile boxFile)
Returns a preview batch request that contains a number of individual requests that are required to view the given file offline.
|
BoxRequestsPreview.PollForConversionReady |
getPollForConversionReadyRequest(java.lang.String fileId,
BoxApiPreview.Extensions ext)
Returns a request that will poll the preview endpoint to check if the conversion of a preview is complete.
|
java.lang.String |
getPreviewUrl(java.lang.String fileId,
BoxApiPreview.Extensions ext) |
getAddCommentRequest, getAddTaggedCommentRequest, getAddToCollectionRequest, getCommentsRequest, getCommentUrl, getCopyRequest, getCreateSharedLinkRequest, getDeleteFileVersionUrl, getDeleteFromCollectionRequest, getDeleteRequest, getDeleteTrashedFileRequest, getDeleteVersionRequest, getDisableSharedLinkRequest, getDownloadRequest, getDownloadRequest, getDownloadThumbnailRequest, getDownloadThumbnailRequest, getDownloadUrlRequest, getEmbedLinkRequest, getFileCommentsUrl, getFileCopyUrl, getFileDownloadUrl, getFileInfoUrl, getFileUploadNewVersionUrl, getFileUploadUrl, getFileVersionsUrl, getInfoRequest, getMoveRequest, getPromoteFileVersionUrl, getPromoteVersionRequest, getRenameRequest, getRestoreTrashedFileRequest, getThumbnailFileDownloadUrl, getTrashedFileRequest, getTrashedFileUrl, getUpdateRequest, getUploadNewVersionRequest, getUploadNewVersionRequest, getUploadRequest, getUploadRequest, getVersionsRequestpublic static final java.lang.String METADATA_FILE_INFO_TAG
public static final java.lang.String TAG
public BoxApiPreview(com.box.androidsdk.content.models.BoxSession session)
protected java.lang.String getFilesUrl()
getFilesUrl in class com.box.androidsdk.content.BoxApiFilepublic java.lang.String getPreviewUrl(java.lang.String fileId,
BoxApiPreview.Extensions ext)
public java.lang.String getContentUrl(java.lang.String fileId)
public static com.box.androidsdk.content.requests.BoxRequestsFile.GetFileInfo getFileInfoRequest(PreviewController previewController, com.box.androidsdk.content.models.BoxFile fileInfo)
previewController - Controller to use for requests.fileInfo - The file to get information onpublic BoxRequestsPreview.DownloadPreview getDownloadPreviewRequest(java.io.OutputStream outputStream, java.lang.String fileId, BoxApiPreview.Extensions ext)
outputStream - the output stream to cache the preview tofileId - the file id of the preview to retrieveext - extension of the previewpublic BoxRequestsPreview.GetAudioID3Metadata getAudioID3MetadataRequest(java.lang.String requestUrl, com.box.androidsdk.content.models.BoxSession session, com.box.androidsdk.content.models.BoxFile file, PreviewStorage storage)
requestUrl - The preview url for the mp3 filesession - The session to use to retrieve the information withfile - The file to retrieve metadata forstorage - The storage class to use for caching the informationpublic BoxRequestsPreview.PollForConversionReady getPollForConversionReadyRequest(java.lang.String fileId, BoxApiPreview.Extensions ext)
fileId - Id of the file to checkext - extension to check preview endpoint withpublic BoxRequestsPreview.CheckFileConsistency getCheckFileConsistencyRequest(java.lang.String fileId, java.lang.String versionId, BoxApiPreview.Extensions ext)
fileId - The id of the file to checkversionId - The version of the file to checkext - The extension of the preview to request.protected BoxRequestsPreview.PreviewBatchRequest getOfflineRequests(PreviewController previewController, com.box.androidsdk.content.models.BoxFile boxFile)
boxFile - the file to save for offline.previewController - the preview controller to use for storage and api implementations.