Interface WatcherEx

  • All Superinterfaces:
    Watcher

    public interface WatcherEx
    extends Watcher
    • Nested Class Summary

      Nested Classes 
      Modifier and Type Interface Description
      static class  WatcherEx.UpdateType  
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      void updateForAddPolicies​(java.lang.String sec, java.lang.String ptype, java.util.List<java.util.List<java.lang.String>> rules)
      updateForAddPolicies calls the update callback of other instances to synchronize their policy.
      void updateForAddPolicy​(java.lang.String sec, java.lang.String ptype, java.lang.String... params)
      updateForAddPolicy calls the update callback of other instances to synchronize their policy.
      void updateForRemoveFilteredPolicy​(java.lang.String sec, java.lang.String ptype, int fieldIndex, java.lang.String... fieldValues)
      updateForRemoveFilteredPolicy calls the update callback of other instances to synchronize their policy.
      void updateForRemovePolicies​(java.lang.String sec, java.lang.String ptype, java.util.List<java.util.List<java.lang.String>> rules)
      updateForRemovePolicies calls the update callback of other instances to synchronize their policy.
      void updateForRemovePolicy​(java.lang.String sec, java.lang.String ptype, java.lang.String... params)
      updateForRemovePolicy calls the update callback of other instances to synchronize their policy.
      void updateForSavePolicy​(Model model)
      updateForSavePolicy calls the update callback of other instances to synchronize their policy.
    • Method Detail

      • updateForAddPolicy

        void updateForAddPolicy​(java.lang.String sec,
                                java.lang.String ptype,
                                java.lang.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​(java.lang.String sec,
                                   java.lang.String ptype,
                                   java.lang.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​(java.lang.String sec,
                                           java.lang.String ptype,
                                           int fieldIndex,
                                           java.lang.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​(java.lang.String sec,
                                  java.lang.String ptype,
                                  java.util.List<java.util.List<java.lang.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​(java.lang.String sec,
                                     java.lang.String ptype,
                                     java.util.List<java.util.List<java.lang.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