java.security.cert
Interface PolicyNode


public interface PolicyNode

An immutable valid policy tree node as defined by the PKIX certification path validation algorithm.

One of the outputs of the PKIX certification path validation algorithm is a valid policy tree, which includes the policies that were determined to be valid, how this determination was reached, and any policy qualifiers encountered. This tree is of depth n, where n is the length of the certification path that has been validated.

Most applications will not need to examine the valid policy tree. They can achieve their policy processing goals by setting the policy-related parameters in PKIXParameters. However, the valid policy tree is available for more sophisticated applications, especially those that process policy qualifiers.

PKIXCertPathValidatorResult.getPolicyTree sample code for java.security.cert.PKIXCertPathValidatorResult.getPolicyTree() definition code for java.security.cert.PKIXCertPathValidatorResult.getPolicyTree() returns the root node of the valid policy tree. The tree can be traversed using the getChildren sample code for java.security.cert.PolicyNode.getChildren() definition code for java.security.cert.PolicyNode.getChildren() and getParent sample code for java.security.cert.PolicyNode.getParent() definition code for java.security.cert.PolicyNode.getParent() methods. Data about a particular node can be retrieved using other methods of PolicyNode.

Concurrent Access

All PolicyNode objects must be immutable and thread-safe. Multiple threads may concurrently invoke the methods defined in this class on a single PolicyNode object (or more than one) with no ill effects. This stipulation applies to all public fields and methods of this class and any added or overridden by subclasses.

Since:
1.4

Method Summary
 Iterator sample code for java.util.Iterator definition code for java.util.Iterator <? extends PolicyNode sample code for java.security.cert.PolicyNode definition code for java.security.cert.PolicyNode > getChildren sample code for java.security.cert.PolicyNode.getChildren() definition code for java.security.cert.PolicyNode.getChildren() ()
          Returns an iterator over the children of this node.
 int getDepth sample code for java.security.cert.PolicyNode.getDepth() definition code for java.security.cert.PolicyNode.getDepth() ()
          Returns the depth of this node in the valid policy tree.
 Set sample code for java.util.Set definition code for java.util.Set <String sample code for java.lang.String definition code for java.lang.String > getExpectedPolicies sample code for java.security.cert.PolicyNode.getExpectedPolicies() definition code for java.security.cert.PolicyNode.getExpectedPolicies() ()
          Returns the set of expected policies that would satisfy this node's valid policy in the next certificate to be processed.
 PolicyNode sample code for java.security.cert.PolicyNode definition code for java.security.cert.PolicyNode getParent sample code for java.security.cert.PolicyNode.getParent() definition code for java.security.cert.PolicyNode.getParent() ()
          Returns the parent of this node, or null if this is the root node.
 Set sample code for java.util.Set definition code for java.util.Set <? extends PolicyQualifierInfo sample code for java.security.cert.PolicyQualifierInfo definition code for java.security.cert.PolicyQualifierInfo > getPolicyQualifiers sample code for java.security.cert.PolicyNode.getPolicyQualifiers() definition code for java.security.cert.PolicyNode.getPolicyQualifiers() ()
          Returns the set of policy qualifiers associated with the valid policy represented by this node.
 String sample code for java.lang.String definition code for java.lang.String getValidPolicy sample code for java.security.cert.PolicyNode.getValidPolicy() definition code for java.security.cert.PolicyNode.getValidPolicy() ()
          Returns the valid policy represented by this node.
 boolean isCritical sample code for java.security.cert.PolicyNode.isCritical() definition code for java.security.cert.PolicyNode.isCritical() ()
          Returns the criticality indicator of the certificate policy extension in the most recently processed certificate.
 

Method Detail

getParent sample code for java.security.cert.PolicyNode.getParent() definition code for java.security.cert.PolicyNode.getParent()

PolicyNode sample code for java.security.cert.PolicyNode definition code for java.security.cert.PolicyNode  getParent()
Returns the parent of this node, or null if this is the root node.

Returns:
the parent of this node, or null if this is the root node

getChildren sample code for java.security.cert.PolicyNode.getChildren() definition code for java.security.cert.PolicyNode.getChildren()

Iterator sample code for java.util.Iterator definition code for java.util.Iterator <? extends PolicyNode sample code for java.security.cert.PolicyNode definition code for java.security.cert.PolicyNode > getChildren()
Returns an iterator over the children of this node. Any attempts to modify the children of this node through the Iterator's remove method must throw an UnsupportedOperationException.

Returns:
an iterator over the children of this node

getDepth sample code for java.security.cert.PolicyNode.getDepth() definition code for java.security.cert.PolicyNode.getDepth()

int getDepth()
Returns the depth of this node in the valid policy tree.

Returns:
the depth of this node (0 for the root node, 1 for its children, and so on)

getValidPolicy sample code for java.security.cert.PolicyNode.getValidPolicy() definition code for java.security.cert.PolicyNode.getValidPolicy()

String sample code for java.lang.String definition code for java.lang.String  getValidPolicy()
Returns the valid policy represented by this node.

Returns:
the String OID of the valid policy represented by this node, or the special value "any-policy". For the root node, this method always returns the special value "any-policy".

getPolicyQualifiers sample code for java.security.cert.PolicyNode.getPolicyQualifiers() definition code for java.security.cert.PolicyNode.getPolicyQualifiers()

Set sample code for java.util.Set definition code for java.util.Set <? extends PolicyQualifierInfo sample code for java.security.cert.PolicyQualifierInfo definition code for java.security.cert.PolicyQualifierInfo > getPolicyQualifiers()
Returns the set of policy qualifiers associated with the valid policy represented by this node.

Returns:
an immutable Set of PolicyQualifierInfos. For the root node, this is always an empty Set.

getExpectedPolicies sample code for java.security.cert.PolicyNode.getExpectedPolicies() definition code for java.security.cert.PolicyNode.getExpectedPolicies()

Set sample code for java.util.Set definition code for java.util.Set <String sample code for java.lang.String definition code for java.lang.String > getExpectedPolicies()
Returns the set of expected policies that would satisfy this node's valid policy in the next certificate to be processed.

Returns:
an immutable Set of expected policy String OIDs, or an immutable Set with the single special value "any-policy". For the root node, this method always returns a Set with the single value "any-policy".

isCritical sample code for java.security.cert.PolicyNode.isCritical() definition code for java.security.cert.PolicyNode.isCritical()

boolean isCritical()
Returns the criticality indicator of the certificate policy extension in the most recently processed certificate.

Returns:
true if extension marked critical, false otherwise. For the root node, false is always returned.