Search in sources :

Example 11 with IGatewayLink

use of io.apiman.manager.api.gateway.IGatewayLink in project apiman by apiman.

the class StorageImportDispatcher method createGatewayLink.

/**
 * Creates a gateway link given a gateway id.
 * @param gatewayId
 */
private IGatewayLink createGatewayLink(String gatewayId) throws StorageException {
    if (gatewayLinkCache.containsKey(gatewayId)) {
        return gatewayLinkCache.get(gatewayId);
    }
    try {
        GatewayBean gateway = storage.getGateway(gatewayId);
        if (gateway == null) {
            // $NON-NLS-1$
            throw new Exception("Gateway not found: " + gatewayId);
        }
        IGatewayLink link = gatewayLinks.create(gateway);
        gatewayLinkCache.put(gatewayId, link);
        return link;
    } catch (Exception e) {
        throw new StorageException(e);
    }
}
Also used : ApiGatewayBean(io.apiman.manager.api.beans.apis.ApiGatewayBean) GatewayBean(io.apiman.manager.api.beans.gateways.GatewayBean) StorageException(io.apiman.manager.api.core.exceptions.StorageException) StorageException(io.apiman.manager.api.core.exceptions.StorageException) ImportNotNeededException(io.apiman.manager.api.exportimport.exceptions.ImportNotNeededException) PublishingException(io.apiman.gateway.engine.beans.exceptions.PublishingException) IGatewayLink(io.apiman.manager.api.gateway.IGatewayLink)

Example 12 with IGatewayLink

use of io.apiman.manager.api.gateway.IGatewayLink 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 13 with IGatewayLink

use of io.apiman.manager.api.gateway.IGatewayLink in project apiman by apiman.

the class WsdlRewriter method rewrite.

@Override
public String rewrite(ProviderContext ctx, InputStream wsdlStream, ApiDefinitionType apiDefinitionType) throws IOException, StorageException, GatewayAuthenticationException, Exception {
    IStorage storage = ctx.getStorage();
    ApiVersionBean avb = ctx.getAvb();
    String orgId = avb.getApi().getOrganization().getId();
    String apiId = avb.getApi().getId();
    String apiVersion = avb.getVersion();
    Document document = readWsdlInputStream(wsdlStream);
    // Collection of all SOAP binding addresses
    List<Element> allSoapAddresses = new LinkedList<>();
    for (String soapNamespace : SOAP_NAMESPACES) {
        NodeList soapAddresses = document.getDocumentElement().getElementsByTagNameNS(soapNamespace, SOAP_ADDRESS);
        if (soapAddresses.getLength() > 0) {
            for (int j = 0; j < soapAddresses.getLength(); j++) {
                allSoapAddresses.add((Element) soapAddresses.item(j));
            }
        }
    }
    // Find IDs of all GWs this ApiVersion is published onto.
    String firstGateway = avb.getGateways().stream().map(ApiGatewayBean::getGatewayId).findFirst().orElse("");
    GatewayBean gateway = storage.getGateway(firstGateway);
    IGatewayLink link = ctx.getGatewayLinkFactory().create(gateway);
    // Go through the addresses we've found (if any) and update the 'location' attribute if needed.
    String endpoint = link.getApiEndpoint(orgId, apiId, apiVersion).getEndpoint();
    for (Element addressElem : allSoapAddresses) {
        String location = addressElem.getAttribute(LOCATION);
        if (!location.equals(endpoint)) {
            addressElem.setAttribute(LOCATION, endpoint);
        }
    }
    // Convert document back to string and update in storage.
    return xmlDocumentToString(document);
}
Also used : ApiGatewayBean(io.apiman.manager.api.beans.apis.ApiGatewayBean) Element(org.w3c.dom.Element) NodeList(org.w3c.dom.NodeList) ApiGatewayBean(io.apiman.manager.api.beans.apis.ApiGatewayBean) GatewayBean(io.apiman.manager.api.beans.gateways.GatewayBean) IStorage(io.apiman.manager.api.core.IStorage) Document(org.w3c.dom.Document) ApiVersionBean(io.apiman.manager.api.beans.apis.ApiVersionBean) LinkedList(java.util.LinkedList) IGatewayLink(io.apiman.manager.api.gateway.IGatewayLink)

