Class GSModel
- java.lang.Object
-
- org.eclipse.epsilon.eol.models.Model
-
- org.eclipse.epsilon.emc.spreadsheets.SpreadsheetModel
-
- org.eclipse.epsilon.emc.spreadsheets.google.GSModel
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,IModel
,ISearchableModel
- Direct Known Subclasses:
SecureGSModel
public class GSModel extends SpreadsheetModel
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
CONFIGURATION_FILE
static java.lang.String
GOOGLE_PASSWORD
static java.lang.String
GOOGLE_USERNAME
static java.lang.String
SPREADSHEET_NAME
-
Fields inherited from class org.eclipse.epsilon.emc.spreadsheets.SpreadsheetModel
isLoaded, references, worksheets
-
Fields inherited from class org.eclipse.epsilon.eol.models.Model
aliases, ENV_PREFIX, name, PROPERTY_ALIASES, PROPERTY_NAME, PROPERTY_READONLOAD, PROPERTY_READONLY, PROPERTY_STOREONDISPOSAL, propertyGetter, propertySetter, readOnLoad, storeOnDisposal
-
-
Constructor Summary
Constructors Constructor Description GSModel()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SpreadsheetWorksheet
createWorksheet(ISpreadsheetMetadata.SpreadsheetWorksheetMetadata metadata)
The purpose of this method is to create a worksheet.void
deleteWorksheet(SpreadsheetWorksheet worksheet)
The purpose of this method is to delete the given worksheet from this spreadsheetjava.util.Collection<SpreadsheetRow>
find(Variable iterator, ModuleElement ast, IEolContext context)
protected ISpreadsheetMetadata
getSpreadsheetMetadata()
The purpose of this method is to return an instance of the ISpreadsheetMetadata implementation for retrieving metadata for this spreadsheet modelcom.google.gdata.data.spreadsheet.CellFeed
getWorksheetCellFeed(java.net.URL cellFeedUrl)
com.google.gdata.data.spreadsheet.ListFeed
getWorksheetListFeed(java.net.URL listFeedUrl)
com.google.gdata.data.spreadsheet.ListEntry
insertRow(com.google.gdata.data.spreadsheet.WorksheetEntry worksheetEntry, com.google.gdata.data.spreadsheet.ListEntry row)
com.google.gdata.data.spreadsheet.WorksheetEntry
insertWorksheet(com.google.gdata.data.spreadsheet.WorksheetEntry worksheetEntry)
protected boolean
isMetadataConfigurationDefined()
void
load(StringProperties properties, IRelativePathResolver resolver)
This method loads the model using arguments provided through Epsilon Development Tools.protected void
loadSpreadsheet()
The purpose of this method is to load the spreadsheet.static void
main(java.lang.String[] args)
void
setConfigurationFile(java.lang.String configurationFilePath)
void
setPassword(java.lang.String password)
void
setSpreadsheetName(java.lang.String name)
void
setUsername(java.lang.String username)
-
Methods inherited from class org.eclipse.epsilon.emc.spreadsheets.SpreadsheetModel
addReference, addWorksheet, allContents, createInstance, createInstance, createInstance, deleteElement, dispose, findOne, getAllOfKind, getAllOfType, getElementById, getElementId, getEnumerationValue, getPropertySetter, getReferences, getReferencesBySource, getReferencesBySource, getReferencesByTarget, getReferencesByTarget, getTypeNameOf, getTypeOf, getWorksheetByType, getWorksheets, hasType, isInstantiable, isLoaded, load, loadColumnsFromMetadata, loadConfigurationFile, loadReferenceFromConfigurationFile, loadWorksheetFromConfigurationFile, owns, setElementId, store, store
-
Methods inherited from class org.eclipse.epsilon.eol.models.Model
allInstances, getAliases, getFullyQualifiedTypeNameOf, getMetamodel, getName, getPropertyGetter, getTransactionSupport, isModelElement, isOfKind, isOfType, isPropertySet, isReadOnLoad, isStoredOnDisposal, knowsAboutProperty, load, load, setName, setReadOnLoad, setStoredOnDisposal
-
-
-
-
Field Detail
-
SPREADSHEET_NAME
public static final java.lang.String SPREADSHEET_NAME
- See Also:
- Constant Field Values
-
GOOGLE_USERNAME
public static final java.lang.String GOOGLE_USERNAME
- See Also:
- Constant Field Values
-
GOOGLE_PASSWORD
public static final java.lang.String GOOGLE_PASSWORD
- See Also:
- Constant Field Values
-
CONFIGURATION_FILE
public static final java.lang.String CONFIGURATION_FILE
- See Also:
- Constant Field Values
-
-
Method Detail
-
main
public static void main(java.lang.String[] args) throws java.lang.Exception
- Throws:
java.lang.Exception
-
setSpreadsheetName
public void setSpreadsheetName(java.lang.String name)
-
setUsername
public void setUsername(java.lang.String username)
-
setPassword
public void setPassword(java.lang.String password)
-
setConfigurationFile
public void setConfigurationFile(java.lang.String configurationFilePath) throws javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXException, java.io.IOException
- Throws:
javax.xml.parsers.ParserConfigurationException
org.xml.sax.SAXException
java.io.IOException
-
getWorksheetListFeed
public com.google.gdata.data.spreadsheet.ListFeed getWorksheetListFeed(java.net.URL listFeedUrl) throws java.io.IOException, com.google.gdata.util.ServiceException
- Throws:
java.io.IOException
com.google.gdata.util.ServiceException
-
getWorksheetCellFeed
public com.google.gdata.data.spreadsheet.CellFeed getWorksheetCellFeed(java.net.URL cellFeedUrl) throws java.io.IOException, com.google.gdata.util.ServiceException
- Throws:
java.io.IOException
com.google.gdata.util.ServiceException
-
insertWorksheet
public com.google.gdata.data.spreadsheet.WorksheetEntry insertWorksheet(com.google.gdata.data.spreadsheet.WorksheetEntry worksheetEntry) throws java.io.IOException, com.google.gdata.util.ServiceException
- Throws:
java.io.IOException
com.google.gdata.util.ServiceException
-
insertRow
public com.google.gdata.data.spreadsheet.ListEntry insertRow(com.google.gdata.data.spreadsheet.WorksheetEntry worksheetEntry, com.google.gdata.data.spreadsheet.ListEntry row) throws java.io.IOException, com.google.gdata.util.ServiceException
- Throws:
java.io.IOException
com.google.gdata.util.ServiceException
-
load
public void load(StringProperties properties, IRelativePathResolver resolver) throws EolModelLoadingException
This method loads the model using arguments provided through Epsilon Development Tools.- Specified by:
load
in interfaceIModel
- Overrides:
load
in classModel
- Throws:
EolModelLoadingException
-
loadSpreadsheet
protected void loadSpreadsheet() throws java.lang.Exception
Description copied from class:SpreadsheetModel
The purpose of this method is to load the spreadsheet.- Specified by:
loadSpreadsheet
in classSpreadsheetModel
- Throws:
java.lang.Exception
-
getSpreadsheetMetadata
protected ISpreadsheetMetadata getSpreadsheetMetadata()
Description copied from class:SpreadsheetModel
The purpose of this method is to return an instance of the ISpreadsheetMetadata implementation for retrieving metadata for this spreadsheet model- Specified by:
getSpreadsheetMetadata
in classSpreadsheetModel
-
isMetadataConfigurationDefined
protected boolean isMetadataConfigurationDefined()
- Specified by:
isMetadataConfigurationDefined
in classSpreadsheetModel
- Returns:
- true if metadata has been provided, false otherwise
-
createWorksheet
protected SpreadsheetWorksheet createWorksheet(ISpreadsheetMetadata.SpreadsheetWorksheetMetadata metadata) throws java.lang.Exception
Description copied from class:SpreadsheetModel
The purpose of this method is to create a worksheet.- Specified by:
createWorksheet
in classSpreadsheetModel
- Returns:
- newly created worksheet
- Throws:
java.lang.Exception
-
deleteWorksheet
public void deleteWorksheet(SpreadsheetWorksheet worksheet)
Description copied from class:SpreadsheetModel
The purpose of this method is to delete the given worksheet from this spreadsheet- Specified by:
deleteWorksheet
in classSpreadsheetModel
-
find
public java.util.Collection<SpreadsheetRow> find(Variable iterator, ModuleElement ast, IEolContext context) throws EolRuntimeException
- Specified by:
find
in interfaceISearchableModel
- Specified by:
find
in classSpreadsheetModel
- Throws:
EolRuntimeException
-
-