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
,PropertyChangeListener
,Cloneable
,EventListener
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.WebSite
WebSite.Servlet
-
Field Summary
Fields inherited from class com.inductiveautomation.snap.web.WebSite
Refresh_Prop
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected void
addAutosaveRow
(Row aRow) Adds a Row to AutosaveRows set.protected SnapTable
Override to return SnapTable.protected WebFile
createFileImpl
(String aPath, boolean isDirectory) Nobody should be asking for files from this site.protected Row
createRowImpl
(Entity anEntity, Object aPrimaryValue) Creates a new row for source.protected void
deleteEntityImpl
(Entity anEntity) Override to delete entity from encapsulated source.protected void
deleteFileImpl
(WebFile aFile) Deletes a file.protected void
deleteRowImpl
(Row aRow) Deletes a given row.protected void
Override to save SettingsFile and AutosaveRows.static SnapSite
Returns the SnapSite for a given site.getDataTable
(String aName) Override to return as SnapTable.protected Entity
getEntityImpl
(String aName) Returns the entity for given name.protected byte[]
getFileBytesImpl
(WebFile aFile) Returns file bytes.protected WebFile
getFileImpl
(String aPath) Returns a data source file for given path (if file exists).getFilesImpl
(WebFile aFile) Returns a list of files at path.protected Row
getRowImpl
(Entity anEntity, Object aPrimaryValue) Returns a row for a given entity and primary value.getRowsImpl
(Entity anEntity, Query aQuery) Returns a set of rows for the given properties and condition.getSite()
Returns the encapsulated WebSite.getTableView
(String aName) Returns a table view for given name.getURL()
Returns the URL.void
propertyChange
(PropertyChangeEvent anEvent) Override to track changed rows.void
refresh()
Override to forward to real data source.protected void
refreshFileImpl
(WebFile aFile) Reverts a file.protected void
saveEntityImpl
(Entity anEntity) Override to save entity to encapsulated source.protected void
saveFileImpl
(WebFile aFile) Saves a file.protected void
saveRowImpl
(Row aRow) Inserts or updates a given row.protected void
Sets the encapsulated WebSite.Methods inherited from class com.inductiveautomation.snap.web.WebSite
addDeepChangeListener, 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.RMObject
addPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChange
Methods inherited from class com.inductiveautomation.rm.base.RMListenerList
addListener, clone, getListener, getListenerCount, getListenerCount, getListenerList, getListeners, hasListeners, removeListener
-
Constructor Details
-
SnapSite
public SnapSite()
-
-
Method Details
-
getSite
Returns the encapsulated WebSite. -
setSite
Sets the encapsulated WebSite. -
getURL
Returns the URL. -
createFileImpl
Nobody should be asking for files from this site.- Overrides:
createFileImpl
in classWebSite
-
getFileImpl
Description copied from class:WebSite
Returns a data source file for given path (if file exists).- Overrides:
getFileImpl
in classWebSite
-
getFilesImpl
Description copied from class:WebSite
Returns a list of files at path.- Overrides:
getFilesImpl
in classWebSite
-
getFileBytesImpl
Description copied from class:WebSite
Returns file bytes.- Overrides:
getFileBytesImpl
in classWebSite
-
saveFileImpl
Description copied from class:WebSite
Saves a file.- Overrides:
saveFileImpl
in classWebSite
- Throws:
Exception
-
deleteFileImpl
Description copied from class:WebSite
Deletes a file.- Overrides:
deleteFileImpl
in classWebSite
- Throws:
Exception
-
refreshFileImpl
Description copied from class:WebSite
Reverts a file.- Overrides:
refreshFileImpl
in classWebSite
- Throws:
Exception
-
getDataTable
Override to return as SnapTable.- Overrides:
getDataTable
in classWebSite
-
createDataTableImpl
Override to return SnapTable.- Overrides:
createDataTableImpl
in classWebSite
-
getTableView
Returns a table view for given name. -
getEntityImpl
Returns the entity for given name.- Overrides:
getEntityImpl
in classWebSite
- Throws:
Exception
-
saveEntityImpl
Override to save entity to encapsulated source.- Overrides:
saveEntityImpl
in classWebSite
- Throws:
Exception
-
deleteEntityImpl
Override to delete entity from encapsulated source.- Overrides:
deleteEntityImpl
in classWebSite
- Throws:
Exception
-
createRowImpl
Creates a new row for source.- Overrides:
createRowImpl
in classWebSite
-
getRowImpl
Returns a row for a given entity and primary value.- Overrides:
getRowImpl
in classWebSite
-
getRowsImpl
Returns a set of rows for the given properties and condition.- Specified by:
getRowsImpl
in classWebSite
-
saveRowImpl
Inserts or updates a given row.- Specified by:
saveRowImpl
in classWebSite
- Throws:
Exception
-
deleteRowImpl
Deletes a given row.- Specified by:
deleteRowImpl
in classWebSite
- Throws:
Exception
-
propertyChange
Override to track changed rows.- Specified by:
propertyChange
in interfacePropertyChangeListener
- Overrides:
propertyChange
in classWebSite
-
addAutosaveRow
Adds a Row to AutosaveRows set. -
refresh
public void refresh()Override to forward to real data source. -
flushImpl
Override to save SettingsFile and AutosaveRows. -
get
Returns the SnapSite for a given site.
-