Package com.isode.dsapi.aci
Class SimpleACIItem
java.lang.Object
com.isode.dsapi.aci.SimpleACIItem
A simple-ACI item consisting of a role, rule and area.
The fields of this class may be accessed directly.
- Since:
- 15.0
- Author:
- jp
-
Field Summary
FieldsModifier and TypeFieldDescriptionAreastatic final Comparator<SimpleACIItem>
Comparator to order SimpleACIItems: highest precedence first, then deny before allow, then ordered by role name, then by rule name.int
Precedence level: 0-255.Role for an 'allow' rule, or null for a 'deny' rule.Rule -
Constructor Summary
ConstructorsConstructorDescriptionConstruct a blank ACI item.SimpleACIItem
(int precedence, SimpleACIRole role, SimpleACIRule rule, SimpleACIArea area) Construct an ACI item from a precedence, role, rule and area.SimpleACIItem
(SimpleACIItem item) Copy constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
dumpXML
(com.isode.util.XMLOutput out) Dump item as XML.dup()
Copy a SimpleACIItem.boolean
Test whether this item has changed compared to its original values.int
hashCode()
Return hash code.static SimpleACIItem
loadXML
(com.isode.util.XMLInput in, List<SimpleACIRule> rules, List<SimpleACIRole> roles) Try to load up the SimpleACIItem from XML using the given role and rule lists as context.void
revert()
Revert changes.void
Clear the 'changed' state by copying the current values over the original values.toString()
Debugging dump.boolean
wasBlank()
Check whether the original settings were blank.
-
Field Details
-
precedence
public int precedencePrecedence level: 0-255. Higher-numbered rules override lower-numbered rules. -
role
Role for an 'allow' rule, or null for a 'deny' rule. -
rule
Rule -
area
Area -
ORDER
Comparator to order SimpleACIItems: highest precedence first, then deny before allow, then ordered by role name, then by rule name.
-
-
Constructor Details
-
SimpleACIItem
public SimpleACIItem()Construct a blank ACI item. -
SimpleACIItem
Construct an ACI item from a precedence, role, rule and area. -
SimpleACIItem
Copy constructor. Copies original info as well, so that 'changed' status is maintained.
-
-
Method Details
-
dup
Copy a SimpleACIItem. This is a shallow copy, but it does copy the original values, so the changed status will be maintained. -
hasChanged
public boolean hasChanged()Test whether this item has changed compared to its original values. -
wasBlank
public boolean wasBlank()Check whether the original settings were blank. -
setUnchanged
public void setUnchanged()Clear the 'changed' state by copying the current values over the original values. -
revert
public void revert()Revert changes. Note that if the original settings were blank (test with wasBlank()), then reverting will leave the item invalid. -
dumpXML
Dump item as XML. Rules and roles are included by name only.- Throws:
IOException
-
loadXML
public static SimpleACIItem loadXML(com.isode.util.XMLInput in, List<SimpleACIRule> rules, List<SimpleACIRole> roles) Try to load up the SimpleACIItem from XML using the given role and rule lists as context. Returns null if not found. -
hashCode
public int hashCode()Return hash code. -
toString
Debugging dump.
-