Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools Security Engine Java API Reference 10g Release 3 (10.1.3) B25381-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## oracle.security.crypto.cert
Class CertificateStatus

`java.lang.Object
oracle.security.crypto.cert.CertificateStatus`

All Implemented Interfaces:
  java.io.Serializable

public class CertificateStatus
extends java.lang.Object
implements java.io.Serializable

Objects of this class represent the status of a certificate. They are returned by the methods of `CertificateValidator` and its subclasses.

A certificate status consists of the following components:

- A status code, which is one of the following values:

  UNKNOWN | The status of the certificate is unknown.
  VALID | The certificate is valid.
  INVALID | The certificate is invalid.
  REVOKED | The certificate has been revoked.
  EXPIRED | The certificate has expired (or is not yet valid).
  ON_HOLD | The certificate has been put on hold.

- Optional. A string which describes the reason the certificate was given this status.
- Optional. A revocation date.

See Also:
  `CertificateValidator`, Serialized Form

Field Summary
`static int` | `EXPIRED` Status code for certificates which have expired (or are not yet valid).
`static int` | `INVALID` Status code for invalid certificates.
`static int` | `ON_HOLD` Status code for certificates which have been put on hold.
`protected java.lang.String` | `reason` The reason for this status.\
`protected java.util.Date` | `revocationDate` The revocation date.
`static int` | `REVOKED` Status code for certificates which have been revoked.
`protected int` | `statusCode` The status code.
`protected static java.lang.String[]` | `statusCodeStrs` Used by `toString()` to find the description of a status code.
`static int` | `UNKNOWN` Status code for certificates of unknown status.
`static int` | `VALID` Status code for valid certificates.

Constructor Summary
`CertificateStatus()` Creates a new certificate status object with UNKNOWN status code.
`CertificateStatus(int statusCode)` Creates a new certificate status object with the specified status code.
`CertificateStatus(int statusCode, java.lang.String reason)` Creates a new certificate status object with the specified status code and reason.

Method Summary
`java.lang.String` | `getReason()` Get the reason for this status.
`java.util.Date` | `getRevocationDate()` If the status code is REVOKED, use this method to get the revocation date, if set.
`int` | `getStatusCode()` Get the status code.
`java.lang.String` | `getStatusCodeString()` Get the string representation for the status code.
`void` | `setReason(java.lang.String reason)` Set the reason for this status, as an arbitrary string.
`void` | `setRevocationDate(java.util.Date revocationDate)` If the status code is REVOKED, use this method to set the revocation date.
`void` | `setStatusCode(int statusCode)` Set the status code.
`void` | `setStatusCode(java.lang.String s)` Set the status code from a string.
`java.lang.String` | `toString()` Returns a string which describes this certificate status object.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### UNKNOWN

    public static final int UNKNOWN

  Status code for certificates of unknown status.
  See Also:
    Constant Field Values

### VALID

    public static final int VALID

  Status code for valid certificates.
  See Also:
    Constant Field Values

### INVALID

    public static final int INVALID

  Status code for invalid certificates.
  See Also:
    Constant Field Values

### REVOKED

    public static final int REVOKED

  Status code for certificates which have been revoked.
  See Also:
    Constant Field Values

### EXPIRED

    public static final int EXPIRED

  Status code for certificates which have expired (or are not yet valid).
  See Also:
    Constant Field Values

### ON_HOLD

    public static final int ON_HOLD

  Status code for certificates which have been put on hold.
  See Also:
    Constant Field Values

### statusCodeStrs

    protected static final java.lang.String[] statusCodeStrs

  Used by `toString()` to find the description of a status code.

### statusCode

    protected int statusCode

  The status code.

### reason

    protected java.lang.String reason

  The reason for this status.\

### revocationDate

    protected java.util.Date revocationDate

  The revocation date.

Constructor Detail

### CertificateStatus

    public CertificateStatus()

  Creates a new certificate status object with UNKNOWN status code.

### CertificateStatus

    public CertificateStatus(int statusCode)

  Creates a new certificate status object with the specified status code.

### CertificateStatus

    public CertificateStatus(int statusCode,
                             java.lang.String reason)

  Creates a new certificate status object with the specified status code and reason.

Method Detail

### getStatusCode

    public int getStatusCode()

  Get the status code. Uses one of the constants defined in this class.

### getStatusCodeString

    public java.lang.String getStatusCodeString()

  Get the string representation for the status code. Returns one of: `"UNKNOWN", "VALID", "INVALID", "REVOKED", "EXPIRED", "ON_HOLD"`.

### setStatusCode

    public void setStatusCode(int statusCode)

  Set the status code. Use one of the constants defined in this class.

### setStatusCode

    public void setStatusCode(java.lang.String s)

  Set the status code from a string. Use one of: `"UNKNOWN", "VALID", "INVALID", "REVOKED", "EXPIRED", "ON_HOLD"`. Any other string will be treated as `"UNKNOWN"`.

### getReason

    public java.lang.String getReason()

  Get the reason for this status. May return null.

### setReason

    public void setReason(java.lang.String reason)

  Set the reason for this status, as an arbitrary string. May be null.

### getRevocationDate

    public java.util.Date getRevocationDate()

  If the status code is REVOKED, use this method to get the revocation date, if set. May return null.

### setRevocationDate

    public void setRevocationDate(java.util.Date revocationDate)

  If the status code is REVOKED, use this method to set the revocation date.

### toString

    public java.lang.String toString()

  Returns a string which describes this certificate status object. The string includes information about the status code, the level (if it has been set), the reason (if present), and the revocation date (if present).

Overview | Package | Class | Tree | Deprecated | Index | Help
| Oracle Security Developer Tools Security Engine Java API Reference 10g Release 3 (10.1.3) B25381-01
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005, 2006 , Oracle. All rights reserved.