Home » openjdk-7 » sun.security » provider » certpath » [javadoc | source]
final class: PolicyNodeImpl [javadoc | source]

All Implemented Interfaces:

Implements the 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.

 PolicyNodeImpl(PolicyNodeImpl parent,
    PolicyNodeImpl node) 
    Alternate constructor which makes a new node with the policy data in an existing PolicyNodeImpl.
    parent - a PolicyNode that's the new parent of the node, or null if this is the root node
    node - a PolicyNode containing the policy data to copy
 PolicyNodeImpl(PolicyNodeImpl parent,
    String validPolicy,
    Set<PolicyQualifierInfo> qualifierSet,
    boolean criticalityIndicator,
    Set<String> expectedPolicySet,
    boolean generatedByPolicyMapping) 
    Constructor which takes a PolicyNodeImpl representing the parent in the Policy Tree to this node. If null, this is the root of the tree. The constructor also takes the associated data for this node, as found in the certificate. It also takes a boolean argument specifying whether this node is being created as a result of policy mapping.
    parent - the PolicyNode above this in the tree, or null if this node is the tree's root node
    validPolicy - a String representing this node's valid policy OID
    qualifierSet - the Set of qualifiers for this policy
    criticalityIndicator - a boolean representing whether or not the extension is critical
    expectedPolicySet - a Set of expected policies
    generatedByPolicyMapping - a boolean indicating whether this node was generated by a policy mapping
Method from sun.security.provider.certpath.PolicyNodeImpl Summary:
addExpectedPolicy,   asString,   copyTree,   deleteChild,   getChildren,   getDepth,   getExpectedPolicies,   getParent,   getPolicyNodes,   getPolicyNodesExpected,   getPolicyNodesValid,   getPolicyQualifiers,   getValidPolicy,   isCritical,   isImmutable,   prune,   setImmutable,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from sun.security.provider.certpath.PolicyNodeImpl Detail:
  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.
 String asString() 
    Prints out some data on this node.
 PolicyNodeImpl copyTree() 
    Returns a copy of the tree, without copying the policy-related data, rooted at the node on which this was called.
  void deleteChild(PolicyNode childNode) 
    Deletes the specified child node of this node, if it exists.
 public Iterator<PolicyNodeImpl> getChildren() 
 public int getDepth() 
 public Set<String> getExpectedPolicies() 
 public PolicyNode getParent() 
 Set<PolicyNodeImpl> getPolicyNodes(int depth) 
    Returns all nodes at the specified depth in the tree.
 Set<PolicyNodeImpl> getPolicyNodesExpected(int depth,
    String expectedOID,
    boolean 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).
 Set<PolicyNodeImpl> getPolicyNodesValid(int depth,
    String validOID) 
    Finds all nodes at the specified depth that contains the specified valid OID
 public Set<PolicyQualifierInfo> getPolicyQualifiers() 
 public String getValidPolicy() 
 public boolean isCritical() 
 boolean isImmutable() 
  void prune(int depth) 
    Removes all paths which don't reach the specified depth.
  void setImmutable() 
    Sets the immutability flag of this node and all of its children to true.
 public String toString() 
    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.