Interface IPersistencer
-
- All Known Implementing Classes:
EclipsePersistencer,Persistencer
public interface IPersistencerGeneral interface for different Persistencer plug-ins.- Author:
- El-Sharkawy
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description IProjectCreationResultcreateProject(java.lang.String projectName, java.io.File parentFolder, java.lang.String projectID, boolean lazy)Creates an empty EASy project without any eclipse specific stuff.PathEnvironmentgetPathEnvironment()Returns the path environment for making absolute paths relative and vice versa.java.lang.StringgetProjectID()Returns the ID of a given EASy project.PersistentProjectload()Loads a PersistentProject, which is an EASy project representation, from a storage (file system).voidsave(PLPInfo plp)Saves given PersistentProject to storage.voidupdate()Updates the models in the given project.
-
-
-
Method Detail
-
load
PersistentProject load() throws PersistenceException
Loads a PersistentProject, which is an EASy project representation, from a storage (file system).- Returns:
- The PersistentProject of the project which should be loaded.
- Throws:
PersistenceException- In case of an incorrect data format of the configuration file, this exception will be thrown.
-
save
void save(PLPInfo plp) throws PersistenceException
Saves given PersistentProject to storage.- Parameters:
plp- The project which should be saved- Throws:
PersistenceException- If files cannot be written to the file system.
-
createProject
IProjectCreationResult createProject(java.lang.String projectName, java.io.File parentFolder, java.lang.String projectID, boolean lazy) throws PersistenceException
Creates an empty EASy project without any eclipse specific stuff.- Parameters:
projectName- The name of the project, which should be created.parentFolder- The parentFolder, where the project should be created.projectID- The unique ID of the project which should be created.lazy- iftrue, create only required parts, else assume that project does not exist before- Returns:
- IProjectCreationResult Information of newly created items.
- Throws:
PersistenceException- Will be thrown if the System cannot create folders and files in the parentFolder.
-
getProjectID
java.lang.String getProjectID()
Returns the ID of a given EASy project.- Returns:
- the ID or null if the specified project has no configuration file.
-
update
void update() throws PersistenceExceptionUpdates the models in the given project.- Throws:
PersistenceException- if errors during the update occur
-
getPathEnvironment
PathEnvironment getPathEnvironment()
Returns the path environment for making absolute paths relative and vice versa.- Returns:
- the path environment
-
-