Class IFileSystem

Direct Known Subclasses:
LocalFileSystem

public abstract class IFileSystem
extends IPublisher
FileSystem component specification.
  • Constructor Details

    • IFileSystem

      public IFileSystem()
  • Method Details

    • saveConfig

      public abstract void saveConfig​(Map<String,​String> config)
      Saves the config map.
      Parameters:
      config - Serializable object.
    • loadConfig

      public abstract Map<String,​String> loadConfig​(String name)
      Loads a serializable object from the given path. In case of error returns null.
      Parameters:
      name - Relative path to load the object from.
      Returns:
      The serializable object or null if error.
    • saveProject

      public abstract boolean saveProject​(Project project)
      Saves the Project and its subtree.
      Parameters:
      project - Project to save.
      Returns:
      True if successful, false otherwise.
    • loadProject

      public abstract Project loadProject​(String filepath)
      Loads the project from the given filepath.
      Parameters:
      filepath - Project filepath.
      Returns:
      Returns project as an IMapNodeComposite if successful, null otherwise.
    • loadProject

      public Project loadProject()
      Loads the most recent project.
      Returns:
      Returns project as an IMapNodeComposite if successful, null otherwise.
    • loadMindMapTemplate

      public abstract MindMap loadMindMapTemplate​(String path)
      Loads the MindMap from the given path.
      Parameters:
      path - Path to the MindMap.
      Returns:
      MindMap if successful, null otherwise.
    • saveMindMapTemplate

      public abstract boolean saveMindMapTemplate​(MindMap mindMap)
      Saves the MindMap and its subtree.
      Parameters:
      mindMap - MindMap to save.
      Returns:
      True if successful, false otherwise.
    • deleteProject

      public abstract boolean deleteProject​(Project p)
      Deletes the passed Project from file system.
      Returns:
      True if successfully deleted, false otherwise.
    • exportMindMap

      public abstract boolean exportMindMap​(MindMap mindMap, RenderedImage renderedImage)
      Exports a rendered mind map.
      Parameters:
      mindMap - Mind map source.
      renderedImage - Mind map render.
      Returns:
      True if successfully exported, false otherwise.
    • loadAddon

      public IAddon loadAddon​(String classname)
      Loads an add-on based on class name.
      Parameters:
      classname - Add-on class name.
      Returns:
      Addon.
    • log

      public abstract void log​(String line)
      Logs a line to the logfile on the file system of implementation.
      Parameters:
      line - Message content.