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 booleandeleteProject(Project p)Deletes the passedProjectfrom file system.abstract booleanexportMindMap(MindMap mindMap, RenderedImage renderedImage)Exports a rendered mind map.IAddonloadAddon(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 MindMaploadMindMapTemplate(String path)Loads theMindMapfrom the given path.ProjectloadProject()Loads the most recent project.abstract ProjectloadProject(String filepath)Loads the project from the given filepath.abstract voidlog(String line)Logs a line to the logfile on the file system of implementation.abstract voidsaveConfig(Map<String,String> config)Saves the config map.abstract booleansaveMindMapTemplate(MindMap mindMap)Saves theMindMapand its subtree.abstract booleansaveProject(Project project)Saves theProjectand its subtree.Methods inherited from class rs.edu.raf.dsw.rudok.app.observer.IPublisher
addObserver, getObservers, publish, removeObserver, setObserversMethods inherited from class rs.edu.raf.dsw.rudok.app.observer.IPublisherGlobal
addObserverGlobal, getObserversGlobal, removeObserverGlobalMethods 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 theProjectand its subtree.- Parameters:
project-Projectto 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 theMindMapfrom the given path. -
saveMindMapTemplate
Saves theMindMapand its subtree.- Parameters:
mindMap-MindMapto save.- Returns:
- True if successful, false otherwise.
-
deleteProject
Deletes the passedProjectfrom 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.
-