use of org.wso2.carbon.apimgt.impl.notifier.events.SubscriptionPolicyEvent in project carbon-apimgt by wso2.
the class KeyManagerDataServiceImpl method removeSubscriptionPolicy.
@Override
public void removeSubscriptionPolicy(SubscriptionPolicyEvent event) {
if (log.isDebugEnabled()) {
log.debug("Remove Subscription Policy in datastore in tenant " + event.getTenantDomain());
}
SubscriptionDataStore store = SubscriptionDataHolder.getInstance().getTenantSubscriptionStore(event.getTenantDomain());
if (store == null) {
if (log.isDebugEnabled()) {
log.debug("Ignoring the Event due to tenant " + event.getTenantDomain() + " not loaded");
}
return;
}
store.removeSubscriptionPolicy(getSubscriptionPolicyFromSubscriptionPolicyEvent(event));
}
use of org.wso2.carbon.apimgt.impl.notifier.events.SubscriptionPolicyEvent in project carbon-apimgt by wso2.
the class KeyManagerDataServiceImpl method addOrUpdateSubscriptionPolicy.
@Override
public void addOrUpdateSubscriptionPolicy(SubscriptionPolicyEvent event) {
if (log.isDebugEnabled()) {
log.debug("Add or Update Subscription Policy in datastore in tenant " + event.getTenantDomain());
}
SubscriptionDataStore store = SubscriptionDataHolder.getInstance().getTenantSubscriptionStore(event.getTenantDomain());
if (store == null) {
if (log.isDebugEnabled()) {
log.debug("Ignoring the Event due to tenant " + event.getTenantDomain() + " not loaded");
}
return;
}
store.addOrUpdateSubscriptionPolicy(getSubscriptionPolicyFromSubscriptionPolicyEvent(event));
}
Aggregations