Class ZipFileSite
java.lang.Object
com.inductiveautomation.rm.base.RMListenerList
com.inductiveautomation.rm.base.RMObject
com.inductiveautomation.snap.web.WebSite
com.inductiveautomation.snap.websites.ZipFileSite
- All Implemented Interfaces:
RMJSONArchiver.GetKeys
,RMPropertyChanger
,PropertyChangeListener
,Cloneable
,EventListener
- Direct Known Subclasses:
JarFileSite
A WebSite subclass for Zip files.
-
Nested Class Summary
Nested ClassesNested 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
addZipEntry
(ZipEntry anEntry) Adds a ZipEntry to WebSite.protected WebFile
createFileImpl
(String aPath, boolean isDirectory) Override to return ZipDataFile.protected ZipFile
Creates the ZipFile.protected void
deleteFileImpl
(WebFile aFile) Deletes a file.protected void
deleteRowImpl
(Row aRow) Deletes a given row.protected byte[]
getFileBytesImpl
(WebFile aFile) Returns file bytes.protected WebFile
getFileImpl
(String aPath) Returns a data source file for given path (if file exists).protected List
getFilesImpl
(WebFile aFile) Returns a list of files at path.getResponse
(Request aRequest) Override to load files when first file is requested.getRowsImpl
(Entity anEntity, Query aQuery) Returns a set of rows for the given properties and condition.protected File
Returns a Java file for the zip file URL (copied to Sandbox if remote).protected ZipFile
Returns the ZipFile.protected void
Loads WebSite from Archive (zip) file.protected void
saveFileImpl
(WebFile aFile) Saves a file.protected void
saveRowImpl
(Row aRow) Inserts or updates a given row.Methods inherited from class com.inductiveautomation.snap.web.WebSite
addDeepChangeListener, bulkImport, createClassLoader, createDataTable, createDataTableImpl, createEntity, createEntityImpl, createFile, createRow, createRow, createRowImpl, createSandbox, createSandboxURL, createSandboxURLS, createSchema, createSite, createURL, deleteEntity, deleteEntityImpl, deleteFile, deleteRow, deleteSite, flush, flushImpl, getClassLoader, getDataTable, getDataTables, getEntity, getEntityImpl, getExists, getFile, getHostName, getJSONKeys, getModifiedTime, getName, getPassword, getPath, getProp, getRequest, getRootDirectory, getRow, getRow, getRowImpl, getRows, getSandbox, getSchema, getServlet, getStandardFile, getURL, getURL, getURLString, getUserName, handleDelete, handleGet, handleHead, handlePut, isRunning, propertyChange, refresh, refreshFile, refreshFileImpl, removeDeepChangeListener, saveEntity, saveEntityImpl, 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
-
ZipFileSite
public ZipFileSite()
-
-
Method Details
-
loadArchive
protected void loadArchive()Loads WebSite from Archive (zip) file. -
getZipFile
Returns the ZipFile.- Throws:
Exception
-
createZipFile
Creates the ZipFile.- Throws:
Exception
-
getStandardFile
Returns a Java file for the zip file URL (copied to Sandbox if remote).- Throws:
Exception
-
addZipEntry
Adds a ZipEntry to WebSite. -
createFileImpl
Override to return ZipDataFile.- Overrides:
createFileImpl
in classWebSite
-
getResponse
Override to load files when first file is requested.- Overrides:
getResponse
in classWebSite
-
getFileImpl
Returns a data source file for given path (if file exists).- Overrides:
getFileImpl
in classWebSite
-
getFilesImpl
Returns a list of files at path.- Overrides:
getFilesImpl
in classWebSite
- Throws:
Exception
-
getFileBytesImpl
Returns file bytes.- Overrides:
getFileBytesImpl
in classWebSite
- Throws:
Exception
-
saveFileImpl
Saves a file.- Overrides:
saveFileImpl
in classWebSite
- Throws:
Exception
-
deleteFileImpl
Deletes a file.- Overrides:
deleteFileImpl
in classWebSite
- Throws:
Exception
-
getRowsImpl
Description copied from class:WebSite
Returns a set of rows for the given properties and condition.- Specified by:
getRowsImpl
in classWebSite
-
saveRowImpl
Description copied from class:WebSite
Inserts or updates a given row.- Specified by:
saveRowImpl
in classWebSite
-
deleteRowImpl
Description copied from class:WebSite
Deletes a given row.- Specified by:
deleteRowImpl
in classWebSite
-