use of org.wso2.carbon.apimgt.persistence.exceptions.AsyncSpecPersistenceException in project carbon-apimgt by wso2.
the class APIProviderImpl method saveAsyncApiDefinition.
@Override
public void saveAsyncApiDefinition(API api, String jsonText) throws APIManagementException {
String apiId;
String organization = api.getOrganization();
if (api.getUuid() != null) {
apiId = api.getUuid();
} else if (api.getId().getUUID() != null) {
apiId = api.getId().getUUID();
} else {
apiId = apiMgtDAO.getUUIDFromIdentifier(api.getId().getProviderName(), api.getId().getApiName(), api.getId().getVersion(), organization);
}
try {
apiPersistenceInstance.saveAsyncDefinition(new Organization(organization), apiId, jsonText);
} catch (AsyncSpecPersistenceException e) {
throw new APIManagementException("Error while persisting Async API definition ", e);
}
}
Aggregations