use of org.wso2.carbon.apimgt.impl.notifier.events.APIEvent in project carbon-apimgt by wso2.
the class APIGatewayManager method sendUnDeploymentEvent.
private void sendUnDeploymentEvent(APIProduct apiProduct, String tenantDomain, Set<String> removedGateways, Set<API> associatedAPIs) {
APIProductIdentifier apiProductIdentifier = apiProduct.getId();
Set<APIEvent> apiEvents = transformAPIToAPIEvent(associatedAPIs);
DeployAPIInGatewayEvent deployAPIInGatewayEvent = new DeployAPIInGatewayEvent(UUID.randomUUID().toString(), System.currentTimeMillis(), APIConstants.EventType.REMOVE_API_FROM_GATEWAY.name(), tenantDomain, apiProduct.getProductId(), apiProduct.getUuid(), removedGateways, apiProductIdentifier.getName(), apiProductIdentifier.getVersion(), PRODUCT_PREFIX, APIConstants.API_PRODUCT, apiProduct.getContext(), apiEvents);
APIUtil.sendNotification(deployAPIInGatewayEvent, APIConstants.NotifierType.GATEWAY_PUBLISHED_API.name());
}
Aggregations