Package com.bc.ceres.swing.update
Class DefaultModuleManager
java.lang.Object
com.bc.ceres.swing.update.DefaultModuleManager
- All Implemented Interfaces:
ModuleManager
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClears all recorded method all calls.com.bc.ceres.swing.update.ModuleItem[]Retrieves the list ofmodule itemswhich can be installed from the repository.com.bc.ceres.swing.update.ModuleItem[]Retrieves the list of locally installedmodule items.Module[]Retrieves the list of locally installedmodules.Gets the proxy configuration.Module[]Retrieves the list ofmoduleson the repository.Retrieves the repository url.com.bc.ceres.swing.update.ModuleItem[]Retrieves the list of localmodule itemswhich can be updated by modules from the repository.installModule(Module newModule, ProgressMonitor pm) Performs an installation of a new module.voidMakes all recorded method calls undone.voidsetProxyConfig(ProxyConfig proxyConfig) voidsetRepositoryUrl(URL repositoryUrl) voidAfter calling this method all calls toinstallModule(),updateModule()anduninstallModule()are recorded.voidSynchronizes the this module manager with the specified repository.voiduninstallModule(Module oldModule, ProgressMonitor pm) * Performs an uninstallation of an existing module.updateModule(Module oldModule, Module newModule, ProgressMonitor pm) Performs an update to a higher version of an existing module.
-
Constructor Details
-
DefaultModuleManager
public DefaultModuleManager() -
DefaultModuleManager
-
-
Method Details
-
getRepositoryUrl
Description copied from interface:ModuleManagerRetrieves the repository url.- Specified by:
getRepositoryUrlin interfaceModuleManager- Returns:
- An url which points to the module repository, might be
nullif not already set.
-
setRepositoryUrl
-
getProxyConfig
Description copied from interface:ModuleManagerGets the proxy configuration.- Specified by:
getProxyConfigin interfaceModuleManager- Returns:
- A configuration used when the connection uses a proxy, might be
nullif not already set.
-
setProxyConfig
-
getInstalledModules
Description copied from interface:ModuleManagerRetrieves the list of locally installedmodules.- Specified by:
getInstalledModulesin interfaceModuleManager- Returns:
- An array of locally installed modules.
-
getRepositoryModules
Description copied from interface:ModuleManagerRetrieves the list ofmoduleson the repository.- Specified by:
getRepositoryModulesin interfaceModuleManager- 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
public com.bc.ceres.swing.update.ModuleItem[] getInstalledModuleItems()Description copied from interface:ModuleManagerRetrieves the list of locally installedmodule items.- Specified by:
getInstalledModuleItemsin interfaceModuleManager- Returns:
- An array of locally installed modules.
-
getUpdatableModuleItems
public com.bc.ceres.swing.update.ModuleItem[] getUpdatableModuleItems()Description copied from interface:ModuleManagerRetrieves the list of localmodule itemswhich can be updated by modules from the repository. Will return an empty array untilModuleManager.synchronizeWithRepository(ProgressMonitor)is called.- Specified by:
getUpdatableModuleItemsin interfaceModuleManager- Returns:
- An array of updatable modules.
-
getAvailableModuleItems
public com.bc.ceres.swing.update.ModuleItem[] getAvailableModuleItems()Description copied from interface:ModuleManagerRetrieves the list ofmodule itemswhich can be installed from the repository. Will return an empty array untilModuleManager.synchronizeWithRepository(ProgressMonitor)is called.- Specified by:
getAvailableModuleItemsin interfaceModuleManager- Returns:
- An array of available modules.
-
synchronizeWithRepository
Description copied from interface:ModuleManagerSynchronizes the this module manager with the specified repository.- Specified by:
synchronizeWithRepositoryin interfaceModuleManager- Parameters:
pm- Can be used to indicate progress- Throws:
CoreException- It is thrown if therepository urlis not set or an IO-Error occures.
-
installModule
Description copied from interface:ModuleManagerPerforms an installation of a new module.- Specified by:
installModulein interfaceModuleManager- 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
public Module updateModule(Module oldModule, Module newModule, ProgressMonitor pm) throws CoreException Description copied from interface:ModuleManagerPerforms an update to a higher version of an existing module.- Specified by:
updateModulein interfaceModuleManager- 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
Description copied from interface:ModuleManager* Performs an uninstallation of an existing module.- Specified by:
uninstallModulein interfaceModuleManager- 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
public void startTransaction()Description copied from interface:ModuleManagerAfter calling this method all calls toinstallModule(),updateModule()anduninstallModule()are recorded.- Specified by:
startTransactionin interfaceModuleManager- See Also:
-
endTransaction
public void endTransaction()Description copied from interface:ModuleManagerClears all recorded method all calls.- Specified by:
endTransactionin interfaceModuleManager- See Also:
-
rollbackTransaction
public void rollbackTransaction()Description copied from interface:ModuleManagerMakes all recorded method calls undone.- Specified by:
rollbackTransactionin interfaceModuleManager- See Also:
-