public class

PolicyInformation

extends Object
java.lang.Object
   ↳ sun.security.x509.PolicyInformation

Class Overview

PolicyInformation is the class that contains a specific certificate policy that is part of the CertificatePoliciesExtension. A CertificatePolicyExtension value consists of a vector of these objects.

The ASN.1 syntax for PolicyInformation (IMPLICIT tagging is defined in the module definition):


 PolicyInformation ::= SEQUENCE {
      policyIdentifier   CertPolicyId,
      policyQualifiers   SEQUENCE SIZE (1..MAX) OF
                              PolicyQualifierInfo OPTIONAL }

 CertPolicyId ::= OBJECT IDENTIFIER

 PolicyQualifierInfo ::= SEQUENCE {
      policyQualifierId  PolicyQualifierId,
      qualifier          ANY DEFINED BY policyQualifierId }
 

Summary

Constants
String ID
String NAME
String QUALIFIERS
Public Constructors
PolicyInformation(CertificatePolicyId policyIdentifier, Set<PolicyQualifierInfo> policyQualifiers)
Create an instance of PolicyInformation
PolicyInformation(DerValue val)
Create an instance of PolicyInformation, decoding from the passed DerValue.
Public Methods
void delete(String name)
Delete the attribute value.
void encode(DerOutputStream out)
Write the PolicyInformation to the DerOutputStream.
boolean equals(Object other)
Compare this PolicyInformation with another object for equality
Object get(String name)
Get the attribute value.
Enumeration<String> getElements()
Return an enumeration of names of attributes existing within this attribute.
String getName()
Return the name of this attribute.
CertificatePolicyId getPolicyIdentifier()
Return the policyIdentifier value
Set<PolicyQualifierInfo> getPolicyQualifiers()
Return the policyQualifiers value
int hashCode()
Returns the hash code for this PolicyInformation.
void set(String name, Object obj)
Set the attribute value.
String toString()
Return a printable representation of the PolicyInformation.
[Expand]
Inherited Methods
From class java.lang.Object

Constants

public static final String ID

Constant Value: "id"

public static final String NAME

Constant Value: "PolicyInformation"

public static final String QUALIFIERS

Constant Value: "qualifiers"

Public Constructors

public PolicyInformation (CertificatePolicyId policyIdentifier, Set<PolicyQualifierInfo> policyQualifiers)

Create an instance of PolicyInformation

Parameters
policyIdentifier the policyIdentifier as a CertificatePolicyId
policyQualifiers a Set of PolicyQualifierInfo objects. Must not be NULL. Specify an empty Set for no qualifiers.
Throws
IOException on decoding errors.

public PolicyInformation (DerValue val)

Create an instance of PolicyInformation, decoding from the passed DerValue.

Parameters
val the DerValue to construct the PolicyInformation from.
Throws
IOException on decoding errors.

Public Methods

public void delete (String name)

Delete the attribute value.

Throws
IOException

public void encode (DerOutputStream out)

Write the PolicyInformation to the DerOutputStream.

Parameters
out the DerOutputStream to write the extension to.
Throws
IOException on encoding errors.

public boolean equals (Object other)

Compare this PolicyInformation with another object for equality

Parameters
other object to be compared with this
Returns
  • true iff the PolicyInformation objects match

public Object get (String name)

Get the attribute value.

Throws
IOException

public Enumeration<String> getElements ()

Return an enumeration of names of attributes existing within this attribute.

public String getName ()

Return the name of this attribute.

public CertificatePolicyId getPolicyIdentifier ()

Return the policyIdentifier value

Returns
  • The CertificatePolicyId object containing the policyIdentifier (not a copy).

public Set<PolicyQualifierInfo> getPolicyQualifiers ()

Return the policyQualifiers value

Returns
  • a Set of PolicyQualifierInfo objects associated with this certificate policy (not a copy). Returns an empty Set if there are no qualifiers. Never returns null.

public int hashCode ()

Returns the hash code for this PolicyInformation.

Returns
  • a hash code value.

public void set (String name, Object obj)

Set the attribute value.

Throws
IOException

public String toString ()

Return a printable representation of the PolicyInformation.

Returns
  • a string representation of the object.