public class ModuleManagerImpl extends Object implements ModuleManager, ReadOnlyModeCapable
| Constructor and Description |
|---|
ModuleManagerImpl() |
| Modifier and Type | Method and Description |
|---|---|
OperationResult |
applyBundlesPersistentStates(String target)
Restores persistent state of all bundles from the internal storage.
|
Map<String,Map<String,BundleService.BundleInformation>> |
getAllInfos(String target)
Get info about all installed bundles.
|
Map<String,BundleService.BundleInformation> |
getAllLocalInfos()
Get local info about all installed bundles.
|
Map<String,Map<String,BundleService.BundleInformation>> |
getBucketInfos(String bundleBucketKey,
String target)
Get info about multiple bundles belonging to a single bundle bucket.
|
Map<String,BundleService.BundleInformation> |
getBucketLocalInfos(String bundleBucketKey)
Get local info about multiple bundles belonging to a single bundle bucket.
|
Map<String,BundleService.BundleInformation> |
getInfo(String bundleKey,
String target)
Get info about a bundle.
|
Map<String,Map<String,BundleService.BundleInformation>> |
getInfos(Collection<String> bundleKeys,
String target)
Get info about multiple bundles.
|
BundleService.BundleInformation |
getLocalInfo(String bundleKey)
Get local info about a bundle.
|
BundleState |
getLocalState(String bundleKey)
Get current local state of a bundle.
|
int |
getReadOnlyModePriority()
Get the priority of the service.
|
OperationResult |
install(Collection<org.springframework.core.io.Resource> bundleResources,
String target,
boolean start)
Install specified bundles on the target group of cluster nodes, optionally starting them right after.
|
OperationResult |
install(org.springframework.core.io.Resource bundleResource,
String target)
Install the specified bundle on the target group of cluster nodes.
|
OperationResult |
install(org.springframework.core.io.Resource bundleResource,
String target,
boolean start)
Install the specified bundle on the target group of cluster nodes, optionally starting it right after.
|
OperationResult |
refresh(String bundleKey,
String target)
Refresh the specified bundle on the target group of cluster nodes.
|
void |
setBundleService(BundleService bundleService)
Injects an instance of the bundle service.
|
void |
setPersister(BundlePersister persister)
Injects an instance of the bundle persister.
|
void |
setTemplateManagerService(JahiaTemplateManagerService templateManagerService) |
OperationResult |
start(String bundleKey,
String target)
Start the specified bundle on the target group of cluster nodes.
|
OperationResult |
stop(String bundleKey,
String target)
Stop the specified bundle on the target group of cluster nodes.
|
Collection<BundlePersistentInfo> |
storeAllLocalPersistentStates()
Store persistent state of all bundles in the internal storage for the purpose of restore in the future.
|
void |
switchReadOnlyMode(boolean enable)
Enable/disable read-only mode for a specific functional area this ReadOnlyModeCapable is responsible for.
|
OperationResult |
uninstall(String bundleKey,
String target)
Uninstall the specified bundle on the target group of cluster nodes.
|
OperationResult |
update(String bundleKey,
String target)
Update the specified bundle on the target group of cluster nodes.
|
public OperationResult install(org.springframework.core.io.Resource bundleResource, String target)
ModuleManagerinstall in interface ModuleManagerbundleResource - The resource representing a bundle to installtarget - The group of cluster nodes targeted by the install operation (see class JavaDoc for the supported values)public OperationResult install(org.springframework.core.io.Resource bundleResource, String target, boolean start)
ModuleManagerinstall in interface ModuleManagerbundleResource - The resource, representing a bundle to installtarget - The group of cluster nodes targeted by the install operation (see BundleService class JavaDoc)start - Whether the installed bundle should be started right awaypublic OperationResult install(Collection<org.springframework.core.io.Resource> bundleResources, String target, boolean start)
ModuleManagerinstall in interface ModuleManagerbundleResources - A collection of resources, representing bundles to installtarget - The group of cluster nodes targeted by the install operation (see BundleService class JavaDoc)start - Whether installed bundles should be started right awaypublic void setBundleService(BundleService bundleService)
bundleService - an instance of the bundle servicepublic void setPersister(BundlePersister persister)
persister - an instance of the bundle persisterpublic OperationResult start(String bundleKey, String target)
ModuleManagerstart in interface ModuleManagerbundleKey - Bundle key to start (see class JavaDoc for the supported key format)target - The group of cluster nodes targeted by the start operation (see BundleService class JavaDoc)public OperationResult stop(String bundleKey, String target)
ModuleManagerstop in interface ModuleManagerbundleKey - Bundle key to stop (see class JavaDoc for the supported key format)target - The group of cluster nodes targeted by the stop operation (see BundleService class JavaDoc)public OperationResult uninstall(String bundleKey, String target)
ModuleManageruninstall in interface ModuleManagerbundleKey - Bundle key to uninstall (see class JavaDoc for the supported key format)target - The group of cluster nodes targeted by the uninstall operation (see BundleService class JavaDoc)public OperationResult refresh(String bundleKey, String target)
ModuleManagerrefresh in interface ModuleManagerbundleKey - Bundle key to refresh (see class JavaDoc for the supported key format)target - The group of cluster nodes targeted by the refresh operation (see BundleService class JavaDoc)public OperationResult update(String bundleKey, String target)
ModuleManagerupdate in interface ModuleManagerbundleKey - Bundle key to update (see class JavaDoc for the supported key format)target - The group of cluster nodes targeted by the update operation (see BundleService class JavaDoc)public Map<String,BundleService.BundleInformation> getInfo(String bundleKey, String target)
ModuleManagergetInfo in interface ModuleManagerbundleKey - Bundle key (see class JavaDoc for the supported key format; note that bundle version is required)target - The group of cluster nodes to get info from (see BundleService class JavaDoc)public Map<String,Map<String,BundleService.BundleInformation>> getInfos(Collection<String> bundleKeys, String target)
ModuleManagergetInfos in interface ModuleManagerbundleKeys - Bundle keys (see class JavaDoc for the supported key format; note that bundle version is required)target - The group of cluster nodes to get info from (see BundleService class JavaDoc)public Map<String,Map<String,BundleService.BundleInformation>> getBucketInfos(String bundleBucketKey, String target)
ModuleManagergetBucketInfos in interface ModuleManagerbundleBucketKey - Bundle bucket keytarget - The group of cluster nodes to get info from (see BundleService class JavaDoc)public Map<String,Map<String,BundleService.BundleInformation>> getAllInfos(String target)
ModuleManagergetAllInfos in interface ModuleManagertarget - The group of cluster nodes to get info from (see BundleService class JavaDoc)public BundleState getLocalState(String bundleKey)
ModuleManagergetLocalState in interface ModuleManagerbundleKey - Bundle key (see class JavaDoc for the supported key format; note that bundle version is required)public BundleService.BundleInformation getLocalInfo(String bundleKey)
ModuleManagergetLocalInfo in interface ModuleManagerbundleKey - Bundle key (see class JavaDoc for the supported key format; note that bundle version is required)public Map<String,BundleService.BundleInformation> getBucketLocalInfos(String bundleBucketKey)
ModuleManagergetBucketLocalInfos in interface ModuleManagerbundleBucketKey - Bundle bucket keypublic Map<String,BundleService.BundleInformation> getAllLocalInfos()
ModuleManagergetAllLocalInfos in interface ModuleManagerpublic void setTemplateManagerService(JahiaTemplateManagerService templateManagerService)
public void switchReadOnlyMode(boolean enable)
ReadOnlyModeCapableswitchReadOnlyMode in interface ReadOnlyModeCapableenable - true in case the read-only mode should be enabled; false otherwisepublic int getReadOnlyModePriority()
ReadOnlyModeCapablegetReadOnlyModePriority in interface ReadOnlyModeCapablepublic Collection<BundlePersistentInfo> storeAllLocalPersistentStates()
ModuleManagerstoreAllLocalPersistentStates in interface ModuleManagerpublic OperationResult applyBundlesPersistentStates(String target)
ModuleManagerapplyBundlesPersistentStates in interface ModuleManagertarget - The group of cluster nodes targeted by this operation (see BundleService class JavaDoc)Copyright © 2004–2020 Jahia Solutions Group SA. All rights reserved.