Package com.bc.ceres.swing.update
Interface ModuleManager
- All Known Implementing Classes:
DefaultModuleManager
public interface ModuleManager
-
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
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.
-
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 installedmodules
.- Returns:
- An array of locally installed modules.
-
getRepositoryModules
Retrieves the list ofmodules
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 installedmodule items
.- Returns:
- An array of locally installed modules.
- Since:
- 0.6.1
-
getUpdatableModuleItems
com.bc.ceres.swing.update.ModuleItem[] getUpdatableModuleItems()Retrieves the list of localmodule items
which can be updated by modules from the repository. Will return an empty array untilsynchronizeWithRepository(ProgressMonitor)
is called.- Returns:
- An array of updatable modules.
- Since:
- 0.6.1
-
getAvailableModuleItems
com.bc.ceres.swing.update.ModuleItem[] getAvailableModuleItems()Retrieves the list ofmodule items
which can be installed from the repository. Will return an empty array untilsynchronizeWithRepository(ProgressMonitor)
is called.- Returns:
- An array of available modules.
- Since:
- 0.6.1
-
synchronizeWithRepository
Synchronizes the this module manager with the specified repository.- Parameters:
pm
- Can be used to indicate progress- Throws:
CoreException
- It is thrown if therepository url
is not set or an IO-Error occures.- Since:
- 0.6.1
-
installModule
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
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
* 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 toinstallModule()
,updateModule()
anduninstallModule()
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:
-