Package org.casbin.jcasbin.persist
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 TypeMethodDescriptionboolean
IsFiltered returns true if the loaded policy has been filtered.void
loadFilteredPolicy
(Model model, Object filter) loadFilteredPolicy loads only policy rules that match the filter.Methods inherited from interface org.casbin.jcasbin.persist.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.
-