Search in sources :

Example 1 with ApiPlanBean

use of io.apiman.manager.api.beans.apis.ApiPlanBean in project apiman by apiman.

the class OrganizationResourceImpl method getApiPolicyChain.

/**
 * @see IOrganizationResource#getApiPolicyChain(java.lang.String, java.lang.String, java.lang.String, java.lang.String)
 */
@Override
public PolicyChainBean getApiPolicyChain(String organizationId, String apiId, String version, String planId) throws ApiVersionNotFoundException, PlanNotFoundException {
    // No permission check is needed, because this would break All APIs UI
    // Try to get the API first - will throw an exception if not found.
    ApiVersionBean avb = getApiVersion(organizationId, apiId, version);
    try {
        String planVersion = null;
        Set<ApiPlanBean> plans = avb.getPlans();
        if (plans != null) {
            for (ApiPlanBean apiPlanBean : plans) {
                if (apiPlanBean.getPlanId().equals(planId)) {
                    planVersion = apiPlanBean.getVersion();
                    break;
                }
            }
        }
        if (planVersion == null) {
            throw ExceptionFactory.planNotFoundException(planId);
        }
        // Hide sensitive data and set only needed data for the UI
        List<PolicySummaryBean> apiPolicies = RestHelper.hideSensitiveDataFromPolicySummaryBeanList(securityContext, query.getPolicies(organizationId, apiId, version, PolicyType.Api));
        List<PolicySummaryBean> planPolicies = RestHelper.hideSensitiveDataFromPolicySummaryBeanList(securityContext, query.getPolicies(organizationId, planId, planVersion, PolicyType.Plan));
        PolicyChainBean chain = new PolicyChainBean();
        chain.getPolicies().addAll(planPolicies);
        chain.getPolicies().addAll(apiPolicies);
        return chain;
    } catch (StorageException e) {
        throw new SystemErrorException(e);
    }
}
Also used : SystemErrorException(io.apiman.manager.api.rest.exceptions.SystemErrorException) PolicySummaryBean(io.apiman.manager.api.beans.summary.PolicySummaryBean) ApiPlanBean(io.apiman.manager.api.beans.apis.ApiPlanBean) ApiVersionBean(io.apiman.manager.api.beans.apis.ApiVersionBean) UpdateApiVersionBean(io.apiman.manager.api.beans.apis.UpdateApiVersionBean) NewApiVersionBean(io.apiman.manager.api.beans.apis.NewApiVersionBean) StorageException(io.apiman.manager.api.core.exceptions.StorageException) PolicyChainBean(io.apiman.manager.api.beans.policies.PolicyChainBean)

Example 2 with ApiPlanBean

use of io.apiman.manager.api.beans.apis.ApiPlanBean in project apiman by apiman.

the class ContractService method createContractInternal.

/**
 * Creates a contract.
 */
