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,- java.beans.PropertyChangeListener,- java.lang.Cloneable,- java.util.EventListener
 - Direct Known Subclasses:
- EclipseSite,- LocalSite,- SandboxSite
 
 public class FileSite extends WebSite 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.WebSiteWebSite.Servlet
 
- 
 - 
Field Summary- 
Fields inherited from class com.inductiveautomation.snap.web.WebSiteRefresh_Prop
 
- 
 - 
Constructor SummaryConstructors Constructor Description FileSite()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voiddeleteEntityImpl(Entity anEntity)Delete entity file and entity table data file.protected voiddeleteFileImpl(WebFile aFile)Deletes file.protected voiddeleteRowImpl(Row aRow)Deletes a given row.voiddeleteSite()Deletes this data source, assuming it corresponds to something that can be deleted, like a database.protected voidflushImpl()Override to Saves changes if any made.protected EntitygetEntityImpl(java.lang.String aName)Get entity by loading from entity file.protected java.util.List<Row>getEntityRows(Entity anEntity)Returns the list of rows for a given entity.protected byte[]getFileBytesImpl(WebFile aFile)Gets file bytes.protected WebFilegetFileImpl(java.lang.String aPath)Returns a file atprotected java.util.List<WebFile>getFilesImpl(WebFile aFile)Returns files at path.longgetModifiedTime(WebFile aFile)Override to get modified time from Java file.protected java.util.List<Row>getRowsImpl(Entity anEntity, Query aQuery)Returns a set of rows for the given properties and condition.protected java.io.FilegetStandardFile(WebFile aFile)Returns the Java file for a WebFile.protected java.io.FilegetStandardFile(java.lang.String aPath)Returns the Java file for RMFile.protected WebFilegetTableDataFile(java.lang.String aName, boolean doCreate)Returns the file for the given entity.protected WebFilegetTableEntityFile(java.lang.String aName, boolean doCreate)Returns the file for the given entity.protected voidsaveEntityFile(Entity anEntity)Save entity files for changed entities.protected voidsaveEntityFiles()Save entity files for changed entities.protected voidsaveEntityImpl(Entity anEntity)Save entity by saving entity bytes to entity file.protected voidsaveFileImpl(WebFile aFile)Writes file bytes.protected voidsaveRowImpl(Row aRow)Inserts or updates a given row.protected voidsetModifiedTimeImpl(WebFile aFile, long aTime)Saves the modified time for a file to underlying file system.- 
Methods inherited from class com.inductiveautomation.snap.web.WebSiteaddDeepChangeListener, 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.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- 
getFileImplprotected WebFile getFileImpl(java.lang.String aPath) Returns a file at- Overrides:
- getFileImplin class- WebSite
 
 - 
getFilesImplprotected java.util.List<WebFile> getFilesImpl(WebFile aFile) throws java.lang.Exception Returns files at path.- Overrides:
- getFilesImplin class- WebSite
- Throws:
- java.lang.Exception
 
 - 
getFileBytesImplprotected byte[] getFileBytesImpl(WebFile aFile) throws java.lang.Exception Gets file bytes.- Overrides:
- getFileBytesImplin class- WebSite
- Throws:
- java.lang.Exception
 
 - 
saveFileImplprotected void saveFileImpl(WebFile aFile) throws java.lang.Exception Writes file bytes.- Overrides:
- saveFileImplin class- WebSite
- Throws:
- java.lang.Exception
 
 - 
deleteFileImplprotected void deleteFileImpl(WebFile aFile) throws java.lang.Exception Deletes file.- Overrides:
- deleteFileImplin class- WebSite
- Throws:
- java.lang.Exception
 
 - 
getModifiedTimepublic long getModifiedTime(WebFile aFile) Override to get modified time from Java file.- Overrides:
- getModifiedTimein class- WebSite
 
 - 
setModifiedTimeImplprotected void setModifiedTimeImpl(WebFile aFile, long aTime) throws java.lang.Exception Saves the modified time for a file to underlying file system.- Overrides:
- setModifiedTimeImplin class- WebSite
- Throws:
- java.lang.Exception
 
 - 
getEntityImplprotected Entity getEntityImpl(java.lang.String aName) throws java.lang.Exception Get entity by loading from entity file.- Overrides:
- getEntityImplin class- WebSite
- Throws:
- java.lang.Exception
 
 - 
saveEntityImplprotected void saveEntityImpl(Entity anEntity) throws java.lang.Exception Save entity by saving entity bytes to entity file.- Overrides:
- saveEntityImplin class- WebSite
- Throws:
- java.lang.Exception
 
 - 
deleteEntityImplprotected void deleteEntityImpl(Entity anEntity) throws java.lang.Exception Delete entity file and entity table data file.- Overrides:
- deleteEntityImplin class- WebSite
- Throws:
- java.lang.Exception
 
 - 
getRowsImplprotected 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) Inserts or updates a given row.- Specified by:
- saveRowImplin class- WebSite
 
 - 
deleteRowImplprotected void deleteRowImpl(Row aRow) Deletes a given row.- Specified by:
- deleteRowImplin class- WebSite
 
 - 
saveEntityFilesprotected void saveEntityFiles() throws java.lang.ExceptionSave entity files for changed entities.- Throws:
- java.lang.Exception
 
 - 
saveEntityFileprotected void saveEntityFile(Entity anEntity) throws java.lang.Exception Save entity files for changed entities.- Throws:
- java.lang.Exception
 
 - 
flushImplprotected void flushImpl() throws java.lang.ExceptionOverride to Saves changes if any made.
 - 
getTableEntityFileprotected WebFile getTableEntityFile(java.lang.String aName, boolean doCreate) Returns the file for the given entity.
 - 
getTableDataFileprotected WebFile getTableDataFile(java.lang.String aName, boolean doCreate) Returns the file for the given entity.
 - 
getEntityRowsprotected java.util.List<Row> getEntityRows(Entity anEntity) Returns the list of rows for a given entity.
 - 
deleteSitepublic void deleteSite() throws java.lang.ExceptionDeletes this data source, assuming it corresponds to something that can be deleted, like a database.- Overrides:
- deleteSitein class- WebSite
- Throws:
- java.lang.Exception
 
 - 
getStandardFileprotected java.io.File getStandardFile(WebFile aFile) Returns the Java file for a WebFile.- Overrides:
- getStandardFilein class- WebSite
 
 - 
getStandardFileprotected java.io.File getStandardFile(java.lang.String aPath) Returns the Java file for RMFile.
 
- 
 
-