public class DropboxBlobProvider extends AbstractLiveConnectBlobProvider<DropboxOAuth2ServiceProvider>
blobProviderId, propertiesMAX_RESULT| Constructor and Description | 
|---|
DropboxBlobProvider()  | 
| Modifier and Type | Method and Description | 
|---|---|
protected InputStream | 
doGet(URI url)
Executes a GET request 
 | 
ManagedBlob | 
freezeVersion(ManagedBlob blob,
             Document doc)
Returns a new managed blob pointing to a fixed version of the original blob. 
 | 
Map<String,URI> | 
getAvailableConversions(ManagedBlob blob,
                       BlobManager.UsageHint hint)
Gets a map of available MIME type conversions and corresponding  
URI for a managed blob. | 
protected String | 
getCacheName()  | 
protected String | 
getClientId()  | 
InputStream | 
getConvertedStream(ManagedBlob blob,
                  String mimeType,
                  DocumentModel doc)
Gets an  
InputStream for a conversion to the given MIME type. | 
protected com.dropbox.core.v2.DbxClientV2 | 
getDropboxClient(com.google.api.client.auth.oauth2.Credential credential)  | 
protected com.dropbox.core.v2.DbxClientV2 | 
getDropboxClient(String accessToken)  | 
String | 
getPageProviderNameForUpdate()  | 
InputStream | 
getStream(ManagedBlob blob)
Gets an  
InputStream for the data of a managed blob. | 
InputStream | 
getThumbnail(ManagedBlob blob)
Gets an  
InputStream for a thumbnail of a managed blob. | 
URI | 
getURI(ManagedBlob blob,
      BlobManager.UsageHint usage,
      javax.servlet.http.HttpServletRequest servletRequest)
Gets an  
URI for the content of a managed blob. | 
protected LiveConnectFile | 
retrieveFile(LiveConnectFileInfo fileInfo)
Retrieves the file with API. 
 | 
asURI, buildBlobKey, checkChangesAndUpdateBlob, close, getCredential, getCredential, getCredential, getCredentialFactory, getFile, getFileFromCache, getFromCache, getOAuth2Provider, hasChanged, invalidateInCache, isVersion, performsExternalAccessControl, processDocumentsUpdate, putFileInCache, putInCache, readBlob, toBlob, toBlob, toFileInfo, toFileInfo, writeBlobgetProperties, hasCreateFromKeyPermission, initialize, isTransient, supportsUserUpdate, supportsUserUpdateDefaultFalse, supportsUserUpdateDefaultTrueclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitcanConvert, getAppLinks, getBinaryManager, getProperties, hasCreateFromKeyPermission, initialize, isTransient, supportsUserUpdatepublic DropboxBlobProvider()
protected String getCacheName()
getCacheName in class AbstractLiveConnectBlobProvider<DropboxOAuth2ServiceProvider>public String getPageProviderNameForUpdate()
getPageProviderNameForUpdate in class AbstractLiveConnectBlobProvider<DropboxOAuth2ServiceProvider>public URI getURI(ManagedBlob blob, BlobManager.UsageHint usage, javax.servlet.http.HttpServletRequest servletRequest) throws IOException
BlobProviderURI for the content of a managed blob.blob - the managed blobusage - BlobManager.UsageHintservletRequest - the servlet request, or nullURI, or null if none availableIOExceptionpublic Map<String,URI> getAvailableConversions(ManagedBlob blob, BlobManager.UsageHint hint) throws IOException
BlobProviderURI for a managed blob.blob - the managed blobhint - BlobManager.UsageHintURI, which may be emptyIOExceptionpublic InputStream getThumbnail(ManagedBlob blob) throws IOException
BlobProviderInputStream for a thumbnail of a managed blob.
 
 Like all InputStream, the result must be closed when done with it to avoid resource leaks.
blob - the managed blobIOExceptionpublic InputStream getStream(ManagedBlob blob) throws IOException
BlobProviderInputStream for the data of a managed blob.
 
 Like all InputStream, the result must be closed when done with it to avoid resource leaks.
blob - the managed blobIOExceptionpublic InputStream getConvertedStream(ManagedBlob blob, String mimeType, DocumentModel doc) throws IOException
DocumentBlobProviderInputStream for a conversion to the given MIME type.
 
 Like all InputStream, the result must be closed when done with it to avoid resource leaks.
blob - the managed blobmimeType - the MIME type to convert todoc - the document that holds the blobnull if no conversion is available for the given MIME typeIOExceptionpublic ManagedBlob freezeVersion(ManagedBlob blob, Document doc) throws IOException
DocumentBlobProviderblob - the original managed blobdoc - the document that holds the blobnull if no change is neededIOExceptionprotected com.dropbox.core.v2.DbxClientV2 getDropboxClient(com.google.api.client.auth.oauth2.Credential credential) throws IOException
IOExceptionprotected com.dropbox.core.v2.DbxClientV2 getDropboxClient(String accessToken) throws IOException
IOExceptionprotected InputStream doGet(URI url) throws IOException
IOExceptionprotected String getClientId()
protected LiveConnectFile retrieveFile(LiveConnectFileInfo fileInfo) throws IOException
AbstractLiveConnectBlobProviderretrieveFile in class AbstractLiveConnectBlobProvider<DropboxOAuth2ServiceProvider>fileInfo - the file infoIOExceptionCopyright © 2019 Nuxeo. All rights reserved.