Search in sources :

Example 11 with Contract

use of io.apiman.gateway.engine.beans.Contract in project apiman by apiman.

the class InMemoryRegistry method getContract.

/**
 * @see io.apiman.gateway.engine.IRegistry#getContract(java.lang.String, java.lang.String, java.lang.String, java.lang.String, io.apiman.gateway.engine.async.IAsyncResultHandler)
 */
@Override
public void getContract(String apiOrganizationId, String apiId, String apiVersion, String apiKey, IAsyncResultHandler<ApiContract> handler) {
    Client client = null;
    Api api = null;
    String apiIdx = getApiIndex(apiOrganizationId, apiId, apiVersion);
    synchronized (mutex) {
        client = (Client) getMap().get(apiKey);
        api = (Api) getMap().get(apiIdx);
    }
    if (client == null) {
        // $NON-NLS-1$
        Exception error = new ClientNotFoundException(Messages.i18n.format("InMemoryRegistry.NoClientForAPIKey", apiKey));
        handler.handle(AsyncResultImpl.create(error, ApiContract.class));
        return;
    }
    if (api == null) {
        Exception error = new ApiRetiredException(// $NON-NLS-1$
        Messages.i18n.format(// $NON-NLS-1$
        "InMemoryRegistry.ApiWasRetired", apiId, apiOrganizationId));
        handler.handle(AsyncResultImpl.create(error, ApiContract.class));
        return;
    }
    Contract matchedContract = null;
    for (Contract contract : client.getContracts()) {
        if (contract.matches(apiOrganizationId, apiId, apiVersion)) {
            matchedContract = contract;
            break;
        }
    }
    if (matchedContract == null) {
        Exception error = new NoContractFoundException(// $NON-NLS-1$
        Messages.i18n.format(// $NON-NLS-1$
        "InMemoryRegistry.NoContractFound", client.getClientId(), api.getApiId()));
        handler.handle(AsyncResultImpl.create(error, ApiContract.class));
        return;
    }
    ApiContract contract = new ApiContract(api, client, matchedContract.getPlan(), matchedContract.getPolicies());
    handler.handle(AsyncResultImpl.create(contract));
}
Also used : NoContractFoundException(io.apiman.gateway.engine.beans.exceptions.NoContractFoundException) ApiRetiredException(io.apiman.gateway.engine.beans.exceptions.ApiRetiredException) ClientNotFoundException(io.apiman.gateway.engine.beans.exceptions.ClientNotFoundException) Api(io.apiman.gateway.engine.beans.Api) Client(io.apiman.gateway.engine.beans.Client) Contract(io.apiman.gateway.engine.beans.Contract) ApiContract(io.apiman.gateway.engine.beans.ApiContract) RegistrationException(io.apiman.gateway.engine.beans.exceptions.RegistrationException) ClientNotFoundException(io.apiman.gateway.engine.beans.exceptions.ClientNotFoundException) ApiRetiredException(io.apiman.gateway.engine.beans.exceptions.ApiRetiredException) NoContractFoundException(io.apiman.gateway.engine.beans.exceptions.NoContractFoundException) ApiNotFoundException(io.apiman.gateway.engine.beans.exceptions.ApiNotFoundException) ApiContract(io.apiman.gateway.engine.beans.ApiContract)

Example 12 with Contract

use of io.apiman.gateway.engine.beans.Contract in project apiman by apiman.

the class InMemoryRegistry method registerClient.

/**
 * @see io.apiman.gateway.engine.IRegistry#registerClient(io.apiman.gateway.engine.beans.Client, io.apiman.gateway.engine.async.IAsyncResultHandler)
 */
