com.reportmill.datasource
Class RMGAEDataSource
java.lang.Object
com.reportmill.base.RMObject
com.reportmill.datasource.RMDataSource
com.reportmill.datasource.RMFileDataSource
com.reportmill.datasource.RMGAEDataSource
- All Implemented Interfaces:
- com.reportmill.base.RMPropertyChanger, java.beans.PropertyChangeListener, java.lang.Cloneable, java.util.EventListener
public class RMGAEDataSource
- extends RMFileDataSource
A data source for Google App Engine.
This data source does the following things:
- is really a file data source with files in ~/Application Support/DataBox/GAE/
|
Constructor Summary |
RMGAEDataSource()
Creates a new Google App Engine data source. |
RMGAEDataSource(java.lang.String aName)
Creates a new Google App Engine data source. |
|
Method Summary |
void |
create()
Creates the new google app engine site (really just registers for cloud2db). |
RMEntity |
createEntity(RMEntity anEntity)
Override to forward to database data source. |
void |
delete()
Deletes app engine site. |
void |
deleteEntity(RMEntity anEntity)
Override to forward to database data source. |
void |
deleteFileImpl(RMFile aFile)
Deletes file. |
void |
deleteRowImpl(RMRow aRow)
Deletes a given row. |
RMFileDataSource |
fromXML(com.reportmill.archiver.RXArchiver anArchiver,
com.reportmill.archiver.RXElement anElement,
java.lang.Object anOwner)
XML unarchival. |
java.io.File |
getAppDirectory()
Returns a file for this GAE data source app directory. |
java.io.File |
getAppFilesDirectory()
Returns a file for this GAE data source app directory. |
com.reportmill.database.DBDataSource |
getDBDataSource()
Returns a DBDataSource configured with Cloud2DB. |
java.lang.String |
getEmail()
Returns the application email address. |
RMFile |
getFile(java.lang.String aPath,
boolean doCreate,
boolean isDirectory)
Override to load file via HTTP. |
java.util.List<RMFile> |
getFilesImpl(java.lang.String aPath)
Returns files at path. |
java.lang.String |
getHTTPRoot()
Returns the HTTP root, if in HTTP mode. |
java.lang.String |
getPassword()
Returns the password. |
java.lang.String |
getPath()
Override path to be GAE directory plus app name. |
java.util.List<RMRow> |
getRowsImpl(java.util.List<? extends RMProperty> theProperties,
RMCondition aCondition,
java.lang.Class<? extends RMRow> aClass)
Returns a set of rows for the given properties and condition. |
RMSchema |
getSchema()
Get schema from database data source. |
RMSchema |
getSchemaVisible()
Override to get from database data source. |
java.lang.String |
getTypeString()
Returns the type string. |
void |
insertRowImpl(RMRow aRow)
Inserts a given row. |
boolean |
isHTTPDataSource()
Returns whether data source is really HTTP data source. |
void |
saveFiles()
Save file changes. |
void |
saveFilesImmediately()
Override. |
void |
setEmail(java.lang.String aString)
Sets the application email address. |
void |
setPassword(java.lang.String aPassword)
Sets the password. |
com.reportmill.archiver.RXElement |
toXML(com.reportmill.archiver.RXArchiver anArchiver,
java.lang.Object anOwner)
XML archival. |
void |
updateRowImpl(RMRow aRow)
Updates a given row. |
void |
writeFileImpl(RMFile aFile)
Override to do GAE file sync. |
| Methods inherited from class com.reportmill.datasource.RMDataSource |
createObject, deleteFile, deleteRow, equals, getAllRows, getDataset, getEntity, getEntityClass, getEntityResolver, getFile, getFile, getName, getRootDirectory, getRow, getRow, getRows, getUniqueRow, insertRow, propertyChange, readFile, refresh, saveRows, setEntityResolver, setName, toString, updateRow, writeFile |
| Methods inherited from class com.reportmill.base.RMObject |
addListener, addPropertyChangeListener, animUpdate, clone, firePropertyChange, firePropertyChange, getListener, getListenerCount, getListeners, isFirePropertyChangeEnabled, isUndoing, removeListener, removePropertyChangeListener, setFirePropertyChangeEnabled, setUndoing |
| Methods inherited from class java.lang.Object |
getClass, hashCode, notify, notifyAll, wait, wait, wait |
RMGAEDataSource
public RMGAEDataSource()
- Creates a new Google App Engine data source.
RMGAEDataSource
public RMGAEDataSource(java.lang.String aName)
- Creates a new Google App Engine data source.
getPath
public java.lang.String getPath()
- Override path to be GAE directory plus app name.
- Overrides:
getPath in class RMFileDataSource
getAppDirectory
public java.io.File getAppDirectory()
- Returns a file for this GAE data source app directory.
getAppFilesDirectory
public java.io.File getAppFilesDirectory()
- Returns a file for this GAE data source app directory.
getEmail
public java.lang.String getEmail()
- Returns the application email address.
setEmail
public void setEmail(java.lang.String aString)
- Sets the application email address.
getPassword
public java.lang.String getPassword()
- Returns the password.
setPassword
public void setPassword(java.lang.String aPassword)
- Sets the password.
isHTTPDataSource
public boolean isHTTPDataSource()
- Returns whether data source is really HTTP data source.
getHTTPRoot
public java.lang.String getHTTPRoot()
- Returns the HTTP root, if in HTTP mode.
getFilesImpl
public java.util.List<RMFile> getFilesImpl(java.lang.String aPath)
- Returns files at path.
- Overrides:
getFilesImpl in class RMFileDataSource
getFile
public RMFile getFile(java.lang.String aPath,
boolean doCreate,
boolean isDirectory)
- Override to load file via HTTP.
- Overrides:
getFile in class RMDataSource
writeFileImpl
public void writeFileImpl(RMFile aFile)
- Override to do GAE file sync.
- Overrides:
writeFileImpl in class RMFileDataSource
deleteFileImpl
public void deleteFileImpl(RMFile aFile)
- Deletes file.
- Overrides:
deleteFileImpl in class RMFileDataSource
getDBDataSource
public com.reportmill.database.DBDataSource getDBDataSource()
- Returns a DBDataSource configured with Cloud2DB.
getRowsImpl
public java.util.List<RMRow> getRowsImpl(java.util.List<? extends RMProperty> theProperties,
RMCondition aCondition,
java.lang.Class<? extends RMRow> aClass)
- Returns a set of rows for the given properties and condition.
- Overrides:
getRowsImpl in class RMFileDataSource
insertRowImpl
public void insertRowImpl(RMRow aRow)
- Inserts a given row.
- Overrides:
insertRowImpl in class RMFileDataSource
updateRowImpl
public void updateRowImpl(RMRow aRow)
- Updates a given row.
- Overrides:
updateRowImpl in class RMFileDataSource
deleteRowImpl
public void deleteRowImpl(RMRow aRow)
- Deletes a given row.
- Overrides:
deleteRowImpl in class RMFileDataSource
getSchema
public RMSchema getSchema()
- Get schema from database data source.
- Overrides:
getSchema in class RMFileDataSource
getSchemaVisible
public RMSchema getSchemaVisible()
- Override to get from database data source.
- Overrides:
getSchemaVisible in class RMDataSource
createEntity
public RMEntity createEntity(RMEntity anEntity)
- Override to forward to database data source.
- Overrides:
createEntity in class RMDataSource
deleteEntity
public void deleteEntity(RMEntity anEntity)
- Override to forward to database data source.
- Overrides:
deleteEntity in class RMDataSource
saveFiles
public void saveFiles()
- Save file changes.
saveFilesImmediately
public void saveFilesImmediately()
- Override.
create
public void create()
- Creates the new google app engine site (really just registers for cloud2db).
- Overrides:
create in class RMDataSource
delete
public void delete()
- Deletes app engine site.
- Overrides:
delete in class RMFileDataSource
getTypeString
public java.lang.String getTypeString()
- Returns the type string.
- Overrides:
getTypeString in class RMFileDataSource
toXML
public com.reportmill.archiver.RXElement toXML(com.reportmill.archiver.RXArchiver anArchiver,
java.lang.Object anOwner)
- XML archival.
- Overrides:
toXML in class RMFileDataSource
fromXML
public RMFileDataSource fromXML(com.reportmill.archiver.RXArchiver anArchiver,
com.reportmill.archiver.RXElement anElement,
java.lang.Object anOwner)
- XML unarchival.
- Overrides:
fromXML in class RMFileDataSource