PolicyNode interface.
This class provides an implementation of the PolicyNode
interface, and is used internally to build and search Policy Trees.
While the implementation is mutable during construction, it is immutable
before returning to a client and no mutable public or protected methods
are exposed by this implementation, as per the contract of PolicyNode.
| Modifier and Type | Field and Description |
|---|---|
| private static final String | ANY_POLICY
Use to specify the special policy "Any Policy" |
| private boolean | |
| private final HashSet | |
| private final boolean | |
| private final int | |
| private final HashSet | |
| private boolean | |
| private final PolicyNodeImpl | |
| private final HashSet | |
| private final String |
| Access | Constructor and Description |
|---|---|
| pack-priv | PolicyNodeImpl(PolicyNodeImpl
the PolicyNode above this in the tree, or null if this
node is the tree's root node parent, String a String representing this node's valid policy OID validPolicy, Set<PolicyQualifierInfo> the Set of qualifiers for this policy qualifierSet, boolean a boolean representing whether the
extension is critical criticalityIndicator, Set<String> a Set of expected policies expectedPolicySet, boolean a boolean indicating whether this
node was generated by a policy mapping generatedByPolicyMapping)Constructor which takes a |
| pack-priv | PolicyNodeImpl(PolicyNodeImpl
a PolicyNode that's the new parent of the node, or
null if this is the root node parent, PolicyNodeImpl a PolicyNode containing the policy data to copy node)Alternate constructor which makes a new node with the policy data
in an existing |
| Modifier and Type | Method and Description |
|---|---|
| private void | |
| pack-priv void | addExpectedPolicy(String
a String representing an expected policy. expectedPolicy)Adds an expectedPolicy to the expected policy set. |
| pack-priv String | |
| pack-priv PolicyNodeImpl | Returns: a copy of the treeReturns a copy of the tree, without copying the policy-related data, rooted at the node on which this was called. |
| private PolicyNodeImpl | |
| pack-priv void | deleteChild(PolicyNode
the child node to be deleted childNode)Deletes the specified child node of this node, if it exists. |
| public Iterator | getChildren()
Implements java. Returns an iterator over the children of this node. |
| public int | getDepth()
Implements java. Returns the depth of this node in the valid policy tree. |
| public Set | getExpectedPolicies()
Implements java. Returns the set of expected policies that would satisfy this node's valid policy in the next certificate to be processed. |
| public PolicyNode | getParent()
Implements java. Returns the parent of this node, or |
| pack-priv Set | Returns: aSet of all nodes at the specified depthan int representing the depth of the desired nodes depth)Returns all nodes at the specified depth in the tree. |
| private void | |
| pack-priv Set | Returns: a Set of matchedPolicyNodesan int representing the desired depth depth, String a String encoding the valid OID to match expectedOID, boolean a boolean indicating whether an expected_policy_set
containing ANY_POLICY should be considered a match matchAny)Finds all nodes at the specified depth whose expected_policy_set contains the specified expected OID (if matchAny is false) or the special OID "any value" (if matchAny is true). |
| private Set | |
| pack-priv Set | Returns: a Set of matchedPolicyNodesan int representing the desired depth depth, String a String encoding the valid OID to match validOID)Finds all nodes at the specified depth that contains the specified valid OID |
| public Set | getPolicyQualifiers()
Implements java. Returns the set of policy qualifiers associated with the valid policy represented by this node. |
| public String | getValidPolicy()
Implements java. Returns the valid policy represented by this node. |
| public boolean | isCritical()
Implements java. Returns the criticality indicator of the certificate policy extension in the most recently processed certificate. |
| pack-priv boolean | |
| private static String | |
| pack-priv void | prune(int
an int representing the desired minimum depth of all paths depth)Removes all paths which don't reach the specified depth. |
| pack-priv void | |
| public String | Returns: a String describing the contents of the Policy NodeOverrides java. Return a printable representation of the PolicyNode. |
| ANY_POLICY | back to summary |
|---|---|
| private static final String ANY_POLICY Use to specify the special policy "Any Policy" | |
| isImmutable | back to summary |
|---|---|
| private boolean isImmutable | |
| mChildren | back to summary |
|---|---|
| private final HashSet<PolicyNodeImpl> mChildren | |
| mCriticalityIndicator | back to summary |
|---|---|
| private final boolean mCriticalityIndicator | |
| mDepth | back to summary |
|---|---|
| private final int mDepth | |
| mExpectedPolicySet | back to summary |
|---|---|
| private final HashSet<String> mExpectedPolicySet | |
| mOriginalExpectedPolicySet | back to summary |
|---|---|
| private boolean mOriginalExpectedPolicySet | |
| mParent | back to summary |
|---|---|
| private final PolicyNodeImpl mParent | |
| mQualifierSet | back to summary |
|---|---|
| private final HashSet<PolicyQualifierInfo> mQualifierSet | |
| mValidPolicy | back to summary |
|---|---|
| private final String mValidPolicy | |
| PolicyNodeImpl | back to summary |
|---|---|
| pack-priv PolicyNodeImpl(PolicyNodeImpl parent, String validPolicy, Set<PolicyQualifierInfo> qualifierSet, boolean criticalityIndicator, Set<String> expectedPolicySet, boolean generatedByPolicyMapping) Constructor which takes a
| |
| PolicyNodeImpl | back to summary |
|---|---|
| pack-priv PolicyNodeImpl(PolicyNodeImpl parent, PolicyNodeImpl node) Alternate constructor which makes a new node with the policy data
in an existing
| |
| addChild | back to summary |
|---|---|
| private void addChild(PolicyNodeImpl child) Private method sets a child node. This is called from the child's constructor.
| |
| addExpectedPolicy | back to summary |
|---|---|
| pack-priv void addExpectedPolicy(String expectedPolicy) Adds an expectedPolicy to the expected policy set. If this is the original expected policy set initialized by the constructor, then the expected policy set is cleared before the expected policy is added.
| |
| asString | back to summary |
|---|---|
| pack-priv String asString() Prints out some data on this node. | |
| copyTree | back to summary |
|---|---|
| pack-priv PolicyNodeImpl copyTree() Returns a copy of the tree, without copying the policy-related data, rooted at the node on which this was called.
| |
| copyTree | back to summary |
|---|---|
| private PolicyNodeImpl copyTree(PolicyNodeImpl parent) | |
| deleteChild | back to summary |
|---|---|
| pack-priv void deleteChild(PolicyNode childNode) Deletes the specified child node of this node, if it exists.
| |
| getChildren | back to summary |
|---|---|
| public Iterator Implements java. Doc from java. Returns an iterator over the children of this node. Any attempts to
modify the children of this node through the
| |
| getDepth | back to summary |
|---|---|
| public int getDepth() Implements java. Doc from java. Returns the depth of this node in the valid policy tree.
| |
| getExpectedPolicies | back to summary |
|---|---|
| public Set Implements java. Doc from java. Returns the set of expected policies that would satisfy this node's valid policy in the next certificate to be processed.
| |
| getParent | back to summary |
|---|---|
| public PolicyNode getParent() Implements java. Doc from java. Returns the parent of this node, or
| |
| getPolicyNodes | back to summary |
|---|---|
| pack-priv Set Returns all nodes at the specified depth in the tree.
| |
| getPolicyNodes | back to summary |
|---|---|
| private void getPolicyNodes(int depth, Set<PolicyNodeImpl> set) Add all nodes at depth to set and return the Set. Internal recursion helper. | |
| getPolicyNodesExpected | back to summary |
|---|---|
| pack-priv Set Finds all nodes at the specified depth whose expected_policy_set contains the specified expected OID (if matchAny is false) or the special OID "any value" (if matchAny is true).
| |
| getPolicyNodesExpectedHelper | back to summary |
|---|---|
| private Set | |
| getPolicyNodesValid | back to summary |
|---|---|
| pack-priv Set Finds all nodes at the specified depth that contains the specified valid OID
| |
| getPolicyQualifiers | back to summary |
|---|---|
| public Set Implements java. Doc from java. Returns the set of policy qualifiers associated with the valid policy represented by this node.
| |
| getValidPolicy | back to summary |
|---|---|
| public String getValidPolicy() Implements java. Doc from java. Returns the valid policy represented by this node.
| |
| isCritical | back to summary |
|---|---|
| public boolean isCritical() Implements java. Doc from java. Returns the criticality indicator of the certificate policy extension in the most recently processed certificate.
| |
| isImmutable | back to summary |
|---|---|
| pack-priv boolean isImmutable() | |
| policyToString | back to summary |
|---|---|
| private static String policyToString(String oid) | |
| prune | back to summary |
|---|---|
| pack-priv void prune(int depth) Removes all paths which don't reach the specified depth.
| |
| setImmutable | back to summary |
|---|---|
| pack-priv void setImmutable() Sets the immutability flag of this node and all of its children to true. | |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Return a printable representation of the PolicyNode. Starting at the node on which this method is called, it recurses through the tree and prints out each node. | |