GDoc
Description
In BBj 11.0 and higher, the GDoc class is one of the BBj CustomObjects that comprises the GApps utility. This class can used in a BBj application to access and manipulate a Google Document.
Creation
The GApps class is found in <bbj install>/utils/gapps/gapps.bbj.
To create a GDoc use one of the below GDocService methods:
GDocService::getDocument(string resourceID)
GDocService::getDocument(string title, string type, string folder, int createIfNeeded)
GDocService::getDocument(string title, string type, string mimeType, string folder, int createIfNeeded)
GDocService::uploadDocument(string fileName, string title, string type, string folder, boolean convert)
GDocService::uploadDocument(string fileName, string title, string type, string folder, boolean convert, boolean overwrite)
Parameters
None.
Methods of GDoc
|
Return Value |
Method |
|
void |
download(string fileName) |
|
string |
getHref() |
|
string |
|
|
string |
|
|
int |
getRole(string id) |
|
int |
getScope(string id) |
|
string |
getTitle() |
|
string |
getType() |
|
void |
|
|
boolean |
remove() |
|
void |
setPermissions(string id, int scope, int role) |
Remarks
None.
Constants
|
Name |
Value |
|
DOWNLOAD_ERROR |
308 |
|
PERMISSIONS_ERROR |
309 |
|
NO_ROLE |
0 |
|
OWNER_ROLE |
1 |
|
PEEKER_ROLE |
2 |
|
READER_ROLE |
3 |
|
WRITER_ROLE |
4 |
|
DEFAULT_SCOPE |
0 |
|
DOMAIN_SCOPE |
1 |
|
GROUP_SCOPE |
2 |
|
USER_SCOPE |
3 |
|
DOCUMENT_TYPE |
document |
|
SPREADSHEET_TYPE |
spreadsheet |
|
PRESENTATION_TYPE |
presentation |
|
DRAWING_TYPE |
drawing |
|
PDF_TYPE |
|
|
FORM_TYPE |
form |
|
FILE_TYPE |
file |
|
FOLDER_TYPE |
folder |
Example
|