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

## oracle.security.crypto.cmp.attribute
Class RegistrationControl

`java.lang.Object
oracle.security.crypto.cert.AttributeTypeAndValue
oracle.security.crypto.cmp.attribute.RegistrationControl`

All Implemented Interfaces:
  oracle.security.crypto.asn1.ASN1Object, oracle.security.crypto.util.Streamable

Direct Known Subclasses:
  AuthenticatorRegControl, OldCertIDRegControl, PKIArchiveOptionRegControl, PKIPubInfoRegControl, ProtocolEncrKeyRegControl, RegTokenRegControl

public class RegistrationControl
extends oracle.security.crypto.cert.AttributeTypeAndValue

CRMF base class for registration controls.

The CRMF specification (RFC 2511) defines several registration controls and their OIDs (e.g., id-regCtrl-pkiPublicationInfo) but, technically, any valid attributeTypeAndValue structure may be used. For ease of use, the classes representing the controls defined in CRMF provide methods for accessing their values that are tailored to their particular structures. For this reason, it is desirable that a registration control be cast-able to its subclass type after being input from, for example, a stream.

To facilitate this behavior, a static `inputInstance(java.io.InputStream)` method is provided in the `RegistrationControl` base class. For defined/recognized controls, the method returns an instance of the appropriate `RegistrationControl` subclass, which can then be cast to its real type. For all other valid `AttributeTypeAndValue` objects, an instance of the `RegistrationControl` base class is returned, which can be manipulated using its `AttributeTypeAndValue` superclass methods.

See Also:
  `AttributeTypeAndValue`

Field Summary
`protected boolean` | `decoded` This field is used for coordinating ASN.1 input with the superclass.
`protected boolean` | `encoded` This field is used for coordinating ASN.1 output with the superclass.

Constructor Summary
`RegistrationControl(oracle.security.crypto.asn1.ASN1ObjectID type, oracle.security.crypto.asn1.ASN1Object value)` Creates a new `RegistrationControl` instance.

Method Summary
`protected void` | `decodeValue()` Decodes the superclass `AttributeTypeAndValue`'s `ASN1Object` value to populate this control's fields.
`protected void` | `encodeValue()` Encodes this control's fields as an `ASN1Object` for the superclass `AttributeTypeAndValue`'s value.
`void` | `input(java.io.InputStream is)`
`static RegistrationControl` | `inputInstance(java.io.InputStream is)` Creates a new CRMF `RegistrationControl` by reading its encoding from the given input stream.
`int` | `length()`
`void` | `output(java.io.OutputStream os)`
`void` | `setValue(oracle.security.crypto.asn1.ASN1Object value)`

Methods inherited from class oracle.security.crypto.cert.AttributeTypeAndValue
`getType, getValue`

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

Field Detail

### encoded

    protected boolean encoded

  This field is used for coordinating ASN.1 output with the superclass. If the subclass representation of the value has been modified, `encoded` must be set to `false`. When the new value has been communicated to the superclass, `encoded` must be set to `true`.

  The initial value is `false`.

### decoded

    protected boolean decoded

  This field is used for coordinating ASN.1 input with the superclass. If the superclass representation of the value has been modified, `decoded` must be set to `false`. When the new value has been communicated to the subclass, `decoded` must be set to `true`.

  The initial value is `true`.

Constructor Detail

### RegistrationControl

    public RegistrationControl(oracle.security.crypto.asn1.ASN1ObjectID type,
                               oracle.security.crypto.asn1.ASN1Object value)

  Creates a new `RegistrationControl` instance.

Method Detail

### setValue

    public void setValue(oracle.security.crypto.asn1.ASN1Object value)

### encodeValue

    protected void encodeValue()

  Encodes this control's fields as an `ASN1Object` for the superclass `AttributeTypeAndValue`'s value.

  Subclasses must override this method to properly test and set the `encoded` field, and invoke the superclass `setValue(oracle.security.crypto.asn1.ASN1Object)` method to set the encoded structure.

### decodeValue

    protected void decodeValue()

  Decodes the superclass `AttributeTypeAndValue`'s `ASN1Object` value to populate this control's fields.

  Subclasses must override this method to invoke the superclass `AttributeTypeAndValue.getValue()` method to get the structure to decode, and properly test and set the `decoded` field.

### inputInstance

    public static RegistrationControl inputInstance(java.io.InputStream is)
                                             throws java.io.IOException

  Creates a new CRMF `RegistrationControl` by reading its encoding from the given input stream.
  Parameters:
    `is` - the input stream.
  Throws:
    `java.io.IOException` - if an I/O error occurs during input, or the encoding does not have the correct format.

### input

    public void input(java.io.InputStream is)
               throws java.io.IOException

  Throws:
    `java.io.IOException`

### output

    public void output(java.io.OutputStream os)
                throws java.io.IOException

  Throws:
    `java.io.IOException`

### length

    public int length()

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

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