@Override
public void registerClient(Client client, IAsyncResultHandler<Void> handler) {
    Exception error = null;
    synchronized (mutex) {
        // Validate the client first - we need to be able to resolve all the contracts.
        for (Contract contract : client.getContracts()) {
            String apiIdx = getApiIndex(contract.getApiOrgId(), contract.getApiId(), contract.getApiVersion());
            if (!getMap().containsKey(apiIdx)) {
                error = new ApiNotFoundException(// $NON-NLS-1$
                Messages.i18n.format(// $NON-NLS-1$
                "InMemoryRegistry.ApiNotFoundInOrg", contract.getApiId(), contract.getApiOrgId()));
                break;
            }
        }
        if (error == null) {
            // Unregister the client (if it exists)
            unregisterClientInternal(client, true);
            // Now, register the client.
            String clientIdx = getClientIndex(client);
            getMap().put(clientIdx, client);
            getMap().put(client.getApiKey(), client);
            handler.handle(AsyncResultImpl.create((Void) null));
        } else {
            handler.handle(AsyncResultImpl.create(error, Void.class));
        }
    }
}
Also used : ApiNotFoundException(io.apiman.gateway.engine.beans.exceptions.ApiNotFoundException) Contract(io.apiman.gateway.engine.beans.Contract) ApiContract(io.apiman.gateway.engine.beans.ApiContract) RegistrationException(io.apiman.gateway.engine.beans.exceptions.RegistrationException) ClientNotFoundException(io.apiman.gateway.engine.beans.exceptions.ClientNotFoundException) ApiRetiredException(io.apiman.gateway.engine.beans.exceptions.ApiRetiredException) NoContractFoundException(io.apiman.gateway.engine.beans.exceptions.NoContractFoundException) ApiNotFoundException(io.apiman.gateway.engine.beans.exceptions.ApiNotFoundException)

Example 13 with Contract

use of io.apiman.gateway.engine.beans.Contract in project apiman by apiman.

the class StorageImportDispatcher method registerClients.

/**
 * Registers any clients that were imported in the "Registered" state.
 * @throws StorageException
 */
private void registerClients() throws StorageException {
    // $NON-NLS-1$
    logger.info(Messages.i18n.format("StorageExporter.RegisteringClients"));
    for (EntityInfo info : clientsToRegister) {
        // $NON-NLS-1$
        logger.info(Messages.i18n.format("StorageExporter.RegisteringClient", info));
        ClientVersionBean versionBean = storage.getClientVersion(info.organizationId, info.id, info.version);
        Iterator<ContractBean> contractBeans = storage.getAllContracts(info.organizationId, info.id, info.version);
        Client client = new Client();
        client.setOrganizationId(versionBean.getClient().getOrganization().getId());
        client.setClientId(versionBean.getClient().getId());
        client.setVersion(versionBean.getVersion());
        client.setApiKey(versionBean.getApikey());
        Set<Contract> contracts = new HashSet<>();
        while (contractBeans.hasNext()) {
            ContractBean contractBean = contractBeans.next();
            EntityInfo apiInfo = new EntityInfo(contractBean.getApi().getApi().getOrganization().getId(), contractBean.getApi().getApi().getId(), contractBean.getApi().getVersion());
            if (apisToPublish.contains(apiInfo)) {
                Contract contract = new Contract();
                contract.setPlan(contractBean.getPlan().getPlan().getId());
                contract.setApiId(contractBean.getApi().getApi().getId());
                contract.setApiOrgId(contractBean.getApi().getApi().getOrganization().getId());
                contract.setApiVersion(contractBean.getApi().getVersion());
                contract.getPolicies().addAll(aggregateContractPolicies(contractBean, info));
                contracts.add(contract);
            }
        }
        client.setContracts(contracts);
        // Next, register the client with *all* relevant gateways.  This is done by
        // looking up all referenced apis and getting the gateway information for them.
        // Each of those gateways must be told about the client.
        Map<String, IGatewayLink> links = new HashMap<>();
        for (Contract contract : client.getContracts()) {
            ApiVersionBean svb = storage.getApiVersion(contract.getApiOrgId(), contract.getApiId(), contract.getApiVersion());
            Set<ApiGatewayBean> gateways = svb.getGateways();
            if (gateways == null) {
                // $NON-NLS-1$
                throw new PublishingException("No gateways specified for api: " + svb.getApi().getName());
            }
            for (ApiGatewayBean apiGatewayBean : gateways) {
                String gatewayId = apiGatewayBean.getGatewayId();
                if (!links.containsKey(gatewayId)) {
                    IGatewayLink gatewayLink = createGatewayLink(gatewayId);
                    links.put(gatewayId, gatewayLink);
                }
            }
        }
        for (IGatewayLink gatewayLink : links.values()) {
            try {
                gatewayLink.registerClient(client);
            } catch (Exception e) {
                throw new StorageException(e);
            }
        }
    }
}
Also used : ClientVersionBean(io.apiman.manager.api.beans.clients.ClientVersionBean) HashMap(java.util.HashMap) IGatewayLink(io.apiman.manager.api.gateway.IGatewayLink) StorageException(io.apiman.manager.api.core.exceptions.StorageException) ImportNotNeededException(io.apiman.manager.api.exportimport.exceptions.ImportNotNeededException) PublishingException(io.apiman.gateway.engine.beans.exceptions.PublishingException) ContractBean(io.apiman.manager.api.beans.contracts.ContractBean) ApiGatewayBean(io.apiman.manager.api.beans.apis.ApiGatewayBean) PublishingException(io.apiman.gateway.engine.beans.exceptions.PublishingException) Client(io.apiman.gateway.engine.beans.Client) Contract(io.apiman.gateway.engine.beans.Contract) ApiVersionBean(io.apiman.manager.api.beans.apis.ApiVersionBean) StorageException(io.apiman.manager.api.core.exceptions.StorageException) HashSet(java.util.HashSet)