protected ContractBean createContractInternal(String clientOrgId, String clientId, String clientVersion, NewContractBean bean) throws Exception {
    ClientVersionBean cvb = clientAppService.getClientVersion(clientOrgId, clientId, clientVersion);
    if (cvb.getStatus() == ClientStatus.Retired) {
        throw ExceptionFactory.invalidClientStatusException();
    }
    ApiVersionBean avb = storage.getApiVersion(bean.getApiOrgId(), bean.getApiId(), bean.getApiVersion());
    if (avb == null) {
        throw ExceptionFactory.apiNotFoundException(bean.getApiId());
    }
    if (avb.getStatus() != ApiStatus.Published) {
        throw ExceptionFactory.invalidApiStatusException();
    }
    Set<ApiPlanBean> plans = Optional.ofNullable(avb.getPlans()).orElse(Collections.emptySet());
    ApiPlanBean apiPlanBean = plans.stream().filter(apb -> apb.getPlanId().equals(bean.getPlanId())).findFirst().orElseThrow(() -> ExceptionFactory.planNotFoundException(bean.getPlanId()));
    PlanVersionBean pvb = planService.getPlanVersion(bean.getApiOrgId(), bean.getPlanId(), apiPlanBean.getVersion());
    if (pvb.getStatus() != PlanStatus.Locked) {
        throw ExceptionFactory.invalidPlanStatusException();
    }
    ContractBean contract = new ContractBean();
    contract.setClient(cvb);
    contract.setApi(avb);
    contract.setPlan(pvb);
    contract.setCreatedBy(securityContext.getCurrentUser());
    contract.setCreatedOn(new Date());
    OrganizationBean planOrg = pvb.getPlan().getOrganization();
    if (!apiPlanBean.isRequiresApproval() || securityContext.hasPermission(planAdmin, planOrg.getId())) {
        LOGGER.debug("Contract valid immediately ✅: {0}", contract);
        contract.setStatus(Created);
    } else {
        LOGGER.debug("Contract requires approval ✋: {0}", contract);
        contract.setStatus(ContractStatus.AwaitingApproval);
    }
    try {
        storage.createContract(contract);
    } catch (IllegalStateException ise) {
        throw ExceptionFactory.contractDuplicateException();
    }
    storage.createAuditEntry(AuditUtils.contractCreatedFromClient(contract, securityContext));
    storage.createAuditEntry(AuditUtils.contractCreatedToApi(contract, securityContext));
    // Determine what status of CVB should be now
    ClientStatus oldStatus = cvb.getStatus();
    ClientStatus newStatus = clientValidator.determineStatus(cvb);
    if (oldStatus != newStatus) {
        cvb.setStatus(newStatus);
        clientAppService.fireClientStatusChangeEvent(cvb, oldStatus);
    }
    // Update the version with new meta-data (e.g. modified-by)
    cvb.setModifiedBy(securityContext.getCurrentUser());
    cvb.setModifiedOn(new Date());
    storage.updateClientVersion(cvb);
    return contract;
}
Also used : ClientVersionBean(io.apiman.manager.api.beans.clients.ClientVersionBean) ClientStatus(io.apiman.manager.api.beans.clients.ClientStatus) ApiPlanBean(io.apiman.manager.api.beans.apis.ApiPlanBean) OrganizationBean(io.apiman.manager.api.beans.orgs.OrganizationBean) ApiVersionBean(io.apiman.manager.api.beans.apis.ApiVersionBean) Date(java.util.Date) PlanVersionBean(io.apiman.manager.api.beans.plans.PlanVersionBean) NewContractBean(io.apiman.manager.api.beans.contracts.NewContractBean) ContractBean(io.apiman.manager.api.beans.contracts.ContractBean)

Example 3 with ApiPlanBean

use of io.apiman.manager.api.beans.apis.ApiPlanBean in project apiman by apiman.

the class ApiService method getApiPolicyChain.

public PolicyChainBean getApiPolicyChain(String organizationId, String apiId, String version, String planId) throws ApiVersionNotFoundException, PlanNotFoundException {
    // Try to get the API first - will throw an exception if not found.
    ApiVersionBean avb = getApiVersionFromStorage(organizationId, apiId, version);
    return tryAction(() -> {
        String planVersion = null;
        Set<ApiPlanBean> plans = avb.getPlans();
        if (plans != null) {
            for (ApiPlanBean apiPlanBean : plans) {
                if (apiPlanBean.getPlanId().equals(planId)) {
                    planVersion = apiPlanBean.getVersion();
                    break;
                }
            }
        }
        if (planVersion == null) {
            throw ExceptionFactory.planNotFoundException(planId);
        }
        // Hide sensitive data and set only needed data for the UI
        List<PolicySummaryBean> apiPolicies = RestHelper.hideSensitiveDataFromPolicySummaryBeanList(securityContext, query.getPolicies(organizationId, apiId, version, PolicyType.Api));
        List<PolicySummaryBean> planPolicies = RestHelper.hideSensitiveDataFromPolicySummaryBeanList(securityContext, query.getPolicies(organizationId, planId, planVersion, PolicyType.Plan));
        PolicyChainBean chain = new PolicyChainBean();
        chain.getPolicies().addAll(planPolicies);
        chain.getPolicies().addAll(apiPolicies);
        return chain;
    });
}
Also used : PolicySummaryBean(io.apiman.manager.api.beans.summary.PolicySummaryBean) ApiPlanBean(io.apiman.manager.api.beans.apis.ApiPlanBean) ApiVersionBean(io.apiman.manager.api.beans.apis.ApiVersionBean) UpdateApiVersionBean(io.apiman.manager.api.beans.apis.UpdateApiVersionBean) NewApiVersionBean(io.apiman.manager.api.beans.apis.NewApiVersionBean) PolicyChainBean(io.apiman.manager.api.beans.policies.PolicyChainBean)

