Package org.casbin.jcasbin.persist
Interface FilteredAdapter
-
- All Superinterfaces:
Adapter
- All Known Implementing Classes:
FilteredAdapter
public interface FilteredAdapter extends Adapter
FilteredAdapter is the interface for Casbin adapters supporting filtered policies.- Since:
- 2020/12/21
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
isFiltered()
IsFiltered returns true if the loaded policy has been filtered.void
loadFilteredPolicy(Model model, java.lang.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 Detail
-
loadFilteredPolicy
void loadFilteredPolicy(Model model, java.lang.Object filter) throws CasbinAdapterException
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.
-
-