/** * Retires the API, removing it from the engine. */ protected void retireApi() { Api api = new Api(); api.setOrganizationId(orgId); api.setApiId(apiId); api.setVersion(String.valueOf(version)); getEngine().getRegistry().retireApi(api, new IAsyncResultHandler<Void>() { @Override public void handle(IAsyncResult<Void> result) { // This is a good faith effort - we don't really care if it can't be retired. } }); }
@Override public void retire(String organizationId, String apiId, String version, AsyncResponse response) throws RegistrationException, NotAuthorizedException { Api api = new Api(); api.setOrganizationId(organizationId); api.setApiId(apiId); api.setVersion(version); registry.retireApi(api, handlerWithEmptyResult(response)); }
/** * @see io.apiman.gateway.api.rest.contract.IApiResource#retire(java.lang.String, java.lang.String, java.lang.String) */ @Override public void retire(String organizationId, String apiId, String version) throws RegistrationException, NotAuthorizedException { final Set<Throwable> errorHolder = new HashSet<>(); final CountDownLatch latch = new CountDownLatch(1); Api api = new Api(); api.setOrganizationId(organizationId); api.setApiId(apiId); api.setVersion(version); // Retire api; latch until result returned and evaluated getEngine().getRegistry().retireApi(api, latchedResultHandler(latch, errorHolder)); awaitOnLatch(latch, errorHolder); }
/** * Retires the API, removing it from the engine. */ protected void retireApi() { Api api = new Api(); api.setOrganizationId(orgId); api.setApiId(apiId); api.setVersion(String.valueOf(version)); getEngine().getRegistry().retireApi(api, new IAsyncResultHandler<Void>() { @Override public void handle(IAsyncResult<Void> result) { // This is a good faith effort - we don't really care if it can't be retired. } }); }
/** * @see io.apiman.gateway.api.rest.contract.IApiResource#retire(java.lang.String, java.lang.String, java.lang.String) */ @Override public void retire(String organizationId, String apiId, String version) throws RegistrationException, NotAuthorizedException { final Set<Throwable> errorHolder = new HashSet<>(); final CountDownLatch latch = new CountDownLatch(1); Api api = new Api(); api.setOrganizationId(organizationId); api.setApiId(apiId); api.setVersion(version); // Retire api; latch until result returned and evaluated getEngine().getRegistry().retireApi(api, latchedResultHandler(latch, errorHolder)); awaitOnLatch(latch, errorHolder); }
@Override public void retire(String organizationId, String apiId, String version) throws RegistrationException, NotAuthorizedException { Api api = new Api(); api.setOrganizationId(organizationId); api.setApiId(apiId); api.setVersion(version); registry.retireApi(api, (IAsyncResultHandler<Void>) result -> { if (result.isError()) { throwError(result.getError()); } }); }
@Override public void retire(String organizationId, String apiId, String version, AsyncResponse response) throws RegistrationException, NotAuthorizedException { Api api = new Api(); api.setOrganizationId(organizationId); api.setApiId(apiId); api.setVersion(version); getEngine().getRegistry().retireApi(api, handlerWithEmptyResult(response)); }
api.setEndpoint(backEndApi.getName()); api.setEndpointType("TEST"); api.setOrganizationId(orgId); api.setApiId(apiId); api.setVersion(String.valueOf(version));
@Override public void retire(String organizationId, String apiId, String version, AsyncResponse response) throws RegistrationException, NotAuthorizedException { Api api = new Api(); api.setOrganizationId(organizationId); api.setApiId(apiId); api.setVersion(version); getEngine().getRegistry().retireApi(api, handlerWithEmptyResult(response)); }
api.setEndpoint(backEndApi.getName()); api.setEndpointType("TEST"); api.setOrganizationId(orgId); api.setApiId(apiId); api.setVersion(String.valueOf(version));
private void processData() { if (configs.size() == 0) { log.warn("File loaded into registry was empty. No entities created."); return; } try { // Naive version initially. for (Auth3ScaleBean bean : configs) { // Reflects the remote data structure. BackendConfiguration config = bean.getThreescaleConfig().getProxyConfig().getBackendConfig(); Api api = new Api(); api.setApiId(config.getSystemName()); api.setOrganizationId(defaultOrgName); api.setEndpoint(config.getProxy().getApiBackend()); api.setEndpointContentType("text/json"); // don't think there is an equivalent of this in 3scale api.setEndpointType("rest"); //don't think there is an equivalent of this in 3scale api.setParsePayload(false); // can let user override this? api.setPublicAPI(true); // is there an equivalent of this? api.setVersion(defaultVersion); // don't think this is relevant anymore setPolicies(api, bean); log.debug("Processing: {0}", config); log.debug("Creating API: {0}", api); apis.add(api); } dataProcessed = true; checkQueue(); } catch (DecodeException e) { failAll(e); } }
private void processData() { if (configs.size() == 0) { log.warn("File loaded into registry was empty. No entities created."); return; } try { // Naive version initially. for (Auth3ScaleBean bean : configs) { // Reflects the remote data structure. BackendConfiguration config = bean.getThreescaleConfig().getProxyConfig().getBackendConfig(); Api api = new Api(); api.setApiId(config.getSystemName()); api.setOrganizationId(defaultOrgName); api.setEndpoint(config.getProxy().getApiBackend()); api.setEndpointContentType("text/json"); // don't think there is an equivalent of this in 3scale api.setEndpointType("rest"); //don't think there is an equivalent of this in 3scale api.setParsePayload(false); // can let user override this? api.setPublicAPI(true); // is there an equivalent of this? api.setVersion(defaultVersion); // don't think this is relevant anymore setPolicies(api, bean); log.debug("Processing: {0}", config); log.debug("Creating API: {0}", api); apis.add(api); } dataProcessed = true; checkQueue(); } catch (DecodeException e) { failAll(e); } }
gatewayApi.setEndpointType(versionBean.getEndpointType().toString()); gatewayApi.setEndpointProperties(versionBean.getEndpointProperties()); gatewayApi.setOrganizationId(versionBean.getApi().getOrganization().getId()); gatewayApi.setApiId(versionBean.getApi().getId()); gatewayApi.setVersion(versionBean.getVersion());
gatewayApi.setOrganizationId(versionBean.getApi().getOrganization().getId()); gatewayApi.setApiId(versionBean.getApi().getId()); gatewayApi.setVersion(versionBean.getVersion());
gatewayApi.setOrganizationId(versionBean.getApi().getOrganization().getId()); gatewayApi.setApiId(versionBean.getApi().getId()); gatewayApi.setVersion(versionBean.getVersion());
gatewayApi.setOrganizationId(versionBean.getApi().getOrganization().getId()); gatewayApi.setApiId(versionBean.getApi().getId()); gatewayApi.setVersion(versionBean.getVersion());
gatewayApi.setOrganizationId(versionBean.getApi().getOrganization().getId()); gatewayApi.setApiId(versionBean.getApi().getId()); gatewayApi.setVersion(versionBean.getVersion());