|
|
|
@ -107,20 +107,16 @@ public class PolicyAdministratorPointImpl implements PolicyAdministratorPoint {
|
|
|
|
|
@Override
|
|
|
|
|
public boolean deletePolicy(Policy policy) throws PolicyManagementException {
|
|
|
|
|
boolean bool = policyManager.deletePolicy(policy);
|
|
|
|
|
PolicyCacheManagerImpl.getInstance().rePopulateCache();
|
|
|
|
|
PolicyCacheManager policyCacheManager = PolicyCacheManagerImpl.getInstance();
|
|
|
|
|
policyCacheManager.rePopulateCache();
|
|
|
|
|
return bool;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public boolean deletePolicy(int policyId) throws PolicyManagementException {
|
|
|
|
|
boolean bool =policyManager.deletePolicy(policyId);
|
|
|
|
|
boolean bool = policyManager.deletePolicy(policyId);
|
|
|
|
|
PolicyCacheManager policyCacheManager = PolicyCacheManagerImpl.getInstance();
|
|
|
|
|
policyCacheManager.rePopulateCache();
|
|
|
|
|
List<Policy> appliedPolicies = policyCacheManager.getAllPolicies();
|
|
|
|
|
//This means all the policies have been deleted. Hence triggering publishChanges to take immediate effect.
|
|
|
|
|
if (appliedPolicies.isEmpty()) {
|
|
|
|
|
this.publishChanges();
|
|
|
|
|
}
|
|
|
|
|
return bool;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|