public class BoxBlobProvider extends AbstractLiveConnectBlobProvider<BoxOAuth2ServiceProvider>
blobProviderId, properties
MAX_RESULT
Constructor and Description |
---|
BoxBlobProvider() |
Modifier and Type | Method and Description |
---|---|
ManagedBlob |
freezeVersion(ManagedBlob blob,
Document doc)
Returns a new managed blob pointing to a fixed version of the original blob.
|
protected com.box.sdk.BoxAPIConnection |
getBoxClient(com.google.api.client.auth.oauth2.Credential credential) |
protected com.box.sdk.BoxAPIConnection |
getBoxClient(NuxeoOAuth2Token token) |
protected String |
getCacheName() |
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 com.box.sdk.BoxFile.Info |
retrieveBoxFileInfo(LiveConnectFileInfo fileInfo) |
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, processDocumentsUpdate, putFileInCache, putInCache, readBlob, toBlob, toBlob, toFileInfo, writeBlob
initialize, supportsUserUpdate, supportsUserUpdateDefaultFalse, supportsUserUpdateDefaultTrue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAppLinks, getAvailableConversions, getBinaryManager, getConvertedStream, initialize, supportsUserUpdate
public BoxBlobProvider()
protected String getCacheName()
getCacheName
in class AbstractLiveConnectBlobProvider<BoxOAuth2ServiceProvider>
public String getPageProviderNameForUpdate()
getPageProviderNameForUpdate
in class AbstractLiveConnectBlobProvider<BoxOAuth2ServiceProvider>
public URI getURI(ManagedBlob blob, BlobManager.UsageHint usage, javax.servlet.http.HttpServletRequest servletRequest) throws IOException
BlobProvider
URI
for the content of a managed blob.blob
- the managed blobusage
- BlobManager.UsageHint
servletRequest
- the servlet request, or null
URI
, or null
if none availableIOException
public InputStream getStream(ManagedBlob blob) throws IOException
BlobProvider
InputStream
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 blobIOException
public InputStream getThumbnail(ManagedBlob blob) throws IOException
BlobProvider
InputStream
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 blobIOException
public ManagedBlob freezeVersion(ManagedBlob blob, Document doc) throws IOException
BlobProvider
blob
- the original managed blobdoc
- the document that holds the blobnull
if no change is neededIOException
protected com.box.sdk.BoxAPIConnection getBoxClient(NuxeoOAuth2Token token) throws IOException
IOException
protected com.box.sdk.BoxAPIConnection getBoxClient(com.google.api.client.auth.oauth2.Credential credential) throws IOException
IOException
protected LiveConnectFile retrieveFile(LiveConnectFileInfo fileInfo) throws IOException
AbstractLiveConnectBlobProvider
retrieveFile
in class AbstractLiveConnectBlobProvider<BoxOAuth2ServiceProvider>
fileInfo
- the file infoIOException
protected com.box.sdk.BoxFile.Info retrieveBoxFileInfo(LiveConnectFileInfo fileInfo) throws IOException
IOException
Copyright © 2016 Nuxeo SA. All rights reserved.