Class IFileSystem
java.lang.Object
rs.edu.raf.dsw.rudok.app.observer.IObserver
rs.edu.raf.dsw.rudok.app.observer.IPublisherGlobal
rs.edu.raf.dsw.rudok.app.observer.IPublisher
rs.edu.raf.dsw.rudok.app.filesystem.IFileSystem
- Direct Known Subclasses:
LocalFileSystem
public abstract class IFileSystem extends IPublisher
FileSystem component specification.
-
Constructor Summary
Constructors Constructor Description IFileSystem()
-
Method Summary
Modifier and Type Method Description abstract boolean
deleteProject(Project p)
Deletes the passedProject
from file system.abstract boolean
exportMindMap(MindMap mindMap, RenderedImage renderedImage)
Exports a rendered mind map.IAddon
loadAddon(String classname)
Loads an add-on based on class name.abstract Map<String,String>
loadConfig(String name)
Loads a serializable object from the given path.abstract MindMap
loadMindMapTemplate(String path)
Loads theMindMap
from the given path.Project
loadProject()
Loads the most recent project.abstract Project
loadProject(String filepath)
Loads the project from the given filepath.abstract void
log(String line)
Logs a line to the logfile on the file system of implementation.abstract void
saveConfig(Map<String,String> config)
Saves the config map.abstract boolean
saveMindMapTemplate(MindMap mindMap)
Saves theMindMap
and its subtree.abstract boolean
saveProject(Project project)
Saves theProject
and its subtree.Methods inherited from class rs.edu.raf.dsw.rudok.app.observer.IPublisher
addObserver, getObservers, publish, removeObserver, setObservers
Methods inherited from class rs.edu.raf.dsw.rudok.app.observer.IPublisherGlobal
addObserverGlobal, getObserversGlobal, removeObserverGlobal
Methods inherited from class rs.edu.raf.dsw.rudok.app.observer.IObserver
addPublisher, getPublishers, receive, removePublisher, setPublishers
-
Constructor Details
-
IFileSystem
public IFileSystem()
-
-
Method Details
-
saveConfig
Saves the config map.- Parameters:
config
- Serializable object.
-
loadConfig
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
Saves theProject
and its subtree.- Parameters:
project
-Project
to save.- Returns:
- True if successful, false otherwise.
-
loadProject
Loads the project from the given filepath.- Parameters:
filepath
- Project filepath.- Returns:
- Returns project as an IMapNodeComposite if successful, null otherwise.
-
loadProject
Loads the most recent project.- Returns:
- Returns project as an IMapNodeComposite if successful, null otherwise.
-
loadMindMapTemplate
Loads theMindMap
from the given path. -
saveMindMapTemplate
Saves theMindMap
and its subtree.- Parameters:
mindMap
-MindMap
to save.- Returns:
- True if successful, false otherwise.
-
deleteProject
Deletes the passedProject
from file system.- Returns:
- True if successfully deleted, false otherwise.
-
exportMindMap
Exports a rendered mind map.- Parameters:
mindMap
- Mind map source.renderedImage
- Mind map render.- Returns:
- True if successfully exported, false otherwise.
-
loadAddon
Loads an add-on based on class name.- Parameters:
classname
- Add-on class name.- Returns:
- Addon.
-
log
Logs a line to the logfile on the file system of implementation.- Parameters:
line
- Message content.
-