Interface ModuleManager

All Known Implementing Classes:
DefaultModuleManager

public interface ModuleManager
  • Method Details

    • getRepositoryUrl

      URL getRepositoryUrl()
      Retrieves the repository url.
      Returns:
      An url which points to the module repository, might be null if not already set.
    • getProxyConfig

      ProxyConfig getProxyConfig()
      Gets the proxy configuration.
      Returns:
      A configuration used when the connection uses a proxy, might be null if not already set.
    • getInstalledModules

      Module[] getInstalledModules()
      Retrieves the list of locally installed modules.
      Returns:
      An array of locally installed modules.
    • getRepositoryModules

      Module[] getRepositoryModules(ProgressMonitor pm) throws CoreException
      Retrieves the list of modules on the repository.
      Parameters:
      pm - A monitor to inform the user about progress.
      Returns:
      An array of modules on the repository.
      Throws:
      CoreException - if an error occures
    • getInstalledModuleItems

      com.bc.ceres.swing.update.ModuleItem[] getInstalledModuleItems()
      Retrieves the list of locally installed module items.
      Returns:
      An array of locally installed modules.
      Since:
      0.6.1
    • getUpdatableModuleItems

      com.bc.ceres.swing.update.ModuleItem[] getUpdatableModuleItems()
      Retrieves the list of local module items which can be updated by modules from the repository. Will return an empty array until synchronizeWithRepository(ProgressMonitor) is called.
      Returns:
      An array of updatable modules.
      Since:
      0.6.1
    • getAvailableModuleItems

      com.bc.ceres.swing.update.ModuleItem[] getAvailableModuleItems()
      Retrieves the list of module items which can be installed from the repository. Will return an empty array until synchronizeWithRepository(ProgressMonitor) is called.
      Returns:
      An array of available modules.
      Since:
      0.6.1
    • synchronizeWithRepository

      void synchronizeWithRepository(ProgressMonitor pm) throws CoreException
      Synchronizes the this module manager with the specified repository.
      Parameters:
      pm - Can be used to indicate progress
      Throws:
      CoreException - It is thrown if the repository url is not set or an IO-Error occures.
      Since:
      0.6.1
    • installModule

      Module installModule(Module newModule, ProgressMonitor pm) throws CoreException
      Performs an installation of a new module.
      Parameters:
      newModule - The module to be installed.
      pm - A monitor to inform the user about progress.
      Returns:
      The installed module.
      Throws:
      CoreException - if an error occures
      See Also:
    • updateModule

      Module updateModule(Module oldModule, Module newModule, ProgressMonitor pm) throws CoreException
      Performs an update to a higher version of an existing module.
      Parameters:
      oldModule - The module to be replaced by an newer one.
      newModule - The new module to be installed.
      pm - A monitor to inform the user about progress.
      Returns:
      The installed module.
      Throws:
      CoreException - if an error occures
      See Also:
    • uninstallModule

      void uninstallModule(Module oldModule, ProgressMonitor pm) throws CoreException
      * Performs an uninstallation of an existing module.
      Parameters:
      oldModule - The module to be removed.
      pm - A monitor to inform the user about progress.
      Throws:
      CoreException - if an error occures.
      See Also:
    • startTransaction

      void startTransaction()
      After calling this method all calls to installModule(), updateModule() and uninstallModule() are recorded.
      See Also:
    • endTransaction

      void endTransaction()
      Clears all recorded method all calls.
      See Also:
    • rollbackTransaction

      void rollbackTransaction()
      Makes all recorded method calls undone.
      See Also: