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.
-
-
Constructor Summary
Constructors Constructor Description ConfigAdmin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
activate(String name)
Load the configuration from the given fileboolean
addExistingConfiguration(String name)
Add an existing configuration to the ESB configuration management systemboolean
create(String name, String description)
Create a new synapse configuration in the specified path.boolean
deleteConfiguration(String name)
Delete a specific configuration identified by the nameString
getConfiguration()
Get the current Synapse configuration serialized as an stringConfigurationInformation[]
getConfigurationList()
Get the list of configurations availableboolean
saveConfigurationToDisk()
boolean
updateConfiguration(org.apache.axiom.om.OMElement configElement)
Update the active configuration with the new configurationValidationError[]
validateConfiguration(org.apache.axiom.om.OMElement configElement)
-
Methods inherited from class org.wso2.carbon.mediation.initializer.AbstractServiceBusAdmin
getLock, getMediationPersistenceManager, getServerConfigurationInformation, getServerContextInformation, getSynapseConfiguration, getSynapseEnvironment, getSynapseEnvironment, lockSynapseConfiguration, unlockSynapseConfiguration
-
Methods inherited from class org.wso2.carbon.core.AbstractAdmin
getAxisConfig, getConfigContext, getConfigSystemRegistry, getConfigUserRegistry, getGovernanceRegistry, getGovernanceSystemRegistry, getGovernanceUserRegistry, getHttpSession, getLocalRepo, getRegistry, getTenantDomain, getUserId, getUsername, getUserRealm, setConfigurationContext, setPermissionUpdateTimestamp
-
-
-
-
Method Detail
-
getConfiguration
public String getConfiguration() throws org.apache.axis2.AxisFault
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
public ConfigurationInformation[] getConfigurationList() throws org.apache.axis2.AxisFault
Get the list of configurations available- Returns:
- the list is retrieved from the registry
- Throws:
org.apache.axis2.AxisFault
- if an error occurs
-
deleteConfiguration
public boolean deleteConfiguration(String name) throws org.apache.axis2.AxisFault
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
public ValidationError[] validateConfiguration(org.apache.axiom.om.OMElement configElement)
-
create
public boolean create(String name, String description) throws org.apache.axis2.AxisFault
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
public boolean addExistingConfiguration(String name) throws org.apache.axis2.AxisFault
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
public boolean activate(String name) throws org.apache.axis2.AxisFault
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
-
-