Class FileSite
java.lang.Object
com.inductiveautomation.rm.base.RMListenerList
com.inductiveautomation.rm.base.RMObject
com.inductiveautomation.snap.web.WebSite
com.inductiveautomation.snap.websites.FileSite
- All Implemented Interfaces:
RMJSONArchiver.GetKeys
,RMPropertyChanger
,PropertyChangeListener
,Cloneable
,EventListener
- Direct Known Subclasses:
EclipseSite
,LocalSite
,SandboxSite
A data source to read/write data and files to a file system.
-
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
deleteEntityImpl
(Entity anEntity) Delete entity file and entity table data file.protected void
deleteFileImpl
(WebFile aFile) Deletes file.protected void
deleteRowImpl
(Row aRow) Deletes a given row.void
Deletes this data source, assuming it corresponds to something that can be deleted, like a database.protected void
Override to Saves changes if any made.protected Entity
getEntityImpl
(String aName) Get entity by loading from entity file.getEntityRows
(Entity anEntity) Returns the list of rows for a given entity.protected byte[]
getFileBytesImpl
(WebFile aFile) Gets file bytes.protected WebFile
getFileImpl
(String aPath) Returns a file atgetFilesImpl
(WebFile aFile) Returns files at path.long
getModifiedTime
(WebFile aFile) Override to get modified time from Java file.getRowsImpl
(Entity anEntity, Query aQuery) Returns a set of rows for the given properties and condition.protected File
getStandardFile
(WebFile aFile) Returns the Java file for a WebFile.protected File
getStandardFile
(String aPath) Returns the Java file for RMFile.protected WebFile
getTableDataFile
(String aName, boolean doCreate) Returns the file for the given entity.protected WebFile
getTableEntityFile
(String aName, boolean doCreate) Returns the file for the given entity.protected void
saveEntityFile
(Entity anEntity) Save entity files for changed entities.protected void
Save entity files for changed entities.protected void
saveEntityImpl
(Entity anEntity) Save entity by saving entity bytes to entity file.protected void
saveFileImpl
(WebFile aFile) Writes file bytes.protected void
saveRowImpl
(Row aRow) Inserts or updates a given row.protected void
setModifiedTimeImpl
(WebFile aFile, long aTime) Saves the modified time for a file to underlying file system.Methods inherited from class com.inductiveautomation.snap.web.WebSite
addDeepChangeListener, bulkImport, createClassLoader, createDataTable, createDataTableImpl, createEntity, createEntityImpl, createFile, createFileImpl, createRow, createRow, createRowImpl, createSandbox, createSandboxURL, createSandboxURLS, createSchema, createSite, createURL, deleteEntity, deleteFile, deleteRow, flush, getClassLoader, getDataTable, getDataTables, getEntity, getExists, getFile, getHostName, getJSONKeys, getName, getPassword, getPath, getProp, getRequest, getResponse, getRootDirectory, getRow, getRow, getRowImpl, getRows, getSandbox, getSchema, getServlet, getURL, getURL, getURLString, getUserName, handleDelete, handleGet, handleHead, handlePut, isRunning, propertyChange, refresh, refreshFile, refreshFileImpl, removeDeepChangeListener, saveEntity, saveFile, saveRow, setClassLoader, setExists, setModifiedTime, 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
-
FileSite
public FileSite()
-
-
Method Details
-
getFileImpl
Returns a file at- Overrides:
getFileImpl
in classWebSite
-
getFilesImpl
Returns files at path.- Overrides:
getFilesImpl
in classWebSite
- Throws:
Exception
-
getFileBytesImpl
Gets file bytes.- Overrides:
getFileBytesImpl
in classWebSite
- Throws:
Exception
-
saveFileImpl
Writes file bytes.- Overrides:
saveFileImpl
in classWebSite
- Throws:
Exception
-
deleteFileImpl
Deletes file.- Overrides:
deleteFileImpl
in classWebSite
- Throws:
Exception
-
getModifiedTime
Override to get modified time from Java file.- Overrides:
getModifiedTime
in classWebSite
-
setModifiedTimeImpl
Saves the modified time for a file to underlying file system.- Overrides:
setModifiedTimeImpl
in classWebSite
- Throws:
Exception
-
getEntityImpl
Get entity by loading from entity file.- Overrides:
getEntityImpl
in classWebSite
- Throws:
Exception
-
saveEntityImpl
Save entity by saving entity bytes to entity file.- Overrides:
saveEntityImpl
in classWebSite
- Throws:
Exception
-
deleteEntityImpl
Delete entity file and entity table data file.- Overrides:
deleteEntityImpl
in classWebSite
- Throws:
Exception
-
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
-
deleteRowImpl
Deletes a given row.- Specified by:
deleteRowImpl
in classWebSite
-
saveEntityFiles
Save entity files for changed entities.- Throws:
Exception
-
saveEntityFile
Save entity files for changed entities.- Throws:
Exception
-
flushImpl
Override to Saves changes if any made. -
getTableEntityFile
Returns the file for the given entity. -
getTableDataFile
Returns the file for the given entity. -
getEntityRows
Returns the list of rows for a given entity. -
deleteSite
Deletes this data source, assuming it corresponds to something that can be deleted, like a database.- Overrides:
deleteSite
in classWebSite
- Throws:
Exception
-
getStandardFile
Returns the Java file for a WebFile.- Overrides:
getStandardFile
in classWebSite
-
getStandardFile
Returns the Java file for RMFile.
-