Class ConfigAdmin
java.lang.Object
org.wso2.carbon.core.AbstractAdmin
org.wso2.carbon.mediation.initializer.AbstractServiceBusAdmin
org.wso2.carbon.mediation.configadmin.ConfigAdmin
public class ConfigAdmin
extends org.wso2.carbon.mediation.initializer.AbstractServiceBusAdmin
This is an admin service for managing the SynapseConfiguration of a Carbon server. It can be
used to get the current active configuration and make modifications to it on the fly.
-
Field Summary
Fields inherited from class org.wso2.carbon.core.AbstractAdmin
axisConfig, configurationContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanLoad the configuration from the given filebooleanAdd an existing configuration to the ESB configuration management systembooleanCreate a new synapse configuration in the specified path.booleandeleteConfiguration(String name) Delete a specific configuration identified by the nameGet the current Synapse configuration serialized as an stringGet the list of configurations availablebooleanbooleanupdateConfiguration(org.apache.axiom.om.OMElement configElement) Update the active configuration with the new configurationvalidateConfiguration(org.apache.axiom.om.OMElement configElement) Methods inherited from class org.wso2.carbon.mediation.initializer.AbstractServiceBusAdmin
getLock, getMediationPersistenceManager, getServerConfigurationInformation, getServerContextInformation, getSynapseConfiguration, getSynapseEnvironment, getSynapseEnvironment, lockSynapseConfiguration, unlockSynapseConfigurationMethods inherited from class org.wso2.carbon.core.AbstractAdmin
getAxisConfig, getConfigContext, getConfigSystemRegistry, getConfigUserRegistry, getGovernanceRegistry, getGovernanceSystemRegistry, getGovernanceUserRegistry, getHttpSession, getLocalRepo, getRegistry, getTenantDomain, getUserId, getUsername, getUserRealm, setConfigurationContext, setPermissionUpdateTimestamp
-
Constructor Details
-
ConfigAdmin
public ConfigAdmin()
-
-
Method Details
-
getConfiguration
Get the current Synapse configuration serialized as an string- Returns:
- return XML configuration serialized in to a string
- Throws:
org.apache.axis2.AxisFault- if an error occurs
-
getConfigurationList
Get the list of configurations available- Returns:
- the list is retrieved from the registry
- Throws:
org.apache.axis2.AxisFault- if an error occurs
-
deleteConfiguration
Delete a specific configuration identified by the name- Parameters:
name- name of the configuration- Returns:
- true if the configuration is deleted successfully
- Throws:
org.apache.axis2.AxisFault- if an error occurs
-
updateConfiguration
public boolean updateConfiguration(org.apache.axiom.om.OMElement configElement) throws org.apache.axis2.AxisFault Update the active configuration with the new configuration- Parameters:
configElement- a SOAPElement for the configuration- Returns:
- true if the update is successful
- Throws:
org.apache.axis2.AxisFault- if an error occurs
-
validateConfiguration
-
create
Create a new synapse configuration in the specified path. Save the current configuration and destroy it.- Parameters:
name- name of the configuration to be removeddescription- description for the configuration- Returns:
- true if the new configuration creation is successful
- Throws:
org.apache.axis2.AxisFault- if an error occurs
-
addExistingConfiguration
Add an existing configuration to the ESB configuration management system- Parameters:
name- name of the configuration- Returns:
- true if the configuration is added successfully
- Throws:
org.apache.axis2.AxisFault- if an error occurs
-
activate
Load the configuration from the given file- Parameters:
name- name of configuration- Returns:
- true if the new configuration is successful created
- Throws:
org.apache.axis2.AxisFault- if an error occurs
-
saveConfigurationToDisk
public boolean saveConfigurationToDisk() throws org.apache.axis2.AxisFault- Throws:
org.apache.axis2.AxisFault
-