include/externalAPI/Google/ExtAPIGoogle.php

Show: inherited
Table of Contents

\ExtAPIGoogle

Package: SugarCRM

ExtAPIGoogle

This class manages the communication to the Google document web services. Currently the Zend_Gdata_Docs class is used in PHP (see http://framework.zend.com/manual/en/zend.gdata.docs.html). The Zend_Gdata_Docs class currently used in this class adheres to the Google Documents List API 1.0 specification (see http://code.google.com/apis/documents/docs/1.0/developers_guide_protocol.html).

There are some known limitations with the documents that may be searched. In particular, we have observed that certain file types that are uploaded to Google Docs do not appear when queried (.png, .tpl, etc.). On the other hand, files that are created within Google Docs will be displayed. So for example, if you were to create a new drawing and insert a PNG file into the drawing, the drawing will appear in the result list and be able to be uploaded to SugarCRM.

Parent(s)
\ExternalAPIBase < \ExternalAPIPlugin

Constants

Constant  APP_STRING_ERROR_PREFIX = 'ERR_GOOGLE_API_'

Properties

Propertyprotected  $_appStringErrorPrefix= 'self::APP_STRING_ERROR_PREFIX'
Default valueself::APP_STRING_ERROR_PREFIXDetails
Type
n/a
Inherited_from
\ExternalAPIBase::$$_appStringErrorPrefix  
Propertypublic  $account_name= ''
inheritedInherited from: \ExternalAPIBase::$$account_name
Details
Type
n/a
Inherited_from
\ExternalAPIBase::$$account_name  
Propertypublic  $account_password= ''
inheritedInherited from: \ExternalAPIBase::$$account_password
Details
Type
n/a
Inherited_from
\ExternalAPIBase::$$account_password  
Propertyprotected\EAPM  $authData= ''
inherited

Authorization data

Inherited from: \ExternalAPIBase::$$authData
Details
Type
\EAPM
Inherited_from
\ExternalAPIBase::$$authData  
Propertypublic  $authMethod= ''password''
Default value'password'Details
Type
n/a
Propertypublic  $connector= '"ext_eapm_google"'
Default value"ext_eapm_google"Details
Type
n/a
Propertypublic  $docSearch= 'true'
Default valuetrueDetails
Type
n/a
Propertypublic  $needsUrl= 'false'
Default valuefalseDetails
Type
n/a
Propertyprotected  $oauthAccess= '"https://www.google.com/accounts/OAuthGetAccessToken"'
Default value"https://www.google.com/accounts/OAuthGetAccessToken"Details
Type
n/a
Propertyprotected  $oauthAuth= '"https://www.google.com/accounts/OAuthAuthorizeToken"'
Default value"https://www.google.com/accounts/OAuthAuthorizeToken"Details
Type
n/a
Propertyprotected  $oauthReq= '"https://www.google.com/accounts/OAuthGetRequestToken"'
Default value"https://www.google.com/accounts/OAuthGetRequestToken"Details
Type
n/a
Propertypublic  $requireAuth= 'true'
inheritedInherited from: \ExternalAPIBase::$$requireAuth
Default valuetrueDetails
Type
n/a
Inherited_from
\ExternalAPIBase::$$requireAuth  
Propertypublic  $restrictUploadsByExtension= 'true'
Default valuetrueDetails
Type
n/a
Propertyprotected  $scope= '"https://docs.google.com/feeds/ http://docs.google.com/feeds/"'
Default value"https://docs.google.com/feeds/ http://docs.google.com/feeds/"Details
Type
n/a
Propertypublic  $sharingOptions= 'null'
Default valuenullDetails
Type
n/a
Propertypublic  $supportedModules= 'array('Documents', 'Notes','Import')'
Default valuearray('Documents', 'Notes','Import')Details
Type
n/a
Propertypublic  $useAuth= 'true'
inheritedInherited from: \ExternalAPIBase::$$useAuth
Default valuetrueDetails
Type
n/a
Inherited_from
\ExternalAPIBase::$$useAuth  

Methods

methodpublic__construct( ) : void

methodpubliccheckLogin( \EAPM $eapmBean = null ) : void

Check login

Parameters
Name Type Description
$eapmBean \EAPM
methodpublicdeleteDoc(  $documentId ) : void

Parameters
Name Type Description
$documentId
methodpublicdownloadDoc(  $documentId,  $documentFormat ) : void

Parameters
Name Type Description
$documentId
$documentFormat
methodprotectedformatCallbackURL( \$callback_url $callback_url ) : String
inherited

formatCallbackURL

Inherited from: \ExternalAPIBase::formatCallbackURL()

This function takes a callback_url and checks the $_REQUEST variable to see if additional parameters should be appended to the callback_url value. The $_REQUEST variables that are being checked deal with handling the behavior of closing/hiding windows/tabs that are displayed when prompting for OAUTH validation

Parameters
Name Type Description
$callback_url \$callback_url

String value of callback URL

Returns
Type Description
String value of URL with applicable formatting
methodprivategetAcceptibleFileExtensions( ) : void

methodpublicgetClient( String $gdType = "docs" ) :

Retrieve the gdata client.

Parameters
Name Type Description
$gdType String

The Gdata type

methodpublicgetConnector( ) : \source | null
inherited

Get connector for this API

Inherited from: \ExternalAPIBase::getConnector()
Returns
Type Description
\source | null
methodpublicgetConnectorParam( string $name ) : mixed
inherited

Get parameter from source

Inherited from: \ExternalAPIBase::getConnectorParam()
Parameters
Name Type Description
$name string
Returns
Type Description
mixed
methodprotectedgetErrorStringFromCode( \unknown_type $error_numb ) : void
inherited

Allow API clients to provide translated language strings for a given error code

Inherited from: \ExternalAPIBase::getErrorStringFromCode()
Parameters
Name Type Description
$error_numb \unknown_type
methodprotectedgetIdFromUrl(  $url ) : void

Parameters
Name Type Description
$url
methodprivategetServiceAuthName(  $type ) : void

Parameters
Name Type Description
$type
methodprotectedgetValue(  $value ) : void
inherited

Inherited from: \ExternalAPIBase::getValue()
Parameters
Name Type Description
$value
methodpublicisMimeDetectionAvailable( ) : bool
inherited

Determine if mime detection extensions are available.

Inherited from: \ExternalAPIBase::isMimeDetectionAvailable()
Returns
Type Description
bool
methodpublicloadEAPM( \EAPM $eapmBean ) : void
inherited

Load authorization data

Inherited from: \ExternalAPIBase::loadEAPM()
Parameters
Name Type Description
$eapmBean \EAPM
Details
See
\ExternalAPIPlugin::loadEAPM()  
methodpubliclogOff( ) : void
inherited

Inherited from: \ExternalAPIBase::logOff()
methodprotectedpostData(  $url,  $postfields,  $headers ) : void
inherited

Inherited from: \ExternalAPIBase::postData()
Parameters
Name Type Description
$url
$postfields
$headers
methodpublicquickCheckLogin( ) : void
inherited

Inherited from: \ExternalAPIBase::quickCheckLogin()
methodpublicsearchDoc(  $keywords,  $flushDocCache = false ) : void

Parameters
Name Type Description
$keywords
$flushDocCache
methodprotectedsetGDataClient( String $type ) : void

Set the Gdata container based upon the type.

Parameters
Name Type Description
$type String
methodpublicshareDoc(  $documentId,  $emails ) : void

Parameters
Name Type Description
$documentId
$emails
methodpublicsupports(  $method = '' ) : void
inherited

Does API support this method?

Inherited from: \ExternalAPIBase::supports()
Parameters
Name Type Description
$method
Details
See
\ExternalAPIPlugin::supports()  
methodpublicuploadDoc(  $bean,  $fileToUpload,  $docName,  $mimeType ) : void

Parameters
Name Type Description
$bean
$fileToUpload
$docName
$mimeType
Documentation was generated by DocBlox 0.18.1.