Example 14 with Contract

use of io.apiman.gateway.engine.beans.Contract in project apiman by apiman.

the class SharedGlobalDataRegistry method registerClient.

// CompositeFuture.all(list) requires raw futures.
@SuppressWarnings("rawtypes")
@Override
public void registerClient(Client client, IAsyncResultHandler<Void> resultHandler) {
    List<Future> futures = new ArrayList<>(client.getContracts().size());
    List<Contract> contracts = new ArrayList<>(client.getContracts());
    String clientIndex = getClientIndex(client);
    // Future for each contract and execute get.
    for (Contract contract : contracts) {
        Future future = Future.future();
        futures.add(future);
        String apiIndex = getApiIndex(contract.getApiOrgId(), contract.getApiId(), contract.getApiVersion());
        objectMap.get(apiIndex, future.completer());
    }
    CompositeFuture.all(futures).setHandler(compositeResult -> {
        if (compositeResult.succeeded()) {
            // If any contract didn't correspond to a stored API.
            Contract failedContract = null;
            for (int i = 0; i < futures.size(); i++) {
                if (futures.get(i).result() == null) {
                    failedContract = contracts.get(0);
                    break;
                }
            }
            // If we found an invalid contract.
            if (failedContract != null) {
                Exception ex = new ApiNotFoundException(Messages.i18n.format("InMemoryRegistry.ApiNotFoundInOrg", failedContract.getApiId(), failedContract.getApiOrgId()));
                resultHandler.handle(AsyncResultImpl.create(ex));
            } else {
                Future<Object> putNewApiKeyFuture = Future.future();
                Future<Object> endFuture = Future.future();
                // Order: Create new API Key reference; Replace old ID -> API mapping; Delete old key reference)
                // This should ensure no breaking/irreconcilable behaviour.
                objectMap.putIfAbsent(client.getApiKey(), client, putNewApiKeyFuture.completer());
                // Replace API Key reference
                putNewApiKeyFuture.compose(clientWithSameApiKey -> {
                    Future<Object> replaceClientFuture = Future.future();
                    // only in hard-coded tests. Generally sameKeyReplace will be null.
                    if (clientWithSameApiKey != null) {
                        // System.err.println("!!!!! Same API Key -- Replacing. Must not delete later. !!!!!!");
                        objectMap.replace(client.getApiKey(), client, replaceClientFuture.completer());
                    } else {
                        objectMap.putIfAbsent(clientIndex, client, replaceClientFuture.completer());
                    }
                    return replaceClientFuture;
                // Remove old API key reference
                }).compose(oldClientRaw -> {
                    Client oldClient = (Client) oldClientRaw;
                    if (oldClientRaw != null && !oldClient.getApiKey().equals(client.getApiKey())) {
                        objectMap.remove(oldClient.getApiKey(), endFuture.completer());
                    } else {
                        endFuture.complete();
                    }
                }, endFuture).setHandler(handleResult(resultHandler));
            }
        } else {
            resultHandler.handle(AsyncResultImpl.create(compositeResult.cause()));
        }
    });
}
Also used : ApiRetiredException(io.apiman.gateway.engine.beans.exceptions.ApiRetiredException) AsyncResultImpl(io.apiman.gateway.engine.async.AsyncResultImpl) LoggerFactory(io.vertx.core.logging.LoggerFactory) ArrayList(java.util.ArrayList) Client(io.apiman.gateway.engine.beans.Client) CompositeFuture(io.vertx.core.CompositeFuture) AsyncMap(io.vertx.core.shareddata.AsyncMap) IAsyncResultHandler(io.apiman.gateway.engine.async.IAsyncResultHandler) Map(java.util.Map) AsyncResult(io.vertx.core.AsyncResult) Logger(io.vertx.core.logging.Logger) Contract(io.apiman.gateway.engine.beans.Contract) ClientNotFoundException(io.apiman.gateway.engine.beans.exceptions.ClientNotFoundException) Vertx(io.vertx.core.Vertx) Future(io.vertx.core.Future) Api(io.apiman.gateway.engine.beans.Api) NoContractFoundException(io.apiman.gateway.engine.beans.exceptions.NoContractFoundException) ApiNotFoundException(io.apiman.gateway.engine.beans.exceptions.ApiNotFoundException) IEngineConfig(io.apiman.gateway.engine.IEngineConfig) List(java.util.List) Messages(io.apiman.gateway.engine.i18n.Messages) IRegistry(io.apiman.gateway.engine.IRegistry) ApiContract(io.apiman.gateway.engine.beans.ApiContract) Optional(java.util.Optional) Handler(io.vertx.core.Handler) ApiNotFoundException(io.apiman.gateway.engine.beans.exceptions.ApiNotFoundException) ArrayList(java.util.ArrayList) ApiRetiredException(io.apiman.gateway.engine.beans.exceptions.ApiRetiredException) ClientNotFoundException(io.apiman.gateway.engine.beans.exceptions.ClientNotFoundException) NoContractFoundException(io.apiman.gateway.engine.beans.exceptions.NoContractFoundException) ApiNotFoundException(io.apiman.gateway.engine.beans.exceptions.ApiNotFoundException) CompositeFuture(io.vertx.core.CompositeFuture) Future(io.vertx.core.Future) Client(io.apiman.gateway.engine.beans.Client) Contract(io.apiman.gateway.engine.beans.Contract) ApiContract(io.apiman.gateway.engine.beans.ApiContract)