Example 4 with ApiPlanBean

use of io.apiman.manager.api.beans.apis.ApiPlanBean in project apiman by apiman.

the class JpaStorage method getApiVersionPlans.

/**
 * {@inheritDoc}
 */
@Override
public // TODO(msavy): rewrite using projection
List<ApiPlanSummaryBean> getApiVersionPlans(String organizationId, String apiId, String version) throws StorageException {
    List<ApiPlanSummaryBean> plans = new ArrayList<>();
    ApiVersionBean versionBean = getApiVersion(organizationId, apiId, version);
    Set<ApiPlanBean> apiPlans = versionBean.getPlans();
    if (apiPlans != null) {
        for (ApiPlanBean spb : apiPlans) {
            PlanVersionBean planVersion = getPlanVersion(organizationId, spb.getPlanId(), spb.getVersion());
            ApiPlanSummaryBean summary = new ApiPlanSummaryBean();
            summary.setPlanId(planVersion.getPlan().getId());
            summary.setPlanName(planVersion.getPlan().getName());
            summary.setPlanDescription(planVersion.getPlan().getDescription());
            summary.setVersion(spb.getVersion());
            summary.setRequiresApproval(spb.getRequiresApproval());
            summary.setDiscoverability(spb.getDiscoverability());
            plans.add(summary);
        }
    }
    return plans;
}
Also used : ApiPlanSummaryBean(io.apiman.manager.api.beans.summary.ApiPlanSummaryBean) ApiPlanBean(io.apiman.manager.api.beans.apis.ApiPlanBean) ArrayList(java.util.ArrayList) ApiVersionBean(io.apiman.manager.api.beans.apis.ApiVersionBean) PlanVersionBean(io.apiman.manager.api.beans.plans.PlanVersionBean)

Example 5 with ApiPlanBean

use of io.apiman.manager.api.beans.apis.ApiPlanBean in project apiman by apiman.

the class ApiService method updateApiVersionInternal.

