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 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.voidDeletes this data source, assuming it corresponds to something that can be deleted, like a database.protected voidOverride to Saves changes if any made.protected EntitygetEntityImpl(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 WebFilegetFileImpl(String aPath) Returns a file atgetFilesImpl(WebFile aFile) Returns files at path.longgetModifiedTime(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 FilegetStandardFile(WebFile aFile) Returns the Java file for a WebFile.protected FilegetStandardFile(String aPath) Returns the Java file for RMFile.protected WebFilegetTableDataFile(String aName, boolean doCreate) Returns the file for the given entity.protected WebFilegetTableEntityFile(String aName, boolean doCreate) Returns the file for the given entity.protected voidsaveEntityFile(Entity anEntity) Save entity files for changed entities.protected voidSave 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.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, toStringMethods inherited from class com.inductiveautomation.rm.base.RMObject
addPropertyChangeListener, animUpdate, firePropertyChange, firePropertyChange, firePropertyChange, getPCEvent, removePropertyChangeListener, sendPropertyChangeMethods 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:
getFileImplin classWebSite
-
getFilesImpl
Returns files at path.- Overrides:
getFilesImplin classWebSite- Throws:
Exception
-
getFileBytesImpl
Gets file bytes.- Overrides:
getFileBytesImplin classWebSite- Throws:
Exception
-
saveFileImpl
Writes file bytes.- Overrides:
saveFileImplin classWebSite- Throws:
Exception
-
deleteFileImpl
Deletes file.- Overrides:
deleteFileImplin classWebSite- Throws:
Exception
-
getModifiedTime
Override to get modified time from Java file.- Overrides:
getModifiedTimein classWebSite
-
setModifiedTimeImpl
Saves the modified time for a file to underlying file system.- Overrides:
setModifiedTimeImplin classWebSite- Throws:
Exception
-
getEntityImpl
Get entity by loading from entity file.- Overrides:
getEntityImplin classWebSite- Throws:
Exception
-
saveEntityImpl
Save entity by saving entity bytes to entity file.- Overrides:
saveEntityImplin classWebSite- Throws:
Exception
-
deleteEntityImpl
Delete entity file and entity table data file.- Overrides:
deleteEntityImplin classWebSite- Throws:
Exception
-
getRowsImpl
Returns a set of rows for the given properties and condition.- Specified by:
getRowsImplin classWebSite
-
saveRowImpl
Inserts or updates a given row.- Specified by:
saveRowImplin classWebSite
-
deleteRowImpl
Deletes a given row.- Specified by:
deleteRowImplin 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:
deleteSitein classWebSite- Throws:
Exception
-
getStandardFile
Returns the Java file for a WebFile.- Overrides:
getStandardFilein classWebSite
-
getStandardFile
Returns the Java file for RMFile.
-