Package org.casbin.jcasbin.persist
Interface WatcherEx
- All Superinterfaces:
Watcher
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionvoid
updateForAddPolicies calls the update callback of other instances to synchronize their policy.void
updateForAddPolicy
(String sec, String ptype, String... params) updateForAddPolicy calls the update callback of other instances to synchronize their policy.void
updateForRemoveFilteredPolicy
(String sec, String ptype, int fieldIndex, String... fieldValues) updateForRemoveFilteredPolicy calls the update callback of other instances to synchronize their policy.void
updateForRemovePolicies calls the update callback of other instances to synchronize their policy.void
updateForRemovePolicy
(String sec, String ptype, 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.Methods inherited from interface org.casbin.jcasbin.persist.Watcher
setUpdateCallback, setUpdateCallback, update
-
Method Details
-
updateForAddPolicy
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
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
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
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
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
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
-