Class SynapseConfigAdminClient

java.lang.Object
org.wso2.am.admin.clients.mediation.SynapseConfigAdminClient

public class SynapseConfigAdminClient extends Object
This class exposing ConfigServiceAdmin operations to the test cases.
  • Constructor Details

    • SynapseConfigAdminClient

      public SynapseConfigAdminClient(String backEndUrl, String sessionCookie) throws org.apache.axis2.AxisFault
      Throws:
      org.apache.axis2.AxisFault
    • SynapseConfigAdminClient

      public SynapseConfigAdminClient(String backEndUrl, String userName, String password) throws org.apache.axis2.AxisFault
      Throws:
      org.apache.axis2.AxisFault
  • Method Details

    • activateService

      public void activateService(String serviceName) throws RemoteException
      Activating service
      Parameters:
      serviceName - - service name need to be activated
      Throws:
      RemoteException - for the activate() method call in ConfigServiceAdminStub
    • addExistingConfiguration

      public void addExistingConfiguration(String serviceName) throws RemoteException
      Adding more configuration to the existing service
      Parameters:
      serviceName - - service name
      Throws:
      RemoteException - for the addExistingConfiguration() method call in ConfigServiceAdminStub
    • create

      public void create(String serviceName, String description) throws RemoteException
      Create synapse configuration
      Parameters:
      serviceName - - service name
      description - - service description
      Throws:
      RemoteException - for the create() method call in ConfigServiceAdminStub
    • deleteConfiguration

      public void deleteConfiguration(String serviceName) throws RemoteException
      Deleting synapse configuration
      Parameters:
      serviceName - - service name
      Throws:
      RemoteException - for the deleteConfiguration() method call in ConfigServiceAdminStub
    • getConfiguration

      public String getConfiguration() throws RemoteException
      Get current synapse configuration
      Returns:
      String - synapse configuration
      Throws:
      RemoteException - for the getConfiguration() method call in ConfigServiceAdminStub
    • getConfigurationList

      public org.wso2.carbon.mediation.configadmin.stub.types.carbon.ConfigurationInformation[] getConfigurationList() throws RemoteException
      Get current configuration List
      Returns:
      configuration list
      Throws:
      RemoteException - for the getConfigurationList() method call in ConfigServiceAdminStub
    • saveConfigurationToDisk

      public void saveConfigurationToDisk() throws RemoteException
      Save Synapse configuration
      Throws:
      RemoteException - for the saveConfigurationToDisk() method call in ConfigServiceAdminStub
    • updateConfiguration

      public boolean updateConfiguration(String configuration) throws XMLStreamException, RemoteException
      Update Synapse configuration using a String that contains the new configuration.
      Parameters:
      configuration - - synapse configuration
      Returns:
      boolean - return true if update success else return false.
      Throws:
      RemoteException - for the updateConfiguration() method call in ConfigServiceAdminStub
      XMLStreamException - for the updateConfiguration() method call in ConfigServiceAdminStub
    • updateConfiguration

      Update Synapse configuration using a File object that contains the new configuration.
      Parameters:
      file - - File that contains the synapse configuration
      Returns:
      boolean - true if update process success, else returns false
      Throws:
      IOException - for the updateConfiguration() method call in ConfigServiceAdminStub and parse() method call in DocumentBuilder
      SAXException - for the parse() method call in DocumentBuilder
      ParserConfigurationException - for the newDocumentBuilder() method call in DocumentBuilderFactory
      TransformerException - for the getStringFromDocument() method call
      XMLStreamException - for the updateConfiguration() method call in ConfigServiceAdminStub
    • updateConfiguration

      public boolean updateConfiguration(org.apache.axiom.om.OMElement configuration) throws RemoteException
      update synapse configuration using a OMElement object that contains the new configuration.
      Parameters:
      configuration - - synapse configuration
      Returns:
      configuration update status
      Throws:
      RemoteException - for the updateConfiguration() method call in ConfigServiceAdminStub
    • validateConfiguration

      public org.wso2.carbon.mediation.configadmin.stub.types.carbon.ValidationError[] validateConfiguration(org.apache.axiom.om.OMElement configuration) throws RemoteException
      Validate synapse configuration using a OMElement
      Parameters:
      configuration - - synapse configuration
      Returns:
      validation error array
      Throws:
      RemoteException - for the validateConfiguration() method call in ConfigServiceAdminStub