|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.pras.SpreadSheetFactory
public class SpreadSheetFactory
It is a SpreadSheet Generator Class. It accepts Gmail User ID and PassWord
to generate Authentication Token.
It uses 2 Google APIs-
SpreadSheet Create/Delete - Google Document API
WorkSheet Create/Delete, Record Add - Google SpreadSheet API
Field Summary | |
---|---|
static java.lang.String |
authToken
|
Method Summary | |
---|---|
void |
addSharePermission(SpreadSheet sp,
Collaborator[] collaborators)
Share a SpreadSheet with a given list of Collaborators. |
void |
changeSharePermission(Collaborator c,
java.lang.String role)
Change Share permission for a particular ACL entry |
void |
createSpreadSheet(java.lang.String spName)
Create SpreadSheet with the given name |
void |
deleteSpreadSheet(java.lang.String resID)
Delete a SpreadSheet |
void |
flushMe()
Deallocate SpreadSheetFactory instance |
java.util.ArrayList<Collaborator> |
getAllCollaborators(SpreadSheet sp)
Get list of all Collaborators to whom this SpreadSheet is shared |
java.util.ArrayList<SpreadSheet> |
getAllSpreadSheets()
Get All stored SpreadSheets from Server |
java.util.ArrayList<SpreadSheet> |
getAllSpreadSheets(boolean doRefresh)
Get All stored SpreadSheets either from Server or Local Cache |
java.util.ArrayList<SpreadSheet> |
getAllSpreadSheets(boolean doRefresh,
java.lang.String title,
boolean isTitleExact)
Get All stored SpreadSheets either from Server or Local Cache |
static SpreadSheetFactory |
getInstance()
This will return an existing SpreadSheetFactory instance or null Note: Make sure you have previously called getInstance(String userName, String password) |
static SpreadSheetFactory |
getInstance(Authenticator authenticator)
This will create SpreadSheetFactory Instance using your custom Authenticatior. |
static SpreadSheetFactory |
getInstance(java.lang.String email,
java.lang.String password)
This will create SpreadSheetFactory Instance with valid User ID (e.g. |
java.util.ArrayList<SpreadSheet> |
getSpreadSheet(java.lang.String title,
boolean isTitleExact)
Get list of SpreadSheet with matching title. |
void |
removeSharePermission(Collaborator c)
Remove Share access of a selected user. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static java.lang.String authToken
Method Detail |
---|
public static SpreadSheetFactory getInstance()
public static SpreadSheetFactory getInstance(java.lang.String email, java.lang.String password)
userName
- Gmail account id e.g. abc@gmail.compassword
- Gmail account password
public static SpreadSheetFactory getInstance(Authenticator authenticator)
authenticator
- Your Custom Authenticator.
public void flushMe()
public void createSpreadSheet(java.lang.String spName)
spName
- SpreadSheet namepublic void deleteSpreadSheet(java.lang.String resID)
resID
- Resource ID of the SpreadSheet you want to Deletepublic java.util.ArrayList<SpreadSheet> getSpreadSheet(java.lang.String title, boolean isTitleExact)
title
- SpreadSheet titleisTitleExact
- Whether title string should be an exact match
public java.util.ArrayList<SpreadSheet> getAllSpreadSheets()
public java.util.ArrayList<SpreadSheet> getAllSpreadSheets(boolean doRefresh)
doRefresh
- Do you want to Synch with Server ?
public java.util.ArrayList<SpreadSheet> getAllSpreadSheets(boolean doRefresh, java.lang.String title, boolean isTitleExact)
doRefresh
- title
- SpreadSheet title. null means all SpreadSheets. No need to do URL encode.isTitleExact
- Whether title string should be an exact match
public void addSharePermission(SpreadSheet sp, Collaborator[] collaborators)
sp
- The SpreadSheet you want to sharecollaborators
- List of Collaborators with whim you want to share this.public java.util.ArrayList<Collaborator> getAllCollaborators(SpreadSheet sp)
sp
- SpreadSheet
public void changeSharePermission(Collaborator c, java.lang.String role)
c
- Collaborator instance stored in SpreadSheet. It should have a valid EditLink URLrole
- {owner, writer, reader}public void removeSharePermission(Collaborator c)
c
- Collaborator Instance. It should have the Edit Link.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |