Ejemplo n.º 1
0
 public void togglePolicyEnabled(Policy policy) {
   LivePolicy livePolicy = livePolicies.get(policy.getID());
   if (policy.isEnabled()) {
     livePolicy.activate();
   } else {
     livePolicy.deactivate();
   }
 }
Ejemplo n.º 2
0
  public Map<Policy, Set<Conflict>> getPolicyConflicts(
      Policy policy, Collection<Policy> possibleOverlappingPolicies) {
    LivePolicy livePolicy = new LivePolicyDisabled(policy);

    Map<Policy, Set<Conflict>> conflicts =
        ConflictChecker.getConflictingPolicies(
            livePolicy, possibleOverlappingPolicies, livePolicies, database);
    ConflictChecker.describe(livePolicy.getPolicy(), conflicts);

    return conflicts;
  }
Ejemplo n.º 3
0
 public void deletePolicy(Policy policy) {
   LivePolicy livePolicy = livePolicies.get(policy.getID());
   livePolicy.deactivate();
   livePolicies.remove(policy.getID());
   policies.remove(policy);
 }