|
|
@ -107,20 +107,16 @@ public class PolicyAdministratorPointImpl implements PolicyAdministratorPoint {
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public boolean deletePolicy(Policy policy) throws PolicyManagementException {
|
|
|
|
public boolean deletePolicy(Policy policy) throws PolicyManagementException {
|
|
|
|
boolean bool = policyManager.deletePolicy(policy);
|
|
|
|
boolean bool = policyManager.deletePolicy(policy);
|
|
|
|
PolicyCacheManagerImpl.getInstance().rePopulateCache();
|
|
|
|
PolicyCacheManager policyCacheManager = PolicyCacheManagerImpl.getInstance();
|
|
|
|
|
|
|
|
policyCacheManager.rePopulateCache();
|
|
|
|
return bool;
|
|
|
|
return bool;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public boolean deletePolicy(int policyId) throws PolicyManagementException {
|
|
|
|
public boolean deletePolicy(int policyId) throws PolicyManagementException {
|
|
|
|
boolean bool =policyManager.deletePolicy(policyId);
|
|
|
|
boolean bool = policyManager.deletePolicy(policyId);
|
|
|
|
PolicyCacheManager policyCacheManager = PolicyCacheManagerImpl.getInstance();
|
|
|
|
PolicyCacheManager policyCacheManager = PolicyCacheManagerImpl.getInstance();
|
|
|
|
policyCacheManager.rePopulateCache();
|
|
|
|
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;
|
|
|
|
return bool;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|