Package org.wso2.carbon.rest.api
Class RestApiAdminUtils
- java.lang.Object
-
- org.wso2.carbon.rest.api.RestApiAdminUtils
-
public class RestApiAdminUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description RestApiAdminUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static APIData
convertApiToAPIData(org.apache.synapse.api.API api)
static org.apache.axiom.om.OMElement
createAnonymousSequenceElement(org.apache.synapse.mediators.base.SequenceMediator sequenceMediator, String seqElemName)
static org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager
getMediationPersistenceManager()
Helper method to get the persistence mangerstatic org.apache.synapse.config.SynapseConfiguration
getSynapseConfiguration()
Override the parent's getSynapseconfig() method to retrieve the Synapse configuration from the relevant axis configurationstatic org.apache.synapse.core.SynapseEnvironment
getSynapseEnvironment()
Helper method to retrieve the Synapse environment from the relevant axis configurationstatic org.apache.synapse.core.SynapseEnvironment
getSynapseEnvironment(org.apache.axis2.engine.AxisConfiguration axisCfg)
static boolean
isNullOrEmpty(String s)
static void
persistApi(org.apache.synapse.api.API api)
static org.apache.axiom.om.OMElement
retrieveAPIOMElement(APIData apiData)
static org.apache.axiom.om.OMElement
retrieveResourceOMElement(ResourceData resourceData)
-
-
-
Method Detail
-
retrieveAPIOMElement
public static org.apache.axiom.om.OMElement retrieveAPIOMElement(APIData apiData)
-
retrieveResourceOMElement
public static org.apache.axiom.om.OMElement retrieveResourceOMElement(ResourceData resourceData)
-
createAnonymousSequenceElement
public static org.apache.axiom.om.OMElement createAnonymousSequenceElement(org.apache.synapse.mediators.base.SequenceMediator sequenceMediator, String seqElemName)
-
getSynapseConfiguration
public static org.apache.synapse.config.SynapseConfiguration getSynapseConfiguration() throws APIException
Override the parent's getSynapseconfig() method to retrieve the Synapse configuration from the relevant axis configuration- Returns:
- extracted SynapseConfiguration from the relevant AxisConfiguration
- Throws:
APIException
-
getMediationPersistenceManager
public static org.wso2.carbon.mediation.initializer.persistence.MediationPersistenceManager getMediationPersistenceManager() throws APIException
Helper method to get the persistence manger- Returns:
- persistence manager for this configuration context
- Throws:
APIException
-
getSynapseEnvironment
public static org.apache.synapse.core.SynapseEnvironment getSynapseEnvironment() throws APIException
Helper method to retrieve the Synapse environment from the relevant axis configuration- Returns:
- extracted SynapseEnvironment from the relevant AxisConfiguration
- Throws:
APIException
-
getSynapseEnvironment
public static org.apache.synapse.core.SynapseEnvironment getSynapseEnvironment(org.apache.axis2.engine.AxisConfiguration axisCfg)
-
convertApiToAPIData
public static APIData convertApiToAPIData(org.apache.synapse.api.API api)
-
persistApi
public static void persistApi(org.apache.synapse.api.API api) throws APIException
- Throws:
APIException
-
isNullOrEmpty
public static boolean isNullOrEmpty(String s)
-
-