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 TypeMethodDescriptionvoid
Clears all recorded method all calls.com.bc.ceres.swing.update.ModuleItem[]
Retrieves the list ofmodule items
which 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 ofmodules
on the repository.Retrieves the repository url.com.bc.ceres.swing.update.ModuleItem[]
Retrieves the list of localmodule items
which can be updated by modules from the repository.installModule
(Module newModule, ProgressMonitor pm) Performs an installation of a new module.void
Makes all recorded method calls undone.void
setProxyConfig
(ProxyConfig proxyConfig) void
setRepositoryUrl
(URL repositoryUrl) void
After calling this method all calls toinstallModule()
,updateModule()
anduninstallModule()
are recorded.void
Synchronizes the this module manager with the specified repository.void
uninstallModule
(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:ModuleManager
Retrieves the repository url.- Specified by:
getRepositoryUrl
in interfaceModuleManager
- Returns:
- An url which points to the module repository, might be
null
if not already set.
-
setRepositoryUrl
-
getProxyConfig
Description copied from interface:ModuleManager
Gets the proxy configuration.- Specified by:
getProxyConfig
in interfaceModuleManager
- Returns:
- A configuration used when the connection uses a proxy, might be
null
if not already set.
-
setProxyConfig
-
getInstalledModules
Description copied from interface:ModuleManager
Retrieves the list of locally installedmodules
.- Specified by:
getInstalledModules
in interfaceModuleManager
- Returns:
- An array of locally installed modules.
-
getRepositoryModules
Description copied from interface:ModuleManager
Retrieves the list ofmodules
on the repository.- Specified by:
getRepositoryModules
in 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:ModuleManager
Retrieves the list of locally installedmodule items
.- Specified by:
getInstalledModuleItems
in interfaceModuleManager
- Returns:
- An array of locally installed modules.
-
getUpdatableModuleItems
public com.bc.ceres.swing.update.ModuleItem[] getUpdatableModuleItems()Description copied from interface:ModuleManager
Retrieves the list of localmodule items
which can be updated by modules from the repository. Will return an empty array untilModuleManager.synchronizeWithRepository(ProgressMonitor)
is called.- Specified by:
getUpdatableModuleItems
in interfaceModuleManager
- Returns:
- An array of updatable modules.
-
getAvailableModuleItems
public com.bc.ceres.swing.update.ModuleItem[] getAvailableModuleItems()Description copied from interface:ModuleManager
Retrieves the list ofmodule items
which can be installed from the repository. Will return an empty array untilModuleManager.synchronizeWithRepository(ProgressMonitor)
is called.- Specified by:
getAvailableModuleItems
in interfaceModuleManager
- Returns:
- An array of available modules.
-
synchronizeWithRepository
Description copied from interface:ModuleManager
Synchronizes the this module manager with the specified repository.- Specified by:
synchronizeWithRepository
in interfaceModuleManager
- Parameters:
pm
- Can be used to indicate progress- Throws:
CoreException
- It is thrown if therepository url
is not set or an IO-Error occures.
-
installModule
Description copied from interface:ModuleManager
Performs an installation of a new module.- Specified by:
installModule
in 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:ModuleManager
Performs an update to a higher version of an existing module.- Specified by:
updateModule
in 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:
uninstallModule
in 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:ModuleManager
After calling this method all calls toinstallModule()
,updateModule()
anduninstallModule()
are recorded.- Specified by:
startTransaction
in interfaceModuleManager
- See Also:
-
endTransaction
public void endTransaction()Description copied from interface:ModuleManager
Clears all recorded method all calls.- Specified by:
endTransaction
in interfaceModuleManager
- See Also:
-
rollbackTransaction
public void rollbackTransaction()Description copied from interface:ModuleManager
Makes all recorded method calls undone.- Specified by:
rollbackTransaction
in interfaceModuleManager
- See Also:
-