Class SnapSite
- java.lang.Object
- 
- com.inductiveautomation.rm.base.RMListenerList
- 
- com.inductiveautomation.rm.base.RMObject
- 
- com.inductiveautomation.snap.web.WebSite
- 
- com.inductiveautomation.snap.filedata.SnapSite
 
 
 
 
- 
- All Implemented Interfaces:
- RMJSONArchiver.GetKeys,- RMPropertyChanger,- java.beans.PropertyChangeListener,- java.lang.Cloneable,- java.util.EventListener
 
 public class SnapSite extends WebSite A class to manage resources for a Snap site (a data source subclass).
- 
- 
Nested Class Summary- 
Nested classes/interfaces inherited from class com.inductiveautomation.snap.web.WebSiteWebSite.Servlet
 
- 
 - 
Field Summary- 
Fields inherited from class com.inductiveautomation.snap.web.WebSiteRefresh_Prop
 
- 
 - 
Constructor SummaryConstructors Constructor Description SnapSite()
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddAutosaveRow(Row aRow)Adds a Row to AutosaveRows set.protected SnapTablecreateDataTableImpl()Override to return SnapTable.protected WebFilecreateFileImpl(java.lang.String aPath, boolean isDirectory)Nobody should be asking for files from this site.protected RowcreateRowImpl(Entity anEntity, java.lang.Object aPrimaryValue)Creates a new row for source.protected voiddeleteEntityImpl(Entity anEntity)Override to delete entity from encapsulated source.protected voiddeleteFileImpl(WebFile aFile)Deletes a file.protected voiddeleteRowImpl(Row aRow)Deletes a given row.protected voidflushImpl()Override to save SettingsFile and AutosaveRows.static SnapSiteget(WebSite aSite)Returns the SnapSite for a given site.SnapTablegetDataTable(java.lang.String aName)Override to return as SnapTable.protected EntitygetEntityImpl(java.lang.String aName)Returns the entity for given name.protected byte[]getFileBytesImpl(WebFile aFile)Returns file bytes.protected WebFilegetFileImpl(java.lang.String aPath)Returns a data source file for given path (if file exists).protected java.util.List<WebFile>getFilesImpl(WebFile aFile)Returns a list of files at path.protected RowgetRowImpl(Entity anEntity, java.lang.Object aPrimaryValue)Returns a row for a given entity and primary value.protected java.util.List<Row>getRowsImpl(Entity anEntity, Query aQuery)Returns a set of rows for the given properties and condition.WebSitegetSite()Returns the encapsulated WebSite.SnapTableViewgetTableView(java.lang.String aName)Returns a table view for given name.WebURLgetURL()Returns the URL.voidpropertyChange(java.beans.PropertyChangeEvent anEvent)Override to track changed rows.voidrefresh()Override to forward to real data source.protected voidrefreshFileImpl(WebFile aFile)Reverts a file.protected voidsaveEntityImpl(Entity anEntity)Override to save entity to encapsulated source.protected voidsaveFileImpl(WebFile aFile)Saves a file.protected voidsaveRowImpl(Row aRow)Inserts or updates a given row.protected voidsetSite(WebSite aSite)Sets the encapsulated WebSite.- 
Methods inherited from class com.inductiveautomation.snap.web.WebSiteaddDeepChangeListener, bulkImport, createClassLoader, createDataTable, createEntity, createEntityImpl, createFile, createRow, createRow, createSandbox, createSandboxURL, createSandboxURLS, createSchema, createSite, createURL, deleteEntity, deleteFile, deleteRow, deleteSite, flush, getClassLoader, getDataTables, getEntity, getExists, getFile, getHostName, getJSONKeys, getModifiedTime, getName, getPassword, getPath, getProp, getRequest, getResponse, getRootDirectory, getRow, getRow, getRows, getSandbox, getSchema, getServlet, getStandardFile, getURL, getURLString, getUserName, handleDelete, handleGet, handleHead, handlePut, isRunning, refreshFile, removeDeepChangeListener, saveEntity, saveFile, saveRow, setClassLoader, setExists, setModifiedTime, setModifiedTimeImpl, setPassword, setProp, setSandbox, setServlet, setURL, setUserName, toString
 - 
Methods inherited from class com.inductiveautomation.rm.base.RMObjectaddPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange
 - 
Methods inherited from class com.inductiveautomation.rm.base.RMListenerListaddListener, clone, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
 
- 
 
- 
- 
- 
Method Detail- 
getSitepublic WebSite getSite() Returns the encapsulated WebSite.
 - 