Example 15 with Contract

use of io.apiman.gateway.engine.beans.Contract in project apiman by apiman.

the class ActionService method registerClient.

/**
 * Registers a client (along with all of its contracts) to the gateway.
 */
public void registerClient(String orgId, String clientId, String clientVersion) throws ActionException, NotAuthorizedException {
    ClientVersionBean versionBean;
    List<ContractSummaryBean> contractBeans;
    try {
        versionBean = clientAppService.getClientVersion(orgId, clientId, clientVersion);
    } catch (ClientVersionNotFoundException e) {
        // $NON-NLS-1$
        throw ExceptionFactory.actionException(Messages.i18n.format("clientVersionDoesNotExist", clientId, clientVersion));
    }
    try {
        contractBeans = query.getClientContracts(orgId, clientId, clientVersion);
        // Any awaiting approval then don't let them republish.
        List<ContractSummaryBean> awaitingApproval = contractBeans.stream().filter(f -> f.getStatus() == ContractStatus.AwaitingApproval).collect(Collectors.toList());
        if (!awaitingApproval.isEmpty()) {
            throw ExceptionFactory.contractNotYetApprovedException(awaitingApproval);
        }
    } catch (StorageException e) {
        // $NON-NLS-1$
        throw ExceptionFactory.actionException(Messages.i18n.format("ClientNotFound"), e);
    }
    boolean isReregister = false;
    // Validate that it's ok to perform this action
    if (versionBean.getStatus() == ClientStatus.Registered) {
        Date modOn = versionBean.getModifiedOn();
        Date publishedOn = versionBean.getPublishedOn();
        int c = modOn.compareTo(publishedOn);
        if (c <= 0) {
            // $NON-NLS-1$
            throw ExceptionFactory.actionException(Messages.i18n.format("ClientReRegisterNotRequired"));
        }
        isReregister = true;
    }
    Client client = new Client();
    client.setOrganizationId(versionBean.getClient().getOrganization().getId());
    client.setClientId(versionBean.getClient().getId());
    client.setVersion(versionBean.getVersion());
    client.setApiKey(versionBean.getApikey());
    Set<Contract> contracts = new HashSet<>();
    for (ContractSummaryBean contractBean : contractBeans) {
        Contract contract = new Contract();
        contract.setPlan(contractBean.getPlanId());
        contract.setApiId(contractBean.getApiId());
        contract.setApiOrgId(contractBean.getApiOrganizationId());
        contract.setApiVersion(contractBean.getApiVersion());
        contract.getPolicies().addAll(contractService.aggregateContractPolicies(contractBean));
        contracts.add(contract);
    }
    client.setContracts(contracts);
    // Each of those gateways must be told about the client.
    try {
        Map<String, IGatewayLink> links = new HashMap<>();
        for (Contract contract : client.getContracts()) {
            ApiVersionBean svb = storage.getApiVersion(contract.getApiOrgId(), contract.getApiId(), contract.getApiVersion());
            Set<ApiGatewayBean> gateways = svb.getGateways();
            if (gateways == null) {
                // $NON-NLS-1$
                throw new PublishingException("No gateways specified for API: " + svb.getApi().getName());
            }
            for (ApiGatewayBean apiGatewayBean : gateways) {
                if (!links.containsKey(apiGatewayBean.getGatewayId())) {
                    IGatewayLink gatewayLink = createGatewayLink(apiGatewayBean.getGatewayId());
                    links.put(apiGatewayBean.getGatewayId(), gatewayLink);
                }
            }
        }
        if (isReregister) {
            // Once we figure out which gateways to register with, make sure we also "unregister"
            // the client app from all other gateways.  This is necessary because we may have broken
            // contracts we previously had on APIs that are published to other gateways.  And thus
            // it's possible we need to remove a contract from a Gateway that is not otherwise/currently
            // referenced.
            // 
            // This is a fix for:  https://issues.jboss.org/browse/APIMAN-895
            Iterator<GatewayBean> gateways = storage.getAllGateways();
            while (gateways.hasNext()) {
                GatewayBean gbean = gateways.next();
                if (!links.containsKey(gbean.getId())) {
                    IGatewayLink gatewayLink = createGatewayLink(gbean.getId());
                    try {
                        gatewayLink.unregisterClient(client);
                    } catch (Exception e) {
                    // We need to catch the error, but ignore it,
                    // in the event that the gateway is invalid.
                    }
                    gatewayLink.close();
                }
            }
        }
        for (IGatewayLink gatewayLink : links.values()) {
            gatewayLink.registerClient(client);
            gatewayLink.close();
        }
    } catch (Exception e) {
        // $NON-NLS-1$
        throw ExceptionFactory.actionException(Messages.i18n.format("RegisterError"), e);
    }
    ClientStatus oldStatus = versionBean.getStatus();
    versionBean.setStatus(ClientStatus.Registered);
    versionBean.setPublishedOn(new Date());
    try {
        storage.updateClientVersion(versionBean);
        storage.createAuditEntry(AuditUtils.clientRegistered(versionBean, securityContext));
        clientAppService.fireClientStatusChangeEvent(versionBean, oldStatus);
    } catch (Exception e) {
        // $NON-NLS-1$
        throw ExceptionFactory.actionException(Messages.i18n.format("RegisterError"), e);
    }
    LOGGER.debug(// $NON-NLS-1$
    String.format(// $NON-NLS-1$
    "Successfully registered Client %s on specified gateways: %s", versionBean.getClient().getName(), versionBean.getClient()));
}
Also used : ClientVersionBean(io.apiman.manager.api.beans.clients.ClientVersionBean) ContractApprovalEvent(io.apiman.manager.api.beans.events.ContractApprovalEvent) ApiGatewayBean(io.apiman.manager.api.beans.apis.ApiGatewayBean) Date(java.util.Date) ApiVersionNotFoundException(io.apiman.manager.api.rest.exceptions.ApiVersionNotFoundException) StorageException(io.apiman.manager.api.core.exceptions.StorageException) ApiVersionBean(io.apiman.manager.api.beans.apis.ApiVersionBean) ISecurityContext(io.apiman.manager.api.security.ISecurityContext) GatewayNotFoundException(io.apiman.manager.api.rest.exceptions.GatewayNotFoundException) IGatewayLinkFactory(io.apiman.manager.api.gateway.IGatewayLinkFactory) ApimanEventHeaders(io.apiman.manager.api.beans.events.ApimanEventHeaders) UserBean(io.apiman.manager.api.beans.idm.UserBean) Client(io.apiman.gateway.engine.beans.Client) ApiBean(io.apiman.manager.api.beans.apis.ApiBean) UserMapper(io.apiman.manager.api.beans.idm.UserMapper) IClientValidator(io.apiman.manager.api.core.IClientValidator) Map(java.util.Map) URI(java.net.URI) ApimanLoggerFactory(io.apiman.common.logging.ApimanLoggerFactory) Contract(io.apiman.gateway.engine.beans.Contract) OrganizationBean(io.apiman.manager.api.beans.orgs.OrganizationBean) Policy(io.apiman.gateway.engine.beans.Policy) Transactional(javax.transaction.Transactional) IGatewayLink(io.apiman.manager.api.gateway.IGatewayLink) EventService(io.apiman.manager.api.events.EventService) Set(java.util.Set) UUID(java.util.UUID) Streams(com.google.common.collect.Streams) Collectors(java.util.stream.Collectors) ContractStatus(io.apiman.manager.api.beans.contracts.ContractStatus) NotAuthorizedException(io.apiman.manager.api.rest.exceptions.NotAuthorizedException) List(java.util.List) IApimanLogger(io.apiman.common.logging.IApimanLogger) PolicySummaryBean(io.apiman.manager.api.beans.summary.PolicySummaryBean) ContractActionDto(io.apiman.manager.api.beans.actions.ContractActionDto) ApplicationScoped(javax.enterprise.context.ApplicationScoped) ActionException(io.apiman.manager.api.rest.exceptions.ActionException) HashMap(java.util.HashMap) ApiStatus(io.apiman.manager.api.beans.apis.ApiStatus) PolicyBean(io.apiman.manager.api.beans.policies.PolicyBean) AuditUtils(io.apiman.manager.api.rest.impl.audit.AuditUtils) ArrayList(java.util.ArrayList) ContractBean(io.apiman.manager.api.beans.contracts.ContractBean) HashSet(java.util.HashSet) Inject(javax.inject.Inject) PlanVersionNotFoundException(io.apiman.manager.api.rest.exceptions.PlanVersionNotFoundException) PublishingException(io.apiman.gateway.engine.beans.exceptions.PublishingException) IStorageQuery(io.apiman.manager.api.core.IStorageQuery) DataAccessUtilMixin(io.apiman.manager.api.rest.impl.util.DataAccessUtilMixin) PlanVersionBean(io.apiman.manager.api.beans.plans.PlanVersionBean) Iterator(java.util.Iterator) GatewayBean(io.apiman.manager.api.beans.gateways.GatewayBean) ClientStatus(io.apiman.manager.api.beans.clients.ClientStatus) ContractSummaryBean(io.apiman.manager.api.beans.summary.ContractSummaryBean) IStorage(io.apiman.manager.api.core.IStorage) ClientVersionBean(io.apiman.manager.api.beans.clients.ClientVersionBean) ClientVersionNotFoundException(io.apiman.manager.api.rest.exceptions.ClientVersionNotFoundException) Api(io.apiman.gateway.engine.beans.Api) PolicyType(io.apiman.manager.api.beans.policies.PolicyType) Messages(io.apiman.manager.api.rest.exceptions.i18n.Messages) PlanStatus(io.apiman.manager.api.beans.plans.PlanStatus) ExceptionFactory(io.apiman.manager.api.rest.exceptions.util.ExceptionFactory) ClientVersionNotFoundException(io.apiman.manager.api.rest.exceptions.ClientVersionNotFoundException) HashMap(java.util.HashMap) IGatewayLink(io.apiman.manager.api.gateway.IGatewayLink) ApiGatewayBean(io.apiman.manager.api.beans.apis.ApiGatewayBean) ApiGatewayBean(io.apiman.manager.api.beans.apis.ApiGatewayBean) GatewayBean(io.apiman.manager.api.beans.gateways.GatewayBean) Client(io.apiman.gateway.engine.beans.Client) HashSet(java.util.HashSet) ClientStatus(io.apiman.manager.api.beans.clients.ClientStatus) Date(java.util.Date) ApiVersionNotFoundException(io.apiman.manager.api.rest.exceptions.ApiVersionNotFoundException) StorageException(io.apiman.manager.api.core.exceptions.StorageException) GatewayNotFoundException(io.apiman.manager.api.rest.exceptions.GatewayNotFoundException) NotAuthorizedException(io.apiman.manager.api.rest.exceptions.NotAuthorizedException) ActionException(io.apiman.manager.api.rest.exceptions.ActionException) PlanVersionNotFoundException(io.apiman.manager.api.rest.exceptions.PlanVersionNotFoundException) PublishingException(io.apiman.gateway.engine.beans.exceptions.PublishingException) ClientVersionNotFoundException(io.apiman.manager.api.rest.exceptions.ClientVersionNotFoundException) PublishingException(io.apiman.gateway.engine.beans.exceptions.PublishingException) ContractSummaryBean(io.apiman.manager.api.beans.summary.ContractSummaryBean) StorageException(io.apiman.manager.api.core.exceptions.StorageException) Contract(io.apiman.gateway.engine.beans.Contract) ApiVersionBean(io.apiman.manager.api.beans.apis.ApiVersionBean)

