public class ModuleDeploymentService extends Object implements ClusterMessageAware
| Modifier and Type | Field and Description |
|---|---|
protected ClusterService |
clusterService |
static String |
DEFAULT_PERSISTED_EXTENSION |
| Constructor and Description |
|---|
ModuleDeploymentService() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addModuleToExtension(String xmlFragment)
Adds a module to the requested extension.
|
void |
clearCurrentThreadErrors() |
boolean |
deleteModuleDeployment(ModuleDeployment moduleDeploymentToDelete)
Deletes the supplied
ModuleDeployment and returns the associated ExtensionModule to the list of
undeployed modules. |
boolean |
deleteModuleFromExtension(String moduleId)
Deletes the requested module from the extension with the supplied id.
|
String |
getClusterMessageType()
The unique message cluster Type ID that this bean deals with and posts using.
|
List<String> |
getCurrentThreadErrors()
Returns the current errors for the current thread.
|
List<ModuleDeployment> |
getDeployedModules()
Returns the list of configured ModuleDeployments.
|
Date |
getLastConfigurationUpdate() |
ModelObjectService |
getModelObjectService() |
Extension |
getPersistedExtension()
Retrieves the remotely persisted
Extension instance with the id specified by the DEFAULT_PERSISTED_EXTENSION
constant. |
List<ExtensionModule> |
getUndeployedModules()
Retrieves the list of configured by undeployed extension modules.
|
void |
onClusterMessage(Map<String,Serializable> payload)
Called by a ClusterService implementation when a message for this bean has been sent to
this cluster node and is ready to be processed by the handler based on the bean message
type as supplied in getClusterMessageType().
|
void |
setClusterService(ClusterService service)
Called by a ClusterService implementation to set a ClusterService for this bean to use.
|
void |
setDeployedModules(List<org.json.JSONObject> modulesToDeploy)
This method is provided with the purpose of servicing the WebScript API that controls module deployment.
|
void |
setModelObjectService(ModelObjectService modelObjectService) |
void |
setWebFrameworkConfiguration(WebFrameworkConfigElement webFrameworkConfiguration)
This method is required in order for the Spring application context to set the
WebFrameworkConfigElement required to
detect the module deployment mode. |
void |
setWebScriptRegistry(org.springframework.extensions.webscripts.Registry webScriptRegistry) |
boolean |
updateModuleToExtension(String xmlFragment)
Updates a module to the requested extension.
|
public static final String DEFAULT_PERSISTED_EXTENSION
protected ClusterService clusterService
public void setWebFrameworkConfiguration(WebFrameworkConfigElement webFrameworkConfiguration)
This method is required in order for the Spring application context to set the WebFrameworkConfigElement required to
detect the module deployment mode.
webFrameworkConfiguration - WebFrameworkConfigElementpublic ModelObjectService getModelObjectService()
public void setModelObjectService(ModelObjectService modelObjectService)
public void setWebScriptRegistry(org.springframework.extensions.webscripts.Registry webScriptRegistry)
public Date getLastConfigurationUpdate()
public List<String> getCurrentThreadErrors()
Returns the current errors for the current thread. This typically is used to report any save errors.
public void clearCurrentThreadErrors()
public Extension getPersistedExtension() throws ModelObjectPersisterException
Retrieves the remotely persisted Extension instance with the id specified by the DEFAULT_PERSISTED_EXTENSION
constant. If the Extension cannot be found then it is created and saved.
ModelObjectPersisterExceptionpublic boolean addModuleToExtension(String xmlFragment) throws org.dom4j.DocumentException, ModelObjectPersisterException
Adds a module to the requested extension. This extension is remotely persisted and can have modules added to and removed from it without restarting the server.
xmlFragment - StringModelObjectPersisterExceptionorg.dom4j.DocumentExceptionpublic boolean updateModuleToExtension(String xmlFragment) throws org.dom4j.DocumentException, ModelObjectPersisterException
Updates a module to the requested extension. This extension is remotely persisted and can have modules added to and removed from it without restarting the server.
xmlFragment - StringModelObjectPersisterExceptionorg.dom4j.DocumentExceptionpublic boolean deleteModuleFromExtension(String moduleId) throws ModelObjectPersisterException, org.dom4j.DocumentException
Deletes the requested module from the extension with the supplied id.
moduleId - StringModelObjectPersisterExceptionorg.dom4j.DocumentExceptionpublic List<ExtensionModule> getUndeployedModules()
Retrieves the list of configured by undeployed extension modules.
public List<ModuleDeployment> getDeployedModules()
Returns the list of configured ModuleDeployments. This is the configured ordered list referencing modules that contain configured overrides (rather than their defaults).
public void setDeployedModules(List<org.json.JSONObject> modulesToDeploy) throws org.json.JSONException
This method is provided with the purpose of servicing the WebScript API that controls module deployment. It takes as an argument a String array of the modules that the admin has configured to deploy in the order that they should be processed.
modulesToDeploy - Listorg.json.JSONExceptionpublic boolean deleteModuleDeployment(ModuleDeployment moduleDeploymentToDelete)
Deletes the supplied ModuleDeployment and returns the associated ExtensionModule to the list of
undeployed modules.
moduleDeploymentToDelete - ModuleDeploymenttrue if the ModuleDeployment was successfully deleted and false otherwise.public void setClusterService(ClusterService service)
ClusterMessageAwaresetClusterService in interface ClusterMessageAwareservice - ClusterService to use to post cluster message payloadspublic String getClusterMessageType()
ClusterMessageAwaregetClusterMessageType in interface ClusterMessageAwarepublic void onClusterMessage(Map<String,Serializable> payload)
ClusterMessageAwareonClusterMessage in interface ClusterMessageAwarepayload - Payload from the messageCopyright © 2005–2016 Alfresco Software. All rights reserved.