public class ModuleDeploymentService extends Object
| Modifier and Type | Field and Description |
|---|---|
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.
|
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 |
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
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.Copyright © 2005–2015 Alfresco Software. All rights reserved.