Aggregations

Contract (io.apiman.gateway.engine.beans.Contract)15 Client (io.apiman.gateway.engine.beans.Client)13 Api (io.apiman.gateway.engine.beans.Api)11 ApiContract (io.apiman.gateway.engine.beans.ApiContract)9 ApiRetiredException (io.apiman.gateway.engine.beans.exceptions.ApiRetiredException)8 NoContractFoundException (io.apiman.gateway.engine.beans.exceptions.NoContractFoundException)8 ClientNotFoundException (io.apiman.gateway.engine.beans.exceptions.ClientNotFoundException)7 PublishingException (io.apiman.gateway.engine.beans.exceptions.PublishingException)7 ApiNotFoundException (io.apiman.gateway.engine.beans.exceptions.ApiNotFoundException)6 ApiGatewayBean (io.apiman.manager.api.beans.apis.ApiGatewayBean)5 ApiVersionBean (io.apiman.manager.api.beans.apis.ApiVersionBean)5 ClientVersionBean (io.apiman.manager.api.beans.clients.ClientVersionBean)5 StorageException (io.apiman.manager.api.core.exceptions.StorageException)5 IGatewayLink (io.apiman.manager.api.gateway.IGatewayLink)5 HashMap (java.util.HashMap)5 HashSet (java.util.HashSet)5 Policy (io.apiman.gateway.engine.beans.Policy)4 RegistrationException (io.apiman.gateway.engine.beans.exceptions.RegistrationException)4 ContractBean (io.apiman.manager.api.beans.contracts.ContractBean)4 GatewayBean (io.apiman.manager.api.beans.gateways.GatewayBean)4