setSiteprotected void setSite(WebSite aSite) Sets the encapsulated WebSite.
 - 
createFileImplprotected WebFile createFileImpl(java.lang.String aPath, boolean isDirectory) Nobody should be asking for files from this site.- Overrides:
- createFileImplin class- WebSite
 
 - 
getFileImplprotected WebFile getFileImpl(java.lang.String aPath) Description copied from class:WebSiteReturns a data source file for given path (if file exists).- Overrides:
- getFileImplin class- WebSite
 
 - 
getFilesImplprotected java.util.List<WebFile> getFilesImpl(WebFile aFile) Description copied from class:WebSiteReturns a list of files at path.- Overrides:
- getFilesImplin class- WebSite
 
 - 
getFileBytesImplprotected byte[] getFileBytesImpl(WebFile aFile) Description copied from class:WebSiteReturns file bytes.- Overrides:
- getFileBytesImplin class- WebSite
 
 - 
saveFileImplprotected void saveFileImpl(WebFile aFile) throws java.lang.Exception Description copied from class:WebSiteSaves a file.- Overrides:
- saveFileImplin class- WebSite
- Throws:
- java.lang.Exception
 
 - 
deleteFileImplprotected void deleteFileImpl(WebFile aFile) throws java.lang.Exception Description copied from class:WebSiteDeletes a file.- Overrides:
- deleteFileImplin class- WebSite
- Throws:
- java.lang.Exception
 
 - 
refreshFileImplprotected void refreshFileImpl(WebFile aFile) throws java.lang.Exception Description copied from class:WebSiteReverts a file.- Overrides:
- refreshFileImplin class- WebSite
- Throws:
- java.lang.Exception
 
 - 
getDataTablepublic SnapTable getDataTable(java.lang.String aName) Override to return as SnapTable.- Overrides:
- getDataTablein class- WebSite
 
 - 
createDataTableImplprotected SnapTable createDataTableImpl() Override to return SnapTable.- Overrides:
- createDataTableImplin class- WebSite
 
 - 
getTableViewpublic SnapTableView getTableView(java.lang.String aName) Returns a table view for given name.
 - 
getEntityImplprotected Entity getEntityImpl(java.lang.String aName) throws java.lang.Exception Returns the entity for given name.- Overrides:
- getEntityImplin class- WebSite
- Throws:
- java.lang.Exception
 
 - 
saveEntityImplprotected void saveEntityImpl(Entity anEntity) throws java.lang.Exception Override to save entity to encapsulated source.- Overrides:
- saveEntityImplin class- WebSite
- Throws:
- java.lang.Exception
 
 - 
deleteEntityImplprotected void deleteEntityImpl(@Nullable Entity anEntity) throws java.lang.ExceptionOverride to delete entity from encapsulated source.- Overrides:
- deleteEntityImplin class- WebSite
- Throws:
- java.lang.Exception
 
 - 
createRowImpl@Nonnull protected Row createRowImpl(Entity anEntity, java.lang.Object aPrimaryValue) Creates a new row for source.- Overrides:
- createRowImplin class- WebSite
 
 - 
getRowImpl@Nullable protected Row getRowImpl(@Nonnull Entity anEntity, java.lang.Object aPrimaryValue) Returns a row for a given entity and primary value.- Overrides:
- getRowImplin class- WebSite
 
 - 
getRowsImpl@Nonnull protected java.util.List<Row> getRowsImpl(Entity anEntity, Query aQuery) Returns a set of rows for the given properties and condition.- Specified by:
- getRowsImplin class- WebSite
 
 - 
saveRowImplprotected void saveRowImpl(Row aRow) throws java.lang.Exception Inserts or updates a given row.- Specified by:
- saveRowImplin class- WebSite
- Throws:
- java.lang.Exception
 
 - 
deleteRowImplprotected void deleteRowImpl(Row aRow) throws java.lang.Exception Deletes a given row.- Specified by:
- deleteRowImplin class- WebSite
- Throws:
- java.lang.Exception
 
 - 
propertyChangepublic void propertyChange(java.beans.PropertyChangeEvent anEvent) Override to track changed rows.- Specified by:
- propertyChangein interface- java.beans.PropertyChangeListener
- Overrides:
- propertyChangein class- WebSite
 
 - 
addAutosaveRowprotected void addAutosaveRow(Row aRow) Adds a Row to AutosaveRows set.
 - 
refreshpublic void refresh() Override to forward to real data source.
 - 
flushImplprotected void flushImpl() throws java.lang.ExceptionOverride to save SettingsFile and AutosaveRows.
 
- 
 
-