Interface ProjectPersistenceManager

All Known Implementing Classes:
ProjectsManager

@OpenApiAll public interface ProjectPersistenceManager
  • Method Details

    • loadProject

      @Deprecated void loadProject(ProjectDescriptor descriptor, boolean silent)
    • 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)
    • 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 - project
      module - module to save/commit.
      displayDependenciesDialog - displays dependencies dialog if there are bad dependencies. To turn off dependency checking
      status - 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 - project
      module - module to save/commit.
      displayDependenciesDialog - displays dependencies dialog if there are bad dependencies. To turn off dependency checking
      status - 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 - project
      descriptor - 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, Collection packages, String description, ProjectDescriptor module) throws 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 only
      IOException
      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.