Search in sources :

Example 26 with RESTAPIAdminServiceProxy

use of org.wso2.carbon.apimgt.gateway.utils.RESTAPIAdminServiceProxy in project carbon-apimgt by wso2.

the class APIGatewayAdmin method getDefaultApi.

public org.wso2.carbon.apimgt.gateway.dto.APIData getDefaultApi(String apiName, String version) throws AxisFault {
    RESTAPIAdminServiceProxy restClient = getRestapiAdminClient(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME);
    String qualifiedName = GatewayUtils.getQualifiedDefaultApiName(apiName);
    APIData apiData = restClient.getApi(qualifiedName);
    return convert(apiData);
}
Also used : RESTAPIAdminServiceProxy(org.wso2.carbon.apimgt.gateway.utils.RESTAPIAdminServiceProxy) APIData(org.wso2.carbon.rest.api.APIData)

Example 27 with RESTAPIAdminServiceProxy

use of org.wso2.carbon.apimgt.gateway.utils.RESTAPIAdminServiceProxy in project carbon-apimgt by wso2.

the class APIGatewayAdmin method deleteDefaultApi.

public boolean deleteDefaultApi(String apiName, String version) throws AxisFault {
    RESTAPIAdminServiceProxy restClient = getRestapiAdminClient(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME);
    String qualifiedName = GatewayUtils.getQualifiedDefaultApiName(apiName);
    return restClient.deleteApi(qualifiedName);
}
Also used : RESTAPIAdminServiceProxy(org.wso2.carbon.apimgt.gateway.utils.RESTAPIAdminServiceProxy)

Example 28 with RESTAPIAdminServiceProxy

use of org.wso2.carbon.apimgt.gateway.utils.RESTAPIAdminServiceProxy in project carbon-apimgt by wso2.

the class APIGatewayAdmin method updateApiForInlineScript.

public boolean updateApiForInlineScript(String apiName, String version, String apiConfig) throws AxisFault {
    RESTAPIAdminServiceProxy restClient = getRestapiAdminClient(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME);
    String qualifiedName = GatewayUtils.getQualifiedApiName(apiName, version);
    return restClient.updateApi(qualifiedName, apiConfig);
}
Also used : RESTAPIAdminServiceProxy(org.wso2.carbon.apimgt.gateway.utils.RESTAPIAdminServiceProxy)

Example 29 with RESTAPIAdminServiceProxy

use of org.wso2.carbon.apimgt.gateway.utils.RESTAPIAdminServiceProxy in project carbon-apimgt by wso2.

the class APIGatewayAdmin method getApi.

public org.wso2.carbon.apimgt.gateway.dto.APIData getApi(String apiName, String version) throws AxisFault {
    RESTAPIAdminServiceProxy restClient = getRestapiAdminClient(MultitenantConstants.SUPER_TENANT_DOMAIN_NAME);
    String qualifiedName = GatewayUtils.getQualifiedApiName(apiName, version);
    APIData apiData = restClient.getApi(qualifiedName);
    return convert(apiData);
}
Also used : RESTAPIAdminServiceProxy(org.wso2.carbon.apimgt.gateway.utils.RESTAPIAdminServiceProxy) APIData(org.wso2.carbon.rest.api.APIData)

Example 30 with RESTAPIAdminServiceProxy

use of org.wso2.carbon.apimgt.gateway.utils.RESTAPIAdminServiceProxy in project carbon-apimgt by wso2.

the class APIGatewayAdmin method updateApiForTenant.

/**
 * Update the API in the Gateway
 *
 * @param tenantDomain
 * @throws AxisFault
 */
public boolean updateApiForTenant(String apiName, String version, String apiConfig, String tenantDomain) throws AxisFault {
    RESTAPIAdminServiceProxy restClient = getRestapiAdminClient(tenantDomain);
    String qualifiedName = GatewayUtils.getQualifiedApiName(apiName, version);
    return restClient.updateApi(qualifiedName, apiConfig);
}
Also used : RESTAPIAdminServiceProxy(org.wso2.carbon.apimgt.gateway.utils.RESTAPIAdminServiceProxy)

Aggregations

RESTAPIAdminServiceProxy (org.wso2.carbon.apimgt.gateway.utils.RESTAPIAdminServiceProxy)44 Test (org.junit.Test)28 EndpointAdminServiceProxy (org.wso2.carbon.apimgt.gateway.utils.EndpointAdminServiceProxy)10 SequenceAdminServiceProxy (org.wso2.carbon.apimgt.gateway.utils.SequenceAdminServiceProxy)10 APIData (org.wso2.carbon.rest.api.APIData)8 OMElement (org.apache.axiom.om.OMElement)5 AxisFault (org.apache.axis2.AxisFault)3 APIManagementException (org.wso2.carbon.apimgt.api.APIManagementException)3 OMFactory (org.apache.axiom.om.OMFactory)2 LocalEntryServiceProxy (org.wso2.carbon.apimgt.gateway.utils.LocalEntryServiceProxy)2 MediationSecurityAdminServiceProxy (org.wso2.carbon.apimgt.gateway.utils.MediationSecurityAdminServiceProxy)2 CertificateManager (org.wso2.carbon.apimgt.impl.certificatemgt.CertificateManager)2 XMLStreamException (javax.xml.stream.XMLStreamException)1 CredentialDto (org.wso2.carbon.apimgt.api.gateway.CredentialDto)1 GatewayContentDTO (org.wso2.carbon.apimgt.api.gateway.GatewayContentDTO)1 ResourceData (org.wso2.carbon.rest.api.ResourceData)1