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:
AutoCloseable
,IModel
,ISearchableModel
- Direct Known Subclasses:
SecureGSModel
public class GSModel extends SpreadsheetModel
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.eclipse.epsilon.eol.models.IModel
IModel.AmbiguityCheckResult
-
-
Field Summary
Fields Modifier and Type Field Description static String
CONFIGURATION_FILE
static String
GOOGLE_PASSWORD
static String
GOOGLE_USERNAME
static 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 spreadsheetCollection<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(URL cellFeedUrl)
com.google.gdata.data.spreadsheet.ListFeed
getWorksheetListFeed(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(String[] args)
void
setConfigurationFile(String configurationFilePath)
void
setPassword(String password)
void
setSpreadsheetName(String name)
void
setUsername(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
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.epsilon.eol.models.IModel
checkAmbiguity, close
-
-
-
-
Field Detail
-
SPREADSHEET_NAME
public static final String SPREADSHEET_NAME
- See Also:
- Constant Field Values
-
GOOGLE_USERNAME
public static final String GOOGLE_USERNAME
- See Also:
- Constant Field Values
-
GOOGLE_PASSWORD
public static final String GOOGLE_PASSWORD
- See Also:
- Constant Field Values
-
CONFIGURATION_FILE
public static final String CONFIGURATION_FILE
- See Also:
- Constant Field Values
-
-
Method Detail
-
setSpreadsheetName
public void setSpreadsheetName(String name)
-
setUsername
public void setUsername(String username)
-
setPassword
public void setPassword(String password)
-
setConfigurationFile
public void setConfigurationFile(String configurationFilePath) throws ParserConfigurationException, SAXException, IOException
-
getWorksheetListFeed
public com.google.gdata.data.spreadsheet.ListFeed getWorksheetListFeed(URL listFeedUrl) throws IOException, com.google.gdata.util.ServiceException
- Throws:
IOException
com.google.gdata.util.ServiceException
-
getWorksheetCellFeed
public com.google.gdata.data.spreadsheet.CellFeed getWorksheetCellFeed(URL cellFeedUrl) throws IOException, com.google.gdata.util.ServiceException
- Throws:
IOException
com.google.gdata.util.ServiceException
-
insertWorksheet
public com.google.gdata.data.spreadsheet.WorksheetEntry insertWorksheet(com.google.gdata.data.spreadsheet.WorksheetEntry worksheetEntry) throws IOException, com.google.gdata.util.ServiceException
- Throws:
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 IOException, com.google.gdata.util.ServiceException
- Throws:
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 Exception
Description copied from class:SpreadsheetModel
The purpose of this method is to load the spreadsheet.- Specified by:
loadSpreadsheet
in classSpreadsheetModel
- Throws:
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 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:
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 Collection<SpreadsheetRow> find(Variable iterator, ModuleElement ast, IEolContext context) throws EolRuntimeException
- Specified by:
find
in interfaceISearchableModel
- Specified by:
find
in classSpreadsheetModel
- Throws:
EolRuntimeException
-
-