Package com.bc.ceres.swing.update
Interface ModuleManager
-
- All Known Implementing Classes:
DefaultModuleManager
public interface ModuleManager
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
endTransaction()
Clears all recorded method all calls.com.bc.ceres.swing.update.ModuleItem[]
getAvailableModuleItems()
Retrieves the list ofmodule items
which can be installed from the repository.com.bc.ceres.swing.update.ModuleItem[]
getInstalledModuleItems()
Retrieves the list of locally installedmodule items
.Module[]
getInstalledModules()
Retrieves the list of locally installedmodules
.ProxyConfig
getProxyConfig()
Gets the proxy configuration.Module[]
getRepositoryModules(ProgressMonitor pm)
Retrieves the list ofmodules
on the repository.URL
getRepositoryUrl()
Retrieves the repository url.com.bc.ceres.swing.update.ModuleItem[]
getUpdatableModuleItems()
Retrieves the list of localmodule items
which can be updated by modules from the repository.Module
installModule(Module newModule, ProgressMonitor pm)
Performs an installation of a new module.void
rollbackTransaction()
Makes all recorded method calls undone.void
startTransaction()
After calling this method all calls toinstallModule()
,updateModule()
anduninstallModule()
are recorded.void
synchronizeWithRepository(ProgressMonitor pm)
Synchronizes the this module manager with the specified repository.void
uninstallModule(Module oldModule, ProgressMonitor pm)
* Performs an uninstallation of an existing module.Module
updateModule(Module oldModule, Module newModule, ProgressMonitor pm)
Performs an update to a higher version of an existing module.
-
-
-
Method Detail
-
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
Module[] getRepositoryModules(ProgressMonitor pm) throws CoreException
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
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 therepository 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:
startTransaction()
,endTransaction()
,rollbackTransaction()
-
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:
startTransaction()
,endTransaction()
,rollbackTransaction()
-
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()
,endTransaction()
,rollbackTransaction()
-
startTransaction
void startTransaction()
After calling this method all calls toinstallModule()
,updateModule()
anduninstallModule()
are recorded.- See Also:
endTransaction()
,rollbackTransaction()
-
endTransaction
void endTransaction()
Clears all recorded method all calls.- See Also:
startTransaction()
,rollbackTransaction()
-
rollbackTransaction
void rollbackTransaction()
Makes all recorded method calls undone.- See Also:
startTransaction()
,endTransaction()
-
-