Class SequenceAdmin
java.lang.Object
org.wso2.carbon.core.AbstractAdmin
org.wso2.carbon.mediation.initializer.AbstractServiceBusAdmin
org.wso2.carbon.sequences.services.SequenceAdmin
public class SequenceAdmin
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 sequences
- Editing sequences
- Saving sequence
- Deleting sequences
- Enabling/disabling statistics/tracing of sequences
- Editing of dynamic sequences
- and so on...
-
Field Summary
FieldsFields inherited from class org.wso2.carbon.core.AbstractAdmin
axisConfig, configurationContext -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddDynamicSequence(String key, org.apache.axiom.om.OMElement sequence) voidaddSequence(org.apache.axiom.om.OMElement sequenceElement) Add a sequence into the synapseConfigurationvoidaddSequenceForTenant(org.apache.axiom.om.OMElement sequenceElement, String tenantDomain) Set the tenant domain when a publisher deploys custom sequences in MT mode.voidDelete all the sequences in the synapse configurationvoidvoiddeleteSelectedSequence(String[] sequenceNames) Delete Selected Sequence in the synapse configurationvoiddeleteSequence(String sequenceName) Deletes the sequence with the given name from SynapseConfigurationvoiddeleteSequenceForTenant(String sequenceName, String tenantDomain) Set the tenant domain when a publisher deletes custom sequences in MT mode.disableStatistics(String sequenceName) disableTracing(String sequenceName) enableStatistics(String sequenceName) enableTracing(String sequenceName) protected org.apache.axis2.engine.AxisConfigurationOverride the AbstarctAdmin.java's getAxisConfig() to create the CarbonContext from ThreadLoaclContext.protected org.apache.axis2.context.ConfigurationContextorg.wso2.carbon.sequences.common.to.ConfigurationObject[]getDependents(String sequence) org.apache.axiom.om.OMElementgetDynamicSequence(String key) intorg.wso2.carbon.sequences.common.to.SequenceInfo[]getDynamicSequences(int pageNumber, int sequencePerPage) org.apache.axiom.om.OMElementgetSequence(String sequenceName) Returns the OMelement representation of the sequence given by sequence nameorg.apache.axiom.om.OMElementgetSequenceForTenant(String sequenceName, String tenantDomain) Set the tenant domain when a publisher tries to get custom sequences in MT mode.org.wso2.carbon.sequences.common.to.SequenceInfo[]getSequences(int pageNumber, int sequencePerPage) intorg.wso2.carbon.sequences.common.to.SequenceInfo[]getSequencesSearch(String searchText) booleanisExistingSequence(String sequenceName) booleanisExistingSequenceForTenant(String sequenceName, String tenantDomain) voidsaveDynamicSequence(String key, org.apache.axiom.om.OMElement sequence) voidsaveSequence(org.apache.axiom.om.OMElement sequenceElement) Saves the sequence described with the sequence stringvoidupdateDynamicSequence(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, unlockSynapseConfigurationMethods inherited from class org.wso2.carbon.core.AbstractAdmin
getConfigSystemRegistry, getConfigUserRegistry, getGovernanceRegistry, getGovernanceSystemRegistry, getGovernanceUserRegistry, getHttpSession, getLocalRepo, getRegistry, getTenantDomain, getUserId, getUsername, getUserRealm, setConfigurationContext, setPermissionUpdateTimestamp
-
Field Details
-
WSO2_SEQUENCE_MEDIA_TYPE
- See Also:
-
-
Constructor Details
-
SequenceAdmin
public SequenceAdmin()
-
-
Method Details
-
getSequences
public org.wso2.carbon.sequences.common.to.SequenceInfo[] getSequences(int pageNumber, int sequencePerPage) throws org.wso2.carbon.sequences.common.SequenceEditorException - Throws:
org.wso2.carbon.sequences.common.SequenceEditorException
-
getSequencesCount
public int getSequencesCount() throws org.wso2.carbon.sequences.common.SequenceEditorException- Throws:
org.wso2.carbon.sequences.common.SequenceEditorException
-
getDynamicSequences
public org.wso2.carbon.sequences.common.to.SequenceInfo[] getDynamicSequences(int pageNumber, int sequencePerPage) throws org.wso2.carbon.sequences.common.SequenceEditorException - Throws:
org.wso2.carbon.sequences.common.SequenceEditorException
-
getDynamicSequenceCount
public int getDynamicSequenceCount() throws org.wso2.carbon.sequences.common.SequenceEditorException- Throws:
org.wso2.carbon.sequences.common.SequenceEditorException
-
deleteSequence
public void deleteSequence(String sequenceName) throws org.wso2.carbon.sequences.common.SequenceEditorException Deletes the sequence with the given name from SynapseConfiguration- Parameters:
sequenceName- - Name of the sequence to delete- Throws:
org.wso2.carbon.sequences.common.SequenceEditorException- if the Sequence described by the given name doesn't exist in the Synapse Configuration
-
deleteSequenceForTenant
public void deleteSequenceForTenant(String sequenceName, String tenantDomain) throws org.wso2.carbon.sequences.common.SequenceEditorException Set the tenant domain when a publisher deletes custom sequences in MT mode. When publisher deletes the sequence, we login the gateway as supertenant. But we need to delete in the particular tenant domain.- Parameters:
sequenceName-tenantDomain-- Throws:
org.wso2.carbon.sequences.common.SequenceEditorException
-
deleteSelectedSequence
public void deleteSelectedSequence(String[] sequenceNames) throws org.wso2.carbon.sequences.common.SequenceEditorException Delete Selected Sequence in the synapse configuration- Parameters:
sequenceNames-- Throws:
org.wso2.carbon.sequences.common.SequenceEditorException
-
deleteAllSequence
public void deleteAllSequence() throws org.wso2.carbon.sequences.common.SequenceEditorExceptionDelete all the sequences in the synapse configuration- Throws:
org.wso2.carbon.sequences.common.SequenceEditorException
-
getSequence
public org.apache.axiom.om.OMElement getSequence(String sequenceName) throws org.wso2.carbon.sequences.common.SequenceEditorException Returns the OMelement representation of the sequence given by sequence name- Parameters:
sequenceName- - name of the sequence to get- Returns:
- OMElement representing the SequenceMediator of the given sequence name
- Throws:
org.wso2.carbon.sequences.common.SequenceEditorException- if any error occured while getting the data from the SynapseConfiguration
-
getSequenceForTenant
public org.apache.axiom.om.OMElement getSequenceForTenant(String sequenceName, String tenantDomain) throws org.wso2.carbon.sequences.common.SequenceEditorException Set the tenant domain when a publisher tries to get custom sequences in MT mode. When publisher tries to get the sequence, we login the gateway as supertenant. But we need to get in the particular tenant domain.- Parameters:
sequenceName-tenantDomain-- Throws:
org.wso2.carbon.sequences.common.SequenceEditorException
-
addSequence
public void addSequence(org.apache.axiom.om.OMElement sequenceElement) throws org.wso2.carbon.sequences.common.SequenceEditorException Add a sequence into the synapseConfiguration- Parameters:
sequenceElement- - Sequence object to be added as an OMElement- Throws:
org.wso2.carbon.sequences.common.SequenceEditorException- if a sequence exists with the same name or if the element provided is not a Sequence element
-
addSequenceForTenant
public void addSequenceForTenant(org.apache.axiom.om.OMElement sequenceElement, String tenantDomain) throws org.wso2.carbon.sequences.common.SequenceEditorException Set the tenant domain when a publisher deploys custom sequences in MT mode. When publisher deploys the sequence, we login the gateway as supertenant. But we need to deploy in the particular tenant domain.- Parameters:
sequenceElement-tenantDomain-- Throws:
org.wso2.carbon.sequences.common.SequenceEditorException
-
isExistingSequence
-
isExistingSequenceForTenant
-
saveSequence
public void saveSequence(org.apache.axiom.om.OMElement sequenceElement) throws org.wso2.carbon.sequences.common.SequenceEditorException Saves the sequence described with the sequence string- Parameters:
sequenceElement- - String representing the XML describing the Sequence- Throws:
org.wso2.carbon.sequences.common.SequenceEditorException- if the sequence name already exists or if the string doesn't represent a Sequence element
-
enableStatistics
public String enableStatistics(String sequenceName) throws org.wso2.carbon.sequences.common.SequenceEditorException - Throws:
org.wso2.carbon.sequences.common.SequenceEditorException
-
disableStatistics
public String disableStatistics(String sequenceName) throws org.wso2.carbon.sequences.common.SequenceEditorException - Throws:
org.wso2.carbon.sequences.common.SequenceEditorException
-
enableTracing
public String enableTracing(String sequenceName) throws org.wso2.carbon.sequences.common.SequenceEditorException - Throws:
org.wso2.carbon.sequences.common.SequenceEditorException
-
disableTracing
public String disableTracing(String sequenceName) throws org.wso2.carbon.sequences.common.SequenceEditorException - Throws:
org.wso2.carbon.sequences.common.SequenceEditorException
-
getEntryNamesString
- Throws:
org.wso2.carbon.sequences.common.SequenceEditorException
-
updateDynamicSequence
public void updateDynamicSequence(String key, org.apache.axiom.om.OMElement omElement) throws org.wso2.carbon.sequences.common.SequenceEditorException - Throws:
org.wso2.carbon.sequences.common.SequenceEditorException
-
deleteDynamicSequence
public void deleteDynamicSequence(String key) throws org.wso2.carbon.sequences.common.SequenceEditorException - Throws:
org.wso2.carbon.sequences.common.SequenceEditorException
-
addDynamicSequence
public void addDynamicSequence(String key, org.apache.axiom.om.OMElement sequence) throws org.wso2.carbon.sequences.common.SequenceEditorException - Throws:
org.wso2.carbon.sequences.common.SequenceEditorException
-
getDynamicSequence
public org.apache.axiom.om.OMElement getDynamicSequence(String key) throws org.wso2.carbon.sequences.common.SequenceEditorException - Throws:
org.wso2.carbon.sequences.common.SequenceEditorException
-
saveDynamicSequence
public void saveDynamicSequence(String key, org.apache.axiom.om.OMElement sequence) throws org.wso2.carbon.sequences.common.SequenceEditorException - Throws:
org.wso2.carbon.sequences.common.SequenceEditorException
-
getDependents
-
getAxisConfig
protected org.apache.axis2.engine.AxisConfiguration getAxisConfig()Override the AbstarctAdmin.java's getAxisConfig() to create the CarbonContext from ThreadLoaclContext. We do this to support, publishing APIs as a supertenant but want to deploy that in tenant space. (This model is needed for APIManager)- Overrides:
getAxisConfigin classorg.wso2.carbon.core.AbstractAdmin
-
getConfigContext
protected org.apache.axis2.context.ConfigurationContext getConfigContext()- Overrides:
getConfigContextin classorg.wso2.carbon.core.AbstractAdmin
-
getSequencesSearch
public org.wso2.carbon.sequences.common.to.SequenceInfo[] getSequencesSearch(String searchText) throws org.wso2.carbon.sequences.common.SequenceEditorException - Throws:
org.wso2.carbon.sequences.common.SequenceEditorException
-