Search in sources :

Example 1 with NotAuthorizedException

use of io.apiman.gateway.api.rest.exceptions.NotAuthorizedException in project apiman by apiman.

the class ApiResourceImpl method retire.

@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());
        }
    });
}
Also used : EndpointHelper(io.apiman.gateway.platforms.vertx3.helpers.EndpointHelper) IPolicy(io.apiman.gateway.engine.policy.IPolicy) ApiEndpoint(io.apiman.gateway.engine.beans.ApiEndpoint) VertxEngineConfig(io.apiman.gateway.platforms.vertx3.common.config.VertxEngineConfig) NotAuthorizedException(io.apiman.gateway.api.rest.exceptions.NotAuthorizedException) Client(io.apiman.gateway.engine.beans.Client) IAsyncResultHandler(io.apiman.gateway.engine.async.IAsyncResultHandler) IPolicyProbe(io.apiman.gateway.engine.policy.IPolicyProbe) PublishingException(io.apiman.gateway.engine.beans.exceptions.PublishingException) Status(javax.ws.rs.core.Response.Status) ApimanLoggerFactory(io.apiman.common.logging.ApimanLoggerFactory) ProbeContext(io.apiman.gateway.engine.policy.ProbeContext) IPolicyProbeResponse(io.apiman.gateway.engine.beans.IPolicyProbeResponse) Policy(io.apiman.gateway.engine.beans.Policy) RegistrationException(io.apiman.gateway.engine.beans.exceptions.RegistrationException) IApiResource(io.apiman.gateway.api.rest.IApiResource) AsyncResponse(javax.ws.rs.container.AsyncResponse) PolicyContextImpl(io.apiman.gateway.engine.policy.PolicyContextImpl) ProbeRegistry(io.apiman.gateway.engine.policies.probe.ProbeRegistry) Suspended(javax.ws.rs.container.Suspended) Api(io.apiman.gateway.engine.beans.Api) IApimanLogger(io.apiman.common.logging.IApimanLogger) IEngine(io.apiman.gateway.engine.IEngine) Response(javax.ws.rs.core.Response) IRegistry(io.apiman.gateway.engine.IRegistry) ApiContract(io.apiman.gateway.engine.beans.ApiContract) IPolicyFactory(io.apiman.gateway.engine.policy.IPolicyFactory) Api(io.apiman.gateway.engine.beans.Api)

Aggregations

ApimanLoggerFactory (io.apiman.common.logging.ApimanLoggerFactory)1 IApimanLogger (io.apiman.common.logging.IApimanLogger)1 IApiResource (io.apiman.gateway.api.rest.IApiResource)1 NotAuthorizedException (io.apiman.gateway.api.rest.exceptions.NotAuthorizedException)1 IEngine (io.apiman.gateway.engine.IEngine)1 IRegistry (io.apiman.gateway.engine.IRegistry)1 IAsyncResultHandler (io.apiman.gateway.engine.async.IAsyncResultHandler)1 Api (io.apiman.gateway.engine.beans.Api)1 ApiContract (io.apiman.gateway.engine.beans.ApiContract)1 ApiEndpoint (io.apiman.gateway.engine.beans.ApiEndpoint)1 Client (io.apiman.gateway.engine.beans.Client)1 IPolicyProbeResponse (io.apiman.gateway.engine.beans.IPolicyProbeResponse)1 Policy (io.apiman.gateway.engine.beans.Policy)1 PublishingException (io.apiman.gateway.engine.beans.exceptions.PublishingException)1 RegistrationException (io.apiman.gateway.engine.beans.exceptions.RegistrationException)1 ProbeRegistry (io.apiman.gateway.engine.policies.probe.ProbeRegistry)1 IPolicy (io.apiman.gateway.engine.policy.IPolicy)1 IPolicyFactory (io.apiman.gateway.engine.policy.IPolicyFactory)1 IPolicyProbe (io.apiman.gateway.engine.policy.IPolicyProbe)1 PolicyContextImpl (io.apiman.gateway.engine.policy.PolicyContextImpl)1