use of org.wso2.carbon.apimgt.keymgt.model.SubscriptionDataStore 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.keymgt.model.SubscriptionDataStore in project carbon-apimgt by wso2.
the class KeyManagerDataServiceImpl method removeApplicationPolicy.
@Override
public void removeApplicationPolicy(ApplicationPolicyEvent event) {
if (log.isDebugEnabled()) {
log.debug("Remove Application 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.removeApplicationPolicy(getApplicationPolicyFromApplicationPolicyEvent(event));
}
use of org.wso2.carbon.apimgt.keymgt.model.SubscriptionDataStore in project carbon-apimgt by wso2.
the class KeyManagerDataServiceImpl method addOrUpdateAPIPolicy.
@Override
public void addOrUpdateAPIPolicy(APIPolicyEvent event) {
if (log.isDebugEnabled()) {
log.debug("Add or Update API 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.addOrUpdateApiPolicy(getAPIPolicyFromAPIPolicyEvent(event));
}
use of org.wso2.carbon.apimgt.keymgt.model.SubscriptionDataStore in project carbon-apimgt by wso2.
the class KeyManagerDataServiceImpl method removeSubscription.
@Override
public void removeSubscription(SubscriptionEvent event) {
if (log.isDebugEnabled()) {
log.debug("Remove Subscription 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.removeSubscription(getSubscriptionFromSubscriptionEvent(event));
}
use of org.wso2.carbon.apimgt.keymgt.model.SubscriptionDataStore in project carbon-apimgt by wso2.
the class KeyManagerDataServiceImpl method deleteScope.
@Override
public void deleteScope(ScopeEvent event) {
Scope scope = new Scope();
scope.setName(event.getName());
scope.setTimeStamp(event.getTimeStamp());
SubscriptionDataStore store = SubscriptionDataHolder.getInstance().getTenantSubscriptionStore(event.getTenantDomain());
if (store == null) {
if (log.isDebugEnabled()) {
log.debug("Ignoring the event as the tenant " + event.getTenantDomain() + " is not loaded");
}
return;
}
store.deleteScope(scope);
}
Aggregations