private ApiVersionBean updateApiVersionInternal(ApiVersionBean avb, UpdateApiVersionBean update) throws ApiVersionNotFoundException {
    if (avb.getStatus() == ApiStatus.Retired) {
        throw ExceptionFactory.invalidApiStatusException();
    }
    avb.setModifiedBy(securityContext.getCurrentUser());
    avb.setModifiedOn(new Date());
    EntityUpdatedData data = new EntityUpdatedData();
    if (AuditUtils.valueChanged(avb.getPlans(), update.getPlans())) {
        Set<ApiPlanBean> updateEntities = update.getPlans().stream().map(dto -> ApiPlanMapper.INSTANCE.fromDto(dto, avb)).collect(Collectors.toSet());
        // $NON-NLS-1$
        data.addChange("plans", AuditUtils.asString_ApiPlanBeans(avb.getPlans()), AuditUtils.asString_ApiPlanBeans(updateEntities));
        if (update.getPlans() != null) {
            // Work around: https://hibernate.atlassian.net/browse/HHH-3799
            // Step 1: Set intersection
            Set<UpdateApiPlanDto> existingAsDto = ApiPlanMapper.INSTANCE.toDto(avb.getPlans());
            existingAsDto.retainAll(update.getPlans());
            // Step 2: Upsert
            Set<ApiPlanBean> mergedPlans = new HashSet<>();
            for (ApiPlanBean updateApb : updateEntities) {
                existingAsDto.stream().map(e -> ApiPlanMapper.INSTANCE.fromDto(e, avb)).filter(e -> e.equals(updateApb)).findAny().ifPresentOrElse(// Merge (existing element to be updated)
                ep -> {
                    ApiPlanMapper.INSTANCE.merge(updateApb, ep);
                    mergedPlans.add(ep);
                }, // Insert (new element)
                () -> {
                    mergedPlans.add(updateApb);
                });
            }
            avb.setPlans(mergedPlans);
            tryAction(() -> storage.merge(avb));
        }
    }
    if (AuditUtils.valueChanged(avb.getGateways(), update.getGateways())) {
        // $NON-NLS-1$
        data.addChange("gateways", AuditUtils.asString_ApiGatewayBeans(avb.getGateways()), AuditUtils.asString_ApiGatewayBeans(update.getGateways()));
        if (avb.getGateways() == null) {
            avb.setGateways(new HashSet<>());
        }
        avb.getGateways().clear();
        avb.getGateways().addAll(update.getGateways());
    }
    if (AuditUtils.valueChanged(avb.getEndpoint(), update.getEndpoint())) {
        // validate the endpoint is a URL
        validateEndpoint(update.getEndpoint());
        // $NON-NLS-1$
        data.addChange("endpoint", avb.getEndpoint(), update.getEndpoint());
        avb.setEndpoint(update.getEndpoint());
    }
    if (AuditUtils.valueChanged(avb.getEndpointType(), update.getEndpointType())) {
        // $NON-NLS-1$
        data.addChange("endpointType", avb.getEndpointType(), update.getEndpointType());
        avb.setEndpointType(update.getEndpointType());
    }
    if (AuditUtils.valueChanged(avb.getEndpointContentType(), update.getEndpointContentType())) {
        // $NON-NLS-1$
        data.addChange("endpointContentType", avb.getEndpointContentType(), update.getEndpointContentType());
        avb.setEndpointContentType(update.getEndpointContentType());
    }
    if (AuditUtils.valueChanged(avb.getEndpointProperties(), update.getEndpointProperties())) {
        if (avb.getEndpointProperties() == null) {
            avb.setEndpointProperties(new HashMap<>());
        } else {
            avb.getEndpointProperties().clear();
        }
        if (update.getEndpointProperties() != null) {
            avb.getEndpointProperties().putAll(update.getEndpointProperties());
        }
    }
    if (AuditUtils.valueChanged(avb.isPublicAPI(), update.getPublicAPI())) {
        // $NON-NLS-1$
        data.addChange("publicAPI", String.valueOf(avb.isPublicAPI()), String.valueOf(update.getPublicAPI()));
        avb.setPublicAPI(update.getPublicAPI());
    }
    if (AuditUtils.valueChanged(avb.isParsePayload(), update.getParsePayload())) {
        // $NON-NLS-1$
        data.addChange("parsePayload", String.valueOf(avb.isParsePayload()), String.valueOf(update.getParsePayload()));
        avb.setParsePayload(update.getParsePayload());
    }
    if (AuditUtils.valueChanged(avb.getDisableKeysStrip(), update.getDisableKeysStrip())) {
        // $NON-NLS-1$
        data.addChange("disableKeysStrip", String.valueOf(avb.getDisableKeysStrip()), String.valueOf(update.getDisableKeysStrip()));
        avb.setDisableKeysStrip(update.getDisableKeysStrip());
    }
    if (AuditUtils.valueChanged(avb.getExtendedDescription(), update.getExtendedDescription())) {
        // $NON-NLS-1$
        data.addChange("extendedDescription", String.valueOf(avb.getExtendedDescription()), String.valueOf(update.getExtendedDescription()));
        avb.setExtendedDescription(update.getExtendedDescription());
    }
    if (AuditUtils.valueChanged(avb.getDiscoverability(), update.getPublicDiscoverability())) {
        // $NON-NLS-1$
        data.addChange("discoverability", String.valueOf(avb.getDiscoverability()), String.valueOf(update.getPublicDiscoverability()));
        avb.setDiscoverability(update.getPublicDiscoverability());
    }
    return tryAction(() -> {
        if (avb.getGateways() == null || avb.getGateways().isEmpty()) {
            GatewaySummaryBean gateway = getSingularGateway();
            if (gateway != null && avb.getGateways() == null) {
                avb.setGateways(new HashSet<>());
                ApiGatewayBean sgb = new ApiGatewayBean();
                sgb.setGatewayId(gateway.getId());
                avb.getGateways().add(sgb);
            }
        }
        if (avb.getStatus() != ApiStatus.Published) {
            if (apiValidator.isReady(avb)) {
                avb.setStatus(ApiStatus.Ready);
            } else {
                avb.setStatus(ApiStatus.Created);
            }
        } else {
            if (!apiValidator.isReady(avb)) {
                throw ExceptionFactory.invalidApiStatusException();
            }
        }
        encryptEndpointProperties(avb);
        // Ensure all the plans are in the right status (locked)
        Set<ApiPlanBean> plans = avb.getPlans();
        if (plans != null) {
            for (ApiPlanBean splanBean : plans) {
                String orgId = avb.getApi().getOrganization().getId();
                PlanVersionBean pvb = storage.getPlanVersion(orgId, splanBean.getPlanId(), splanBean.getVersion());
                if (pvb == null) {
                    // $NON-NLS-1$
                    throw new StorageException(Messages.i18n.format("PlanVersionDoesNotExist", splanBean.getPlanId(), splanBean.getVersion()));
                }
                if (pvb.getStatus() != PlanStatus.Locked) {
                    // $NON-NLS-1$
                    throw new StorageException(Messages.i18n.format("PlanNotLocked", splanBean.getPlanId(), splanBean.getVersion()));
                }
            }
        }
        storage.updateApiVersion(avb);
        storage.createAuditEntry(AuditUtils.apiVersionUpdated(avb, data, securityContext));
        // $NON-NLS-1$
        LOGGER.debug(String.format("Successfully updated API Version: %s", avb));
        decryptEndpointProperties(avb);
        return avb;
    });
}
Also used : PolicyChainBean(io.apiman.manager.api.beans.policies.PolicyChainBean) ApiPlanSummaryBean(io.apiman.manager.api.beans.summary.ApiPlanSummaryBean) ApiVersionBean(io.apiman.manager.api.beans.apis.ApiVersionBean) UpdateApiBean(io.apiman.manager.api.beans.apis.UpdateApiBean) ISecurityContext(io.apiman.manager.api.security.ISecurityContext) ApiVersionAlreadyExistsException(io.apiman.manager.api.rest.exceptions.ApiVersionAlreadyExistsException) GatewayNotFoundException(io.apiman.manager.api.rest.exceptions.GatewayNotFoundException) InvalidVersionException(io.apiman.manager.api.rest.exceptions.InvalidVersionException) IDataEncrypter(io.apiman.common.util.crypt.IDataEncrypter) ParametersAreNonnullByDefault(javax.annotation.ParametersAreNonnullByDefault) ApiBean(io.apiman.manager.api.beans.apis.ApiBean) ApiVersionEndpointSummaryBean(io.apiman.manager.api.beans.summary.ApiVersionEndpointSummaryBean) ApiPlanMapper(io.apiman.manager.api.beans.apis.dto.ApiPlanMapper) PagingBean(io.apiman.manager.api.beans.search.PagingBean) Map(java.util.Map) OrganizationBean(io.apiman.manager.api.beans.orgs.OrganizationBean) EntityStillActiveException(io.apiman.manager.api.rest.exceptions.EntityStillActiveException) NewApiDefinitionBean(io.apiman.manager.api.beans.apis.NewApiDefinitionBean) PolicyNotFoundException(io.apiman.manager.api.rest.exceptions.PolicyNotFoundException) Transactional(javax.transaction.Transactional) IApiValidator(io.apiman.manager.api.core.IApiValidator) IGatewayLink(io.apiman.manager.api.gateway.IGatewayLink) ApiVersionStatusBean(io.apiman.manager.api.beans.apis.ApiVersionStatusBean) Set(java.util.Set) KeyValueTagMapper(io.apiman.manager.api.beans.apis.dto.KeyValueTagMapper) ApiAlreadyExistsException(io.apiman.manager.api.rest.exceptions.ApiAlreadyExistsException) NotAuthorizedException(io.apiman.manager.api.rest.exceptions.NotAuthorizedException) IOUtils(org.apache.commons.io.IOUtils) AuditEntryBean(io.apiman.manager.api.beans.audit.AuditEntryBean) SchemaRewriterService(io.apiman.manager.api.schema.SchemaRewriterService) GatewayAuthenticationException(io.apiman.manager.api.gateway.GatewayAuthenticationException) ApiStatus(io.apiman.manager.api.beans.apis.ApiStatus) ArrayList(java.util.ArrayList) DataEncryptionContext(io.apiman.common.util.crypt.DataEncryptionContext) IStorageQuery(io.apiman.manager.api.core.IStorageQuery) StreamSupport(java.util.stream.StreamSupport) InvalidNameException(io.apiman.manager.api.rest.exceptions.InvalidNameException) DataAccessUtilMixin(io.apiman.manager.api.rest.impl.util.DataAccessUtilMixin) KeyValueTag(io.apiman.manager.api.beans.apis.KeyValueTag) ApiVersionBeanDto(io.apiman.manager.api.beans.apis.dto.ApiVersionBeanDto) EntityUpdatedData(io.apiman.manager.api.beans.audit.data.EntityUpdatedData) ApiMapper(io.apiman.manager.api.beans.summary.mappers.ApiMapper) BeanUtils(io.apiman.manager.api.beans.BeanUtils) InvalidApiStatusException(io.apiman.manager.api.rest.exceptions.InvalidApiStatusException) UpdateApiVersionBean(io.apiman.manager.api.beans.apis.UpdateApiVersionBean) PolicyType(io.apiman.manager.api.beans.policies.PolicyType) Messages(io.apiman.manager.api.rest.exceptions.i18n.Messages) ApiNotFoundException(io.apiman.manager.api.rest.exceptions.ApiNotFoundException) ExceptionFactory(io.apiman.manager.api.rest.exceptions.util.ExceptionFactory) ApiBeanDto(io.apiman.manager.api.beans.apis.dto.ApiBeanDto) NewApiBean(io.apiman.manager.api.beans.apis.NewApiBean) ApiGatewayBean(io.apiman.manager.api.beans.apis.ApiGatewayBean) URL(java.net.URL) Date(java.util.Date) ApiVersionNotFoundException(io.apiman.manager.api.rest.exceptions.ApiVersionNotFoundException) StorageException(io.apiman.manager.api.core.exceptions.StorageException) IGatewayLinkFactory(io.apiman.manager.api.gateway.IGatewayLinkFactory) ApiDefinitionType(io.apiman.manager.api.beans.apis.ApiDefinitionType) ApimanLoggerFactory(io.apiman.common.logging.ApimanLoggerFactory) UpdateApiPlanDto(io.apiman.manager.api.beans.apis.dto.UpdateApiPlanDto) SystemErrorException(io.apiman.manager.api.rest.exceptions.SystemErrorException) KeyValueTagDto(io.apiman.manager.api.beans.apis.dto.KeyValueTagDto) GatewaySummaryBean(io.apiman.manager.api.beans.summary.GatewaySummaryBean) Collectors(java.util.stream.Collectors) ApiVersionSummaryBean(io.apiman.manager.api.beans.summary.ApiVersionSummaryBean) InvalidParameterException(io.apiman.manager.api.rest.exceptions.InvalidParameterException) Objects(java.util.Objects) ApiSummaryBean(io.apiman.manager.api.beans.summary.ApiSummaryBean) List(java.util.List) IApimanLogger(io.apiman.common.logging.IApimanLogger) ApiPlanBean(io.apiman.manager.api.beans.apis.ApiPlanBean) PolicySummaryBean(io.apiman.manager.api.beans.summary.PolicySummaryBean) Entry(java.util.Map.Entry) Optional(java.util.Optional) ApplicationScoped(javax.enterprise.context.ApplicationScoped) NotNull(org.jetbrains.annotations.NotNull) PermissionType(io.apiman.manager.api.beans.idm.PermissionType) IBlobStore(io.apiman.manager.api.core.IBlobStore) ApiEndpoint(io.apiman.gateway.engine.beans.ApiEndpoint) HashMap(java.util.HashMap) PolicyBean(io.apiman.manager.api.beans.policies.PolicyBean) PlanNotFoundException(io.apiman.manager.api.rest.exceptions.PlanNotFoundException) AuditUtils(io.apiman.manager.api.rest.impl.audit.AuditUtils) HashSet(java.util.HashSet) Inject(javax.inject.Inject) FieldValidator(io.apiman.manager.api.rest.impl.util.FieldValidator) PlanVersionBean(io.apiman.manager.api.beans.plans.PlanVersionBean) Iterator(java.util.Iterator) EntityType(io.apiman.common.util.crypt.DataEncryptionContext.EntityType) GatewayBean(io.apiman.manager.api.beans.gateways.GatewayBean) MalformedURLException(java.net.MalformedURLException) SearchResultsBean(io.apiman.manager.api.beans.search.SearchResultsBean) ContractSummaryBean(io.apiman.manager.api.beans.summary.ContractSummaryBean) ApiVersionMapper(io.apiman.manager.api.beans.apis.dto.ApiVersionMapper) IStorage(io.apiman.manager.api.core.IStorage) NewApiVersionBean(io.apiman.manager.api.beans.apis.NewApiVersionBean) NewPolicyBean(io.apiman.manager.api.beans.policies.NewPolicyBean) Collectors.toList(java.util.stream.Collectors.toList) OrganizationNotFoundException(io.apiman.manager.api.rest.exceptions.OrganizationNotFoundException) UpdatePolicyBean(io.apiman.manager.api.beans.policies.UpdatePolicyBean) PlanStatus(io.apiman.manager.api.beans.plans.PlanStatus) Collections(java.util.Collections) ApiDefinitionNotFoundException(io.apiman.manager.api.rest.exceptions.ApiDefinitionNotFoundException) RestHelper(io.apiman.manager.api.rest.impl.util.RestHelper) InputStream(java.io.InputStream) ApiPlanBean(io.apiman.manager.api.beans.apis.ApiPlanBean) GatewaySummaryBean(io.apiman.manager.api.beans.summary.GatewaySummaryBean) UpdateApiPlanDto(io.apiman.manager.api.beans.apis.dto.UpdateApiPlanDto) Date(java.util.Date) PlanVersionBean(io.apiman.manager.api.beans.plans.PlanVersionBean) ApiGatewayBean(io.apiman.manager.api.beans.apis.ApiGatewayBean) StorageException(io.apiman.manager.api.core.exceptions.StorageException) EntityUpdatedData(io.apiman.manager.api.beans.audit.data.EntityUpdatedData) HashSet(java.util.HashSet)

