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 WebSite
WebSite.Servlet -
Field Summary
Fields inherited from class WebSite
Refresh_Prop -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddAutosaveRow(Row aRow) Adds a Row to AutosaveRows set.protected SnapTableOverride to return SnapTable.protected WebFilecreateFileImpl(String aPath, boolean isDirectory) Nobody should be asking for files from this site.protected @NonNull RowcreateRowImpl(Entity anEntity, Object aPrimaryValue) Creates a new row for source.protected voiddeleteEntityImpl(@Nullable 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 voidOverride to save SettingsFile and AutosaveRows.static SnapSiteReturns the SnapSite for a given site.getDataTable(String aName) Override to return as SnapTable.protected EntitygetEntityImpl(String aName) Returns the entity for given name.protected byte[]getFileBytesImpl(WebFile aFile) Returns file bytes.protected WebFilegetFileImpl(String aPath) Returns a data source file for given path (if file exists).getFilesImpl(WebFile aFile) Returns a list of files at path.protected @Nullable RowgetRowImpl(@NonNull 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.voidpropertyChange(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 voidSets the encapsulated WebSite.Methods inherited from class 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, toStringMethods inherited from class RMObject
addPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChangeMethods inherited from class 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
-
createFileImpl
Nobody should be asking for files from this site.- Overrides:
createFileImplin classWebSite
-
getFileImpl
Description copied from class:WebSiteReturns a data source file for given path (if file exists).- Overrides:
getFileImplin classWebSite
-
getFilesImpl
-
getFileBytesImpl
Description copied from class:WebSiteReturns file bytes.- Overrides:
getFileBytesImplin classWebSite
-
saveFileImpl
-
deleteFileImpl
-
refreshFileImpl
-
getDataTable
Override to return as SnapTable.- Overrides:
getDataTablein classWebSite
-
createDataTableImpl
Override to return SnapTable.- Overrides:
createDataTableImplin classWebSite
-
getTableView
Returns a table view for given name. -
getEntityImpl
-
saveEntityImpl
Override to save entity to encapsulated source.- Overrides:
saveEntityImplin classWebSite- Throws:
Exception
-
deleteEntityImpl
Override to delete entity from encapsulated source.- Overrides:
deleteEntityImplin classWebSite- Throws:
Exception
-
createRowImpl
Creates a new row for source.- Overrides:
createRowImplin classWebSite
-
getRowImpl
Returns a row for a given entity and primary value.- Overrides:
getRowImplin classWebSite
-
getRowsImpl
-
saveRowImpl
Inserts or updates a given row.- Specified by:
saveRowImplin classWebSite- Throws:
Exception
-
deleteRowImpl
Deletes a given row.- Specified by:
deleteRowImplin classWebSite- Throws:
Exception
-
propertyChange
Override to track changed rows.- Specified by:
propertyChangein interfacePropertyChangeListener- Overrides:
propertyChangein classWebSite
-
addAutosaveRow
Adds a Row to AutosaveRows set. -
refresh
-
flushImpl
-
get
-