Class FileSite

    • Constructor Detail

      • FileSite

        public FileSite()
    • Method Detail

      • getFileImpl

        protected WebFile getFileImpl​(java.lang.String aPath)
        Returns a file at
        Overrides:
        getFileImpl in class WebSite
      • getFilesImpl

        protected java.util.List<WebFile> getFilesImpl​(WebFile aFile)
                                                throws java.lang.Exception
        Returns files at path.
        Overrides:
        getFilesImpl in class WebSite
        Throws:
        java.lang.Exception
      • getFileBytesImpl

        protected byte[] getFileBytesImpl​(WebFile aFile)
                                   throws java.lang.Exception
        Gets file bytes.
        Overrides:
        getFileBytesImpl in class WebSite
        Throws:
        java.lang.Exception
      • saveFileImpl

        protected void saveFileImpl​(WebFile aFile)
                             throws java.lang.Exception
        Writes file bytes.
        Overrides:
        saveFileImpl in class WebSite
        Throws:
        java.lang.Exception
      • deleteFileImpl

        protected void deleteFileImpl​(WebFile aFile)
                               throws java.lang.Exception
        Deletes file.
        Overrides:
        deleteFileImpl in class WebSite
        Throws:
        java.lang.Exception
      • getModifiedTime

        public long getModifiedTime​(WebFile aFile)
        Override to get modified time from Java file.
        Overrides:
        getModifiedTime in class WebSite
      • setModifiedTimeImpl

        protected void setModifiedTimeImpl​(WebFile aFile,
                                           long aTime)
                                    throws java.lang.Exception
        Saves the modified time for a file to underlying file system.
        Overrides:
        setModifiedTimeImpl in class WebSite
        Throws:
        java.lang.Exception
      • getEntityImpl

        protected Entity getEntityImpl​(java.lang.String aName)
                                throws java.lang.Exception
        Get entity by loading from entity file.
        Overrides:
        getEntityImpl in class WebSite
        Throws:
        java.lang.Exception
      • saveEntityImpl

        protected void saveEntityImpl​(Entity anEntity)
                               throws java.lang.Exception
        Save entity by saving entity bytes to entity file.
        Overrides:
        saveEntityImpl in class WebSite
        Throws:
        java.lang.Exception
      • deleteEntityImpl

        protected void deleteEntityImpl​(Entity anEntity)
                                 throws java.lang.Exception
        Delete entity file and entity table data file.
        Overrides:
        deleteEntityImpl in class WebSite
        Throws:
        java.lang.Exception
      • getRowsImpl

        protected java.util.List<Row> getRowsImpl​(Entity anEntity,
                                                  Query aQuery)
        Returns a set of rows for the given properties and condition.
        Specified by:
        getRowsImpl in class WebSite
      • saveRowImpl

        protected void saveRowImpl​(Row aRow)
        Inserts or updates a given row.
        Specified by:
        saveRowImpl in class WebSite
      • deleteRowImpl

        protected void deleteRowImpl​(Row aRow)
        Deletes a given row.
        Specified by:
        deleteRowImpl in class WebSite
      • saveEntityFiles

        protected void saveEntityFiles()
                                throws java.lang.Exception
        Save entity files for changed entities.
        Throws:
        java.lang.Exception
      • saveEntityFile

        protected void saveEntityFile​(Entity anEntity)
                               throws java.lang.Exception
        Save entity files for changed entities.
        Throws:
        java.lang.Exception
      • flushImpl

        protected void flushImpl()
                          throws java.lang.Exception
        Override to Saves changes if any made.
        Overrides:
        flushImpl in class WebSite
        Throws:
        java.lang.Exception
      • getTableEntityFile

        protected WebFile getTableEntityFile​(java.lang.String aName,
                                             boolean doCreate)
        Returns the file for the given entity.
      • getTableDataFile

        protected WebFile getTableDataFile​(java.lang.String aName,
                                           boolean doCreate)
        Returns the file for the given entity.
      • getEntityRows

        protected java.util.List<Row> getEntityRows​(Entity anEntity)
        Returns the list of rows for a given entity.
      • deleteSite

        public void deleteSite()
                        throws java.lang.Exception
        Deletes this data source, assuming it corresponds to something that can be deleted, like a database.
        Overrides:
        deleteSite in class WebSite
        Throws:
        java.lang.Exception
      • getStandardFile

        protected java.io.File getStandardFile​(WebFile aFile)
        Returns the Java file for a WebFile.
        Overrides:
        getStandardFile in class WebSite
      • getStandardFile

        protected java.io.File getStandardFile​(java.lang.String aPath)
        Returns the Java file for RMFile.