Class TemplateEditorAdmin


  • public class TemplateEditorAdmin
    extends org.wso2.carbon.mediation.initializer.AbstractServiceBusAdmin
    Takes care of all the administration activities related to Sequences in the initialized synapse environment

    The administration activities include;

    • Adding templates
    • Editing templates
    • Saving templates
    • Deleting templates
    • Enabling/disabling statistics/tracing of templates
    • Editing of dynamic templates
    • and so on...
    • Constructor Detail

      • TemplateEditorAdmin

        public TemplateEditorAdmin()
    • Method Detail

      • getTemplates

        public org.wso2.carbon.mediation.templates.common.TemplateInfo[] getTemplates​(int pageNumber,
                                                                                      int templatePerPage)
                                                                               throws org.apache.axis2.AxisFault
        Throws:
        org.apache.axis2.AxisFault
      • getTemplatesCount

        public int getTemplatesCount()
                              throws org.apache.axis2.AxisFault
        Throws:
        org.apache.axis2.AxisFault
      • getDynamicTemplates

        public org.wso2.carbon.mediation.templates.common.TemplateInfo[] getDynamicTemplates​(int pageNumber,
                                                                                             int sequencePerPage)
                                                                                      throws org.apache.axis2.AxisFault
        Throws:
        org.apache.axis2.AxisFault
      • getDynamicTemplateCount

        public int getDynamicTemplateCount()
                                    throws org.apache.axis2.AxisFault
        Throws:
        org.apache.axis2.AxisFault
      • deleteTemplate

        public void deleteTemplate​(String templateName)
                            throws org.apache.axis2.AxisFault
        Deletes the sequence with the given name from SynapseConfiguration
        Parameters:
        templateName - - Name of the sequence to delete
        Throws:
        org.apache.axis2.AxisFault - if the Sequence described by the given name doesnt exists in the Synapse Configuration
      • getTemplate

        public org.apache.axiom.om.OMElement getTemplate​(String templateName)
                                                  throws org.apache.axis2.AxisFault
        Returns the OMelement representation of the sequence given by sequence name
        Parameters:
        templateName - - name of the sequence to get
        Returns:
        OMElement representing the SequenceMediator of the given sequence name
        Throws:
        org.apache.axis2.AxisFault - if any error occured while getting the data from the SynapseConfiguration
      • addTemplate

        public void addTemplate​(org.apache.axiom.om.OMElement templateElement)
                         throws org.apache.axis2.AxisFault
        Add a sequence into the synapseConfiguration
        Parameters:
        templateElement - - Sequence object to be added as an OMElement
        Throws:
        org.apache.axis2.AxisFault - if a sequence exists with the same name or if the element provided is not a Sequence element
      • saveTemplate

        public void saveTemplate​(org.apache.axiom.om.OMElement templateElement)
                          throws org.apache.axis2.AxisFault
        Saves the sequence described with the sequence string
        Parameters:
        templateElement - - String representing the XML describing the Sequence
        Throws:
        org.apache.axis2.AxisFault - if the sequence name already exists or if the string doesn't represent a Sequence element
      • enableStatistics

        public String enableStatistics​(String templateName)
                                throws org.apache.axis2.AxisFault
        Throws:
        org.apache.axis2.AxisFault
      • disableStatistics

        public String disableStatistics​(String templateName)
                                 throws org.apache.axis2.AxisFault
        Throws:
        org.apache.axis2.AxisFault
      • enableTracing

        public String enableTracing​(String templateName)
                             throws org.apache.axis2.AxisFault
        Throws:
        org.apache.axis2.AxisFault
      • disableTracing

        public String disableTracing​(String templateName)
                              throws org.apache.axis2.AxisFault
        Throws:
        org.apache.axis2.AxisFault
      • updateDynamicTemplate

        public void updateDynamicTemplate​(String key,
                                          org.apache.axiom.om.OMElement omElement)
                                   throws org.apache.axis2.AxisFault
        Throws:
        org.apache.axis2.AxisFault
      • deleteDynamicTemplate

        public void deleteDynamicTemplate​(String key)
                                   throws org.apache.axis2.AxisFault
        Throws:
        org.apache.axis2.AxisFault
      • addDynamicTemplate

        public void addDynamicTemplate​(String key,
                                       org.apache.axiom.om.OMElement sequence)
                                throws org.apache.axis2.AxisFault
        Throws:
        org.apache.axis2.AxisFault
      • getDynamicTemplate

        public org.apache.axiom.om.OMElement getDynamicTemplate​(String key)
                                                         throws org.apache.axis2.AxisFault
        Throws:
        org.apache.axis2.AxisFault
      • saveDynamicTemplate

        public void saveDynamicTemplate​(String key,
                                        org.apache.axiom.om.OMElement sequence)
                                 throws org.apache.axis2.AxisFault
        Throws:
        org.apache.axis2.AxisFault