Example 14 with IGatewayLink

use of io.apiman.manager.api.gateway.IGatewayLink in project apiman by apiman.

the class ActionService method publishApi.

/**
 * Publishes an API to the gateway.
 */
public void publishApi(String orgId, String apiId, String apiVersion) throws ActionException, NotAuthorizedException {
    ApiVersionBean versionBean;
    try {
        versionBean = storage.getApiVersion(orgId, apiId, apiVersion);
    } catch (ApiVersionNotFoundException e) {
        // $NON-NLS-1$
        throw ExceptionFactory.actionException(Messages.i18n.format("ApiNotFound"));
    } catch (StorageException e) {
        throw new RuntimeException(e);
    }
    // Validate that it's ok to perform this action - API must be Ready.
    if (!versionBean.isPublicAPI() && versionBean.getStatus() != ApiStatus.Ready) {
        // $NON-NLS-1$
        throw ExceptionFactory.actionException(Messages.i18n.format("InvalidApiStatus"));
    }
    if (versionBean.isPublicAPI()) {
        if (versionBean.getStatus() == ApiStatus.Retired || versionBean.getStatus() == ApiStatus.Created) {
            // $NON-NLS-1$
            throw ExceptionFactory.actionException(Messages.i18n.format("InvalidApiStatus"));
        }
        if (versionBean.getStatus() == ApiStatus.Published) {
            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("ApiRePublishNotRequired"));
            }
        }
    }
    Api gatewayApi = new Api();
    gatewayApi.setEndpoint(versionBean.getEndpoint());
    gatewayApi.setEndpointType(versionBean.getEndpointType().toString());
    if (versionBean.getEndpointContentType() != null) {
        gatewayApi.setEndpointContentType(versionBean.getEndpointContentType().toString());
    }
    gatewayApi.setEndpointProperties(versionBean.getEndpointProperties());
    gatewayApi.setOrganizationId(versionBean.getApi().getOrganization().getId());
    gatewayApi.setApiId(versionBean.getApi().getId());
    gatewayApi.setVersion(versionBean.getVersion());
    gatewayApi.setPublicAPI(versionBean.isPublicAPI());
    gatewayApi.setParsePayload(versionBean.isParsePayload());
    gatewayApi.setKeysStrippingDisabled(versionBean.getDisableKeysStrip());
    try {
        if (versionBean.isPublicAPI()) {
            List<Policy> policiesToPublish = new ArrayList<>();
            List<PolicySummaryBean> apiPolicies = query.getPolicies(orgId, apiId, apiVersion, PolicyType.Api);
            for (PolicySummaryBean policySummaryBean : apiPolicies) {
                PolicyBean apiPolicy = storage.getPolicy(PolicyType.Api, orgId, apiId, apiVersion, policySummaryBean.getId());
                Policy policyToPublish = new Policy();
                policyToPublish.setPolicyJsonConfig(apiPolicy.getConfiguration());
                policyToPublish.setPolicyImpl(apiPolicy.getDefinition().getPolicyImpl());
                policiesToPublish.add(policyToPublish);
            }
            gatewayApi.setApiPolicies(policiesToPublish);
        }
    } catch (StorageException e) {
        // $NON-NLS-1$
        throw ExceptionFactory.actionException(Messages.i18n.format("PublishError"), e);
    }
    // Publish the API to all relevant gateways
    try {
        Set<ApiGatewayBean> gateways = versionBean.getGateways();
        if (gateways == null) {
            // $NON-NLS-1$
            throw new PublishingException("No gateways specified for API!");
        }
        for (ApiGatewayBean apiGatewayBean : gateways) {
            IGatewayLink gatewayLink = createGatewayLink(apiGatewayBean.getGatewayId());
            gatewayLink.publishApi(gatewayApi);
            gatewayLink.close();
        }
        versionBean.setStatus(ApiStatus.Published);
        versionBean.setPublishedOn(new Date());
        ApiBean api = storage.getApi(orgId, apiId);
        if (api == null) {
            // $NON-NLS-1$ //$NON-NLS-2$
            throw new PublishingException("Error: could not find API - " + orgId + "=>" + apiId);
        }
        if (api.getNumPublished() == null) {
            api.setNumPublished(1);
        } else {
            api.setNumPublished(api.getNumPublished() + 1);
        }
        storage.updateApi(api);
        storage.updateApiVersion(versionBean);
        storage.createAuditEntry(AuditUtils.apiPublished(versionBean, securityContext));
    } catch (Exception e) {
        // $NON-NLS-1$
        throw ExceptionFactory.actionException(Messages.i18n.format("PublishError"), e);
    }
    LOGGER.debug(// $NON-NLS-1$
    String.format(// $NON-NLS-1$
    "Successfully published API %s on specified gateways: %s", versionBean.getApi().getName(), versionBean.getApi()));
}
Also used : Policy(io.apiman.gateway.engine.beans.Policy) PolicySummaryBean(io.apiman.manager.api.beans.summary.PolicySummaryBean) PolicyBean(io.apiman.manager.api.beans.policies.PolicyBean) ArrayList(java.util.ArrayList) Date(java.util.Date) IGatewayLink(io.apiman.manager.api.gateway.IGatewayLink) 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) ApiVersionNotFoundException(io.apiman.manager.api.rest.exceptions.ApiVersionNotFoundException) ApiBean(io.apiman.manager.api.beans.apis.ApiBean) ApiGatewayBean(io.apiman.manager.api.beans.apis.ApiGatewayBean) PublishingException(io.apiman.gateway.engine.beans.exceptions.PublishingException) Api(io.apiman.gateway.engine.beans.Api) ApiVersionBean(io.apiman.manager.api.beans.apis.ApiVersionBean) StorageException(io.apiman.manager.api.core.exceptions.StorageException)

