Class TemplateEditorAdmin
- java.lang.Object
-
- org.wso2.carbon.core.AbstractAdmin
-
- org.wso2.carbon.mediation.initializer.AbstractServiceBusAdmin
-
- org.wso2.carbon.mediation.templates.services.TemplateEditorAdmin
-
public class TemplateEditorAdmin extends org.wso2.carbon.mediation.initializer.AbstractServiceBusAdmin
Takes care of all the administration activities related toSequences
in the initialized synapse environmentThe administration activities include;
- Adding templates
- Editing templates
- Saving templates
- Deleting templates
- Enabling/disabling statistics/tracing of templates
- Editing of dynamic templates
- and so on...
-
-
Field Summary
Fields Modifier and Type Field Description static String
SYNAPSE_CONFIGURATION
static String
WSO2_TEMPLATE_MEDIA_TYPE
-
Constructor Summary
Constructors Constructor Description TemplateEditorAdmin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addDynamicTemplate(String key, org.apache.axiom.om.OMElement sequence)
void
addTemplate(org.apache.axiom.om.OMElement templateElement)
Add a sequence into the synapseConfigurationvoid
deleteDynamicTemplate(String key)
void
deleteTemplate(String templateName)
Deletes the sequence with the given name from SynapseConfigurationString
disableStatistics(String templateName)
String
disableTracing(String templateName)
String
enableStatistics(String templateName)
String
enableTracing(String templateName)
org.apache.axiom.om.OMElement
getDynamicTemplate(String key)
int
getDynamicTemplateCount()
org.wso2.carbon.mediation.templates.common.TemplateInfo[]
getDynamicTemplates(int pageNumber, int sequencePerPage)
org.apache.axiom.om.OMElement
getTemplate(String templateName)
Returns the OMelement representation of the sequence given by sequence nameorg.wso2.carbon.mediation.templates.common.TemplateInfo[]
getTemplates(int pageNumber, int templatePerPage)
int
getTemplatesCount()
void
saveDynamicTemplate(String key, org.apache.axiom.om.OMElement sequence)
void
saveTemplate(org.apache.axiom.om.OMElement templateElement)
Saves the sequence described with the sequence stringvoid
updateDynamicTemplate(String key, org.apache.axiom.om.OMElement omElement)
-
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
-
-
-
-
Field Detail
-
WSO2_TEMPLATE_MEDIA_TYPE
public static final String WSO2_TEMPLATE_MEDIA_TYPE
- See Also:
- Constant Field Values
-
SYNAPSE_CONFIGURATION
public static final String SYNAPSE_CONFIGURATION
- See Also:
- Constant Field Values
-
-
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
-
-