public class GoogleDriveBlobUploader extends Object implements JSFBlobUploader
| Modifier and Type | Field and Description |
|---|---|
static String |
GOOGLE_DOMAIN_PROP |
protected String |
id |
static String |
UPLOAD_GOOGLE_DRIVE_FACET_NAME |
| Constructor and Description |
|---|
GoogleDriveBlobUploader(String id) |
| Modifier and Type | Method and Description |
|---|---|
void |
encodeBeginUpload(javax.faces.component.UIInput parent,
javax.faces.context.FacesContext context,
String onClick)
Generates the HTML for an upload choice.
|
protected String |
getAccessToken(String user) |
String |
getChoice()
Gets the choice key associated to this uploader.
|
protected String |
getClientId() |
protected String |
getGoogleDomain() |
protected GoogleDriveBlobProvider |
getGoogleDriveBlobProvider() |
void |
hookSubComponent(javax.faces.component.UIInput parent)
Constructs the needed subcomponent.
|
boolean |
isEnabled()
Google Drive upload button is added to the file widget if and only if Google Drive OAuth service provider is
enabled
|
protected Blob |
toBlob(LiveConnectFileInfo fileInfo)
Creates a Google Drive managed blob.
|
void |
validateUpload(javax.faces.component.UIInput parent,
javax.faces.context.FacesContext context,
InputFileInfo submitted)
Transforms input into a blob.
|
public static final String UPLOAD_GOOGLE_DRIVE_FACET_NAME
public static final String GOOGLE_DOMAIN_PROP
public GoogleDriveBlobUploader(String id)
public String getChoice()
JSFBlobUploadergetChoice in interface JSFBlobUploaderpublic void hookSubComponent(javax.faces.component.UIInput parent)
JSFBlobUploaderhookSubComponent in interface JSFBlobUploaderpublic void encodeBeginUpload(javax.faces.component.UIInput parent, javax.faces.context.FacesContext context, String onClick) throws IOException
JSFBlobUploaderencodeBeginUpload in interface JSFBlobUploaderIOExceptionpublic void validateUpload(javax.faces.component.UIInput parent, javax.faces.context.FacesContext context, InputFileInfo submitted)
JSFBlobUploadervalidateUpload in interface JSFBlobUploadersubmitted - the value into which the input is storedpublic boolean isEnabled()
isEnabled in interface JSFBlobUploaderprotected Blob toBlob(LiveConnectFileInfo fileInfo)
fileInfo - the Google Drive file infoprotected GoogleDriveBlobProvider getGoogleDriveBlobProvider()
protected String getGoogleDomain()
protected String getClientId()
protected String getAccessToken(String user)
Copyright © 2018 Nuxeo. All rights reserved.