Example 15 with IGatewayLink

use of io.apiman.manager.api.gateway.IGatewayLink 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

IGatewayLink (io.apiman.manager.api.gateway.IGatewayLink)23 ApiGatewayBean (io.apiman.manager.api.beans.apis.ApiGatewayBean)19 StorageException (io.apiman.manager.api.core.exceptions.StorageException)17 GatewayBean (io.apiman.manager.api.beans.gateways.GatewayBean)15 ApiVersionBean (io.apiman.manager.api.beans.apis.ApiVersionBean)14 PublishingException (io.apiman.gateway.engine.beans.exceptions.PublishingException)13 GatewayNotFoundException (io.apiman.manager.api.rest.exceptions.GatewayNotFoundException)13 NotAuthorizedException (io.apiman.manager.api.rest.exceptions.NotAuthorizedException)11 ActionException (io.apiman.manager.api.rest.exceptions.ActionException)9 ApiVersionNotFoundException (io.apiman.manager.api.rest.exceptions.ApiVersionNotFoundException)9 ClientVersionNotFoundException (io.apiman.manager.api.rest.exceptions.ClientVersionNotFoundException)9 PlanVersionNotFoundException (io.apiman.manager.api.rest.exceptions.PlanVersionNotFoundException)9 Date (java.util.Date)8 Api (io.apiman.gateway.engine.beans.Api)7 ClientVersionBean (io.apiman.manager.api.beans.clients.ClientVersionBean)7 SystemErrorException (io.apiman.manager.api.rest.exceptions.SystemErrorException)7 HashMap (java.util.HashMap)7 ApiBean (io.apiman.manager.api.beans.apis.ApiBean)6 PolicyBean (io.apiman.manager.api.beans.policies.PolicyBean)6 ArrayList (java.util.ArrayList)6