Package ch.zhaw.tasklist.logic
Class ProjectManager
- java.lang.Object
-
- ch.zhaw.tasklist.logic.ProjectManager
-
- All Implemented Interfaces:
IProjectManager
public class ProjectManager extends java.lang.Object implements IProjectManager
Manages a tasklist project / directory.
-
-
Constructor Summary
Constructors Constructor Description ProjectManager()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <S extends Source>
voiddeleteSource(S source)Delete a source file from the file system.SourcegetSource(java.nio.file.Path path)Get sourceProjectSourceloadProject(java.nio.file.Path rootDirectory)Load the project from the directory<S extends Source>
voidsaveSource(S source)Save the source
-
-
-
Method Detail
-
deleteSource
public <S extends Source> void deleteSource(S source)
Description copied from interface:IProjectManagerDelete a source file from the file system. Take the path fromSource.path- Specified by:
deleteSourcein interfaceIProjectManager- Type Parameters:
S- type of the source object- Parameters:
source- the object to delete
-
loadProject
public ProjectSource loadProject(java.nio.file.Path rootDirectory)
Load the project from the directory- Specified by:
loadProjectin interfaceIProjectManager- Parameters:
rootDirectory- rootDirectory of the rootProject- Returns:
-
saveSource
public <S extends Source> void saveSource(S source)
Save the source- Specified by:
saveSourcein interfaceIProjectManager- Type Parameters:
S-- Parameters:
source- the object to save
-
getSource
public Source getSource(java.nio.file.Path path)
Get source- Specified by:
getSourcein interfaceIProjectManager- Parameters:
path- of file to convert- Returns:
-
-