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()
JSFBlobUploader
getChoice
in interface JSFBlobUploader
public void hookSubComponent(javax.faces.component.UIInput parent)
JSFBlobUploader
hookSubComponent
in interface JSFBlobUploader
public void encodeBeginUpload(javax.faces.component.UIInput parent, javax.faces.context.FacesContext context, String onClick) throws IOException
JSFBlobUploader
encodeBeginUpload
in interface JSFBlobUploader
IOException
public void validateUpload(javax.faces.component.UIInput parent, javax.faces.context.FacesContext context, InputFileInfo submitted)
JSFBlobUploader
validateUpload
in interface JSFBlobUploader
submitted
- the value into which the input is storedpublic boolean isEnabled()
isEnabled
in interface JSFBlobUploader
protected 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.