Class BaseStorageFilesystem


  • public class BaseStorageFilesystem
    extends java.lang.Object
    Handles file system access stuff, encryption etc
    • Constructor Detail

      • BaseStorageFilesystem

        public BaseStorageFilesystem()
    • Method Detail

      • loadFile

        public java.io.InputStream loadFile​(EntityFile file)
        Loads a file from the filesystem
        Parameters:
        file - the file to load
        Returns:
        inputstream of the file content
      • loadFileAsString

        public java.lang.String loadFileAsString​(EntityFile file)
        Loads a file from the filesystem
        Parameters:
        file - the file to load
        Returns:
        string of the file content
      • storeFile

        public boolean storeFile​(EntityFile file,
                                 byte[] fileContent)
        Stores a file on the filesystem
        Parameters:
        file - the file to store
        fileContent - content of the file
        Returns:
        successful
      • storeTaskRawResults

        public boolean storeTaskRawResults​(EntityTask task)
        Stores a tasks raw results on the filesystem
        Parameters:
        task - task to store
        Returns:
        successful
      • validateFileStore

        public java.util.List<java.lang.Object> validateFileStore​(java.util.List<EntityFile> allFiles,
                                                                  java.util.List<EntityTask> allTasks)
        Checks the filestore, ensures files are accounted for and that no extra files are present
        Parameters:
        allFiles - Current files in database
        allTasks - Current tasks in database
        Returns:
        Objects to be removed from the database (files and tasks)