Policy class
Methods
addPolicies (String sec , String ptype , List <List <String > > rules )
→ bool
addPolicies adds policy rules to the model.
sec
the section, "p" or "g".
ptype
the policy type, "p", "p2", .. or "g", "g2", ..
rules
the policy rules.
addPolicy (String sec , String ptype , List <String > rule )
→ bool
Adds a policy rule to the model.
buildIncrementalRoleLinks (RoleManager rm , PolicyOperations op , String sec , String ptype , List <List <String > > rules )
→ void
buildRoleLinks (RoleManager rm )
→ void
Initializes the roles in RBAC.
clearPolicy ()
→ void
Clears all current policy.
getFilteredPolicy (String sec , String ptype , int fieldIndex , List <String > fieldValues )
→ List <List <String > >
Returns the filtered policy rules of section sec
and policy type ptype
.
getPolicy (String sec , String ptype )
→ List <List <String > >
Returns all rules in a policy.
getValuesForFieldInPolicy (String sec , String ptype , int fieldIndex )
→ List <String >
Returns all values for a field for all rules in a policy, duplicated values are removed.
hasPolicies (String sec , String ptype , List <List <String > > rules )
→ bool
hasPolicy (String sec , String ptype , List <String > rule )
→ bool
Returns whether a model has the specified policy rule.
noSuchMethod (Invocation invocation )
→ dynamic
Invoked when a nonexistent method or property is accessed.
inherited
printPolicy ()
→ void
Prints the policy to log.
removeFilteredPolicy (String sec , String ptype , int fieldIndex , List <String > fieldValues )
→ bool
Removes policy rules based on field filters from the model.
removeFilteredPolicyReturnsEffects (String sec , String ptype , int fieldIndex , List <String > fieldValues )
→ List <List <String > >
Removes policy rules based on field filters from the model.
removePolicies (String sec , String ptype , List <List <String > > rules )
→ bool
removePolicies removes rules from the current policy.
sec
the section, "p" or "g".
ptype
the policy type, "p", "p2", .. or "g", "g2", ..
rules
the policy rules.
succeeds
or not.
removePolicy (String sec , String ptype , List <String > rule )
→ bool
Removes a policy rule from the model.
savePolicyToText ()
→ String
Saves the policy to the text and returns the text.
toString ()
→ String
A string representation of this object.
inherited
updatePolicy (String sec , String ptype , List <String > oldRule , List <String > newRule )
→ bool
UpdatePolicy updates a policy rule from the model.