Interface ProjectPersistenceManager
-
- All Known Implementing Classes:
ProjectsManager
@OpenApiAll public interface ProjectPersistenceManager
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description void
exportModule(Project prj, java.util.Collection packages, java.lang.String description, ProjectDescriptor module)
Exports given packages from project into given module.void
importModule(Project prj, ProjectDescriptor prjDescriptor)
Loads module by value into given project.boolean
importProject(ProjectDescriptor pd)
Imports given project into the current project by value.void
loadProject(ProjectDescriptor descriptor, boolean silent)
Deprecated.void
loadProject(ProjectDescriptor descriptor, ProgressStatus status)
Loads given projectvoid
reloadModule(Project project, ProjectDescriptor projectDescriptor)
Reloads module.boolean
saveModule(Project project, com.nomagic.ci.persistence.IAttachedProject module, boolean silent, boolean temporal)
boolean
saveModule(Project project, com.nomagic.ci.persistence.IAttachedProject module, boolean displayDependenciesDialog, ProgressStatus status)
Saves module.boolean
saveModule(Project project, com.nomagic.ci.persistence.IAttachedProject module, boolean displayDependenciesDialog, ProgressStatus status, boolean temporalSave)
Saves module.boolean
saveProject(ProjectDescriptor descriptor, boolean silent)
Deprecated.boolean
saveProject(ProjectDescriptor descriptor, ProgressStatus status, boolean silent)
Saves or commits project.void
unloadModule(Project project, ProjectDescriptor descriptor)
Removes unreferenced elements from this module, and makes module not loaded.boolean
useModule(Project prj, ProjectDescriptor module)
Loads module by reference into given project.
-
-
-
Method Detail
-
loadProject
@Deprecated void loadProject(ProjectDescriptor descriptor, boolean silent)
Deprecated.
-
loadProject
void loadProject(ProjectDescriptor descriptor, ProgressStatus status)
Loads given project- Parameters:
descriptor
- project to load.status
- status to display progress
-
saveProject
@Deprecated boolean saveProject(ProjectDescriptor descriptor, boolean silent)
Deprecated.
-
saveProject
boolean saveProject(ProjectDescriptor descriptor, ProgressStatus status, boolean silent)
Saves or commits project.- Parameters:
descriptor
- descriptor of project to save.status
- status to display operation status.silent
- true if no gui should be shown durring save/commmit- Returns:
- false if saving fails.
-
saveModule
@Deprecated boolean saveModule(Project project, com.nomagic.ci.persistence.IAttachedProject module, boolean silent, boolean temporal)
-
saveModule
boolean saveModule(Project project, com.nomagic.ci.persistence.IAttachedProject module, boolean displayDependenciesDialog, ProgressStatus status)
Saves module. Local module will be saved to the disk, teamwork committed. For teamwork module it is not recommended to use this method directly.- Parameters:
project
- projectmodule
- module to save/commit.displayDependenciesDialog
- displays dependencies dialog if there are bad dependencies. To turn off dependency checkingstatus
- progress status which display status of current operation. @return false if operation fails.
-
saveModule
boolean saveModule(Project project, com.nomagic.ci.persistence.IAttachedProject module, boolean displayDependenciesDialog, ProgressStatus status, boolean temporalSave)
Saves module. Local module will be saved to the disk, teamwork committed. For teamwork module it is not recommended to use this method directly.- Parameters:
project
- projectmodule
- module to save/commit.displayDependenciesDialog
- displays dependencies dialog if there are bad dependencies. To turn off dependency checkingstatus
- progress status which display status of current operation. @return false if operation fails.
-
reloadModule
void reloadModule(Project project, ProjectDescriptor projectDescriptor)
Reloads module.- Parameters:
project
- the project.projectDescriptor
- the ProjectDescriptor of the module.
-
useModule
boolean useModule(Project prj, ProjectDescriptor module)
Loads module by reference into given project.- Parameters:
prj
- the project.module
- the ProjectDescriptor of the module.- Returns:
- result of operation
-
unloadModule
void unloadModule(Project project, ProjectDescriptor descriptor)
Removes unreferenced elements from this module, and makes module not loaded.- Parameters:
project
- projectdescriptor
- module descriptor
-
importModule
void importModule(Project prj, ProjectDescriptor prjDescriptor) throws ReadOnlyElementException
Loads module by value into given project.- Parameters:
prj
- the project.prjDescriptor
- the ProjectDescriptor of the module.- Throws:
ReadOnlyElementException
- if user has no rights to perform this action.
-
exportModule
void exportModule(Project prj, java.util.Collection packages, java.lang.String description, ProjectDescriptor module) throws java.io.IOException, ReadOnlyModuleException
Exports given packages from project into given module.- Parameters:
prj
- the project.packages
- the packages from given project. These packages will become roots of the given module.description
- the description of module(if null or zero length, description will not be generated).module
- the ProjectDescriptor of the module. Current implementation supports only LocalProjectDescriptor.- Throws:
ReadOnlyModuleException
- if trying export package which is already in module and this module is read onlyjava.io.IOException
java.lang.IllegalStateException
- if given packages have dependencies.
-
importProject
boolean importProject(ProjectDescriptor pd)
Imports given project into the current project by value. Does the same as File-Import MagicDraw Project- Parameters:
pd
- Project descriptor to import.- Returns:
- true if operation was successful.
-
-