Interface WatcherEx

All Superinterfaces:
Watcher

public interface WatcherEx extends Watcher
  • Method Details

    • updateForAddPolicy

      void updateForAddPolicy(String sec, String ptype, String... params)
      updateForAddPolicy calls the update callback of other instances to synchronize their policy. It is called after a policy is added via Enforcer.addPolicy(), Enforcer.addNamedPolicy(), Enforcer.addGroupingPolicy() and Enforcer.addNamedGroupingPolicy().
      Parameters:
      sec - the section, "p" or "g".
      ptype - the policy type, "p", "p2", .. or "g", "g2", ..
      params - the policy
    • updateForRemovePolicy

      void updateForRemovePolicy(String sec, String ptype, String... params)
      updateForRemovePolicy calls the update callback of other instances to synchronize their policy. It is called after a policy is removed by Enforcer.removePolicy(), Enforcer.removeNamedPolicy(), Enforcer.removeGroupingPolicy() and Enforcer.removeNamedGroupingPolicy().
      Parameters:
      sec - the section, "p" or "g".
      ptype - the policy type, "p", "p2", .. or "g", "g2", ..
      params - the policy
    • updateForRemoveFilteredPolicy

      void updateForRemoveFilteredPolicy(String sec, String ptype, int fieldIndex, String... fieldValues)
      updateForRemoveFilteredPolicy calls the update callback of other instances to synchronize their policy. It is called after Enforcer.RemoveFilteredPolicy(), Enforcer.RemoveFilteredNamedPolicy(), Enforcer.RemoveFilteredGroupingPolicy() and Enforcer.RemoveFilteredNamedGroupingPolicy().
      Parameters:
      sec - the section, "p" or "g".
      ptype - the policy type, "p", "p2", .. or "g", "g2", ..
      fieldIndex - the policy rule's start index to be matched.
      fieldValues - the field values to be matched, value "" means not to match this field.
    • updateForSavePolicy

      void updateForSavePolicy(Model model)
      updateForSavePolicy calls the update callback of other instances to synchronize their policy. It is called after Enforcer.savePolicy()
      Parameters:
      model - represents the whole access control model.
    • updateForAddPolicies

      void updateForAddPolicies(String sec, String ptype, List<List<String>> rules)
      updateForAddPolicies calls the update callback of other instances to synchronize their policy. It is called after Enforcer.addPolicies(), Enforcer.addNamedPolicies(), Enforcer.addGroupingPolicies() and Enforcer.addNamedGroupingPolicies().
      Parameters:
      sec - the section, "p" or "g".
      ptype - the policy type, "p", "p2", .. or "g", "g2", ..
      rules - the policies
    • updateForRemovePolicies

      void updateForRemovePolicies(String sec, String ptype, List<List<String>> rules)
      updateForRemovePolicies calls the update callback of other instances to synchronize their policy. It is called after Enforcer.removePolicies(), Enforcer.removeNamedPolicies(), Enforcer.removeGroupingPolicies() and Enforcer.removeNamedGroupingPolicies().
      Parameters:
      sec - the section, "p" or "g".
      ptype - the policy type, "p", "p2", .. or "g", "g2", ..
      rules - the policies