com.rsa.swsj
Class RetrievalMethod

java.lang.Object
  extended bycom.rsa.swsj.Reference
      extended bycom.rsa.swsj.RetrievalMethod
All Implemented Interfaces:
KeyInfo

public final class RetrievalMethod
extends Reference
implements KeyInfo

This class builds and stores a RetrievalMethod element in KeyInfo. It is used to convey a reference to KeyInfo information that is stored at another location. It contains a URI that points to the real KeyInfo information and an optional field type that specifies the KeyInfo type. This URI is set with the setURI method in the Reference base class.


Field Summary

static java.lang.String

DSAKEY_VALUE_TYPE

A URL defining the type value of DSAKeyValue.

static java.lang.String

ENCRYPTED_KEY_TYPE

A URL defining the type value of EncryptedKey.

static java.lang.String

RSAKEY_VALUE_TYPE

A URL defining the type value of RSAKeyValue.

static java.lang.String

X509CERTIFICATE_TYPE

A URL defining the KeyInfo type as a binary X.509 certificate.

static java.lang.String

X509DATA_TYPE

A URL defining the type value of X509Data.

 
Fields inherited from class com.rsa.swsj.Reference
ALG_TRANSFORM_BASE64, ALG_TRANSFORM_C14N, ALG_TRANSFORM_C14N_WITH_COMMENTS, ALG_TRANSFORM_ENVELOPED_SIGNATURE, ALG_TRANSFORM_EXCLC14N, ALG_TRANSFORM_EXCLC14N_WITH_COMMENTS, ALG_TRANSFORM_XPATH
 
Constructor Summary
RetrievalMethod(SWSJContext context)

Creates an empty RetrievalMethod object initialized only with context.

RetrievalMethod(SWSJContext context, java.lang.String uri)

Creates a RetrievalMethod object by setting the URI to uri.

 
Method Summary

 java.security.cert.X509Certificate

getCertificate()

Gets a binary (ASN.1 DER) X.509 Certificate to which this RetrievalMethod refers.

 KeyInfo

getKeyInfo()

Gets the KeyInfo referred by this RetrievalMethod.

 java.lang.String

getType()

Gets the KeyInfo type of this RetrievalMethod instance.

 void

setCertificate(java.security.cert.X509Certificate cert)

Sets a binary (ASN.1 DER) X.509 Certificate to which this RetrievalMethod refers.

 void

setType(java.lang.String type)

Sets the KeyInfo type of this RetrievalMethod instance to type.

 
Methods inherited from class com.rsa.swsj.Reference
addTransform, getContext, getId, getTransformParams, getTransforms, getURI, setId, setURI
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.rsa.swsj.KeyInfo
getContext
 

Field Detail

ENCRYPTED_KEY_TYPE

public static final java.lang.String ENCRYPTED_KEY_TYPE
A URL defining the type value of EncryptedKey.

See Also:
Constant Field Values

X509CERTIFICATE_TYPE

public static final java.lang.String X509CERTIFICATE_TYPE
A URL defining the KeyInfo type as a binary X.509 certificate.

See Also:
Constant Field Values

X509DATA_TYPE

public static final java.lang.String X509DATA_TYPE
A URL defining the type value of X509Data.

See Also:
Constant Field Values

DSAKEY_VALUE_TYPE

public static final java.lang.String DSAKEY_VALUE_TYPE
A URL defining the type value of DSAKeyValue.

See Also:
Constant Field Values

RSAKEY_VALUE_TYPE

public static final java.lang.String RSAKEY_VALUE_TYPE
A URL defining the type value of RSAKeyValue.

See Also:
Constant Field Values
Constructor Detail

RetrievalMethod

public RetrievalMethod(SWSJContext context)
                throws InvalidParameterException
Creates an empty RetrievalMethod object initialized only with context.

Parameters:
context - object that collects a number of common parameters and state variables, e.g., JCE provider.
Throws:
InvalidParameterException - If context is invalid.

RetrievalMethod

public RetrievalMethod(SWSJContext context,
                       java.lang.String uri)
                throws InvalidParameterException
Creates a RetrievalMethod object by setting the URI to uri.

Parameters:
uri - A String object containing the URI in this RetrievalMethod object.
context - An object that collects a number of common parameters and state variables; for example, JCE provider.
Throws:
InvalidParameterException - If any parameter is invalid.
Method Detail

setType

public void setType(java.lang.String type)
             throws InvalidParameterException
Sets the KeyInfo type of this RetrievalMethod instance to type. Following are the valid values for this method: RetrievalMethod.ENCRYPTED_KEY_TYPE RetrievalMethod.X509CERTIFICATE_TYPE RetrievalMethod.X509DATA_TYPE RetrievalMethod.DSAKEY_VALUE_TYPE RetrievalMethod.RSAKEY_VALUE_TYPE

Parameters:
type - The identifier data type as a String value. This attribute is optional for RetrievalMethod.
Throws:
InvalidParameterException - If type is null or unsupported.

getType

public java.lang.String getType()
Gets the KeyInfo type of this RetrievalMethod instance.

Returns:
The identifier data type as a String value.

getKeyInfo

public KeyInfo getKeyInfo()
Gets the KeyInfo referred by this RetrievalMethod.

Returns:
The remote KeyInfo.

getCertificate

public java.security.cert.X509Certificate getCertificate()
Gets a binary (ASN.1 DER) X.509 Certificate to which this RetrievalMethod refers.

Returns:
The X.509 Certificate to which this RetrievalMethod refers.

setCertificate

public void setCertificate(java.security.cert.X509Certificate cert)
                    throws InvalidParameterException
Sets a binary (ASN.1 DER) X.509 Certificate to which this RetrievalMethod refers.

Parameters:
cert - The X.509 Certificate to which this RetrievalMethod should refer.
Throws:
InvalidParameterException