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.Source
getSource(java.nio.file.Path path)
Get sourceProjectSource
loadProject(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:IProjectManager
Delete a source file from the file system. Take the path fromSource.path
- Specified by:
deleteSource
in 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:
loadProject
in interfaceIProjectManager
- Parameters:
rootDirectory
- rootDirectory of the rootProject- Returns:
-
saveSource
public <S extends Source> void saveSource(S source)
Save the source- Specified by:
saveSource
in interfaceIProjectManager
- Type Parameters:
S
-- Parameters:
source
- the object to save
-
getSource
public Source getSource(java.nio.file.Path path)
Get source- Specified by:
getSource
in interfaceIProjectManager
- Parameters:
path
- of file to convert- Returns:
-
-