Interface FilteredAdapter
- All Superinterfaces:
Adapter
- All Known Implementing Classes:
FilteredAdapter
FilteredAdapter is the interface for Casbin adapters supporting filtered policies.
- Since:
- 2020/12/21
-
Method Summary
Modifier and TypeMethodDescriptionbooleanIsFiltered returns true if the loaded policy has been filtered.voidloadFilteredPolicy(Model model, Object filter) loadFilteredPolicy loads only policy rules that match the filter.Methods inherited from interface Adapter
addPolicy, loadPolicy, removeFilteredPolicy, removePolicy, savePolicy
-
Method Details
-
loadFilteredPolicy
loadFilteredPolicy loads only policy rules that match the filter.- Parameters:
model- the model.filter- the filter used to specify which type of policy should be loaded.- Throws:
CasbinAdapterException- if the file path or the type of the filter is incorrect.
-
isFiltered
boolean isFiltered()IsFiltered returns true if the loaded policy has been filtered.- Returns:
- true if have any filter roles.
-