revert-70aa11f8
mharindu 9 years ago
commit 2f5ef48fa8

@ -85,8 +85,18 @@ public class PolicyCacheManagerImpl implements PolicyCacheManager {
for (Policy policy : cachedPolicy) { for (Policy policy : cachedPolicy) {
log.debug("Policy id in cache .. : " + policy.getId() + " policy name : " + policy. log.debug("Policy id in cache .. : " + policy.getId() + " policy name : " + policy.
getPolicyName() + " Activated : " + policy.isActive()); getPolicyName() + " Activated : " + policy.isActive());
List<String> users = policy.getUsers();
for (String user : users) {
log.debug("Users in cached policy : " + user);
}
List<String> roles = policy.getRoles();
for (String role : roles) {
log.debug("Roles in cached policy : " + role);
} }
} }
}
return lCache.get(1); return lCache.get(1);
} }

@ -68,7 +68,7 @@ public class PolicyAdministratorPointImpl implements PolicyAdministratorPoint {
// } catch (PolicyDelegationException e) { // } catch (PolicyDelegationException e) {
// throw new PolicyManagementException("Error occurred while delegating policy operation to the devices", e); // throw new PolicyManagementException("Error occurred while delegating policy operation to the devices", e);
// } // }
PolicyCacheManagerImpl.getInstance().addPolicy(resultantPolicy); PolicyCacheManagerImpl.getInstance().rePopulateCache();
return resultantPolicy; return resultantPolicy;
} }
@ -80,7 +80,7 @@ public class PolicyAdministratorPointImpl implements PolicyAdministratorPoint {
// } catch (PolicyDelegationException e) { // } catch (PolicyDelegationException e) {
// throw new PolicyManagementException("Error occurred while delegating policy operation to the devices", e); // throw new PolicyManagementException("Error occurred while delegating policy operation to the devices", e);
// } // }
PolicyCacheManagerImpl.getInstance().updatePolicy(resultantPolicy); PolicyCacheManagerImpl.getInstance().rePopulateCache();
return resultantPolicy; return resultantPolicy;
} }

Loading…
Cancel
Save