Exemplo n.º 1
0
 public void togglePolicyEnabled(Policy policy) {
   LivePolicy livePolicy = livePolicies.get(policy.getID());
   if (policy.isEnabled()) {
     livePolicy.activate();
   } else {
     livePolicy.deactivate();
   }
 }
Exemplo n.º 2
0
 public void deletePolicy(Policy policy) {
   LivePolicy livePolicy = livePolicies.get(policy.getID());
   livePolicy.deactivate();
   livePolicies.remove(policy.getID());
   policies.remove(policy);
 }
Exemplo n.º 3
0
  public void add(Policy p) {
    LivePolicy livePolicy = new LivePolicy(p);

    livePolicies.put(p.getID(), livePolicy);
    policies.add(p);
  }