public class Model extends Policy
| Modifier and Type | Class and Description |
|---|---|
static class |
Model.PolicyOperations |
| Modifier and Type | Field and Description |
|---|---|
protected int |
modCount |
| Constructor and Description |
|---|
Model() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
addDef(java.lang.String sec,
java.lang.String key,
java.lang.String value)
addDef adds an assertion to the model.
|
int |
getModCount() |
void |
loadModel(java.lang.String path)
loadModel loads the model from model CONF file.
|
void |
loadModelFromText(java.lang.String text)
loadModelFromText loads the model from the text.
|
void |
printModel()
printModel prints the model to the log.
|
java.lang.String |
saveModelToText()
saveModelToText saves the model to the text.
|
void |
sortPoliciesByPriority()
sort policies by priority value
|
addPolicies, addPolicy, buildIncrementalRoleLinks, buildRoleLinks, clearPolicy, getFilteredPolicy, getPolicy, getValuesForFieldInPolicy, hasPolicies, hasPolicy, printPolicy, removeFilteredPolicy, removeFilteredPolicyReturnsEffects, removePolicies, removePolicy, savePolicyToText, updatePolicypublic int getModCount()
public boolean addDef(java.lang.String sec,
java.lang.String key,
java.lang.String value)
sec - the section, "p" or "g".key - the policy type, "p", "p2", .. or "g", "g2", ..value - the policy rule, separated by ", ".public void loadModel(java.lang.String path)
path - the path of the model file.public void loadModelFromText(java.lang.String text)
text - the model text.public java.lang.String saveModelToText()
public void printModel()
public void sortPoliciesByPriority()
Copyright © 2017–2021. All rights reserved.