Aggregations

ApiPlanBean (io.apiman.manager.api.beans.apis.ApiPlanBean)13 ApiVersionBean (io.apiman.manager.api.beans.apis.ApiVersionBean)11 NewApiVersionBean (io.apiman.manager.api.beans.apis.NewApiVersionBean)7 UpdateApiVersionBean (io.apiman.manager.api.beans.apis.UpdateApiVersionBean)7 PlanVersionBean (io.apiman.manager.api.beans.plans.PlanVersionBean)7 ApiGatewayBean (io.apiman.manager.api.beans.apis.ApiGatewayBean)6 StorageException (io.apiman.manager.api.core.exceptions.StorageException)6 Date (java.util.Date)6 SystemErrorException (io.apiman.manager.api.rest.exceptions.SystemErrorException)5 GatewayAuthenticationException (io.apiman.manager.api.gateway.GatewayAuthenticationException)4 ApiAlreadyExistsException (io.apiman.manager.api.rest.exceptions.ApiAlreadyExistsException)4 ApiDefinitionNotFoundException (io.apiman.manager.api.rest.exceptions.ApiDefinitionNotFoundException)4 ApiNotFoundException (io.apiman.manager.api.rest.exceptions.ApiNotFoundException)4 ApiVersionAlreadyExistsException (io.apiman.manager.api.rest.exceptions.ApiVersionAlreadyExistsException)4 ApiVersionNotFoundException (io.apiman.manager.api.rest.exceptions.ApiVersionNotFoundException)4 EntityStillActiveException (io.apiman.manager.api.rest.exceptions.EntityStillActiveException)4 GatewayNotFoundException (io.apiman.manager.api.rest.exceptions.GatewayNotFoundException)4 InvalidApiStatusException (io.apiman.manager.api.rest.exceptions.InvalidApiStatusException)4 InvalidNameException (io.apiman.manager.api.rest.exceptions.InvalidNameException)4 InvalidParameterException (io.apiman.manager.api.rest.exceptions.InvalidParameterException)4