|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.rsa.certj.xml.KeyInfo | +--com.rsa.certj.xml.RetrievalMethod
This class builds and stores the 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.
See Also
Fields inherited from class com.rsa.certj.xml.KeyInfo |
KEYNAME_KEYINFO, KEYVALUE_KEYINFO, MGMTDATA_KEYINFO, MGMTDATA_TYPE, PGPDATA_KEYINFO, PGPDATA_TYPE, RETRIEVALMETHOD_KEYINFO, SPKIDATA_KEYINFO, SPKIDATA_TYPE, X509CERTIFICATE_TYPE, X509DATA_KEYINFO, X509DATA_TYPE |
Constructor Summary |
|
RetrievalMethod()
Creates an empty |
|
RetrievalMethod(String uri)
Creates a |
|
RetrievalMethod(String uri,
String type)
Creates a |
Method Summary |
|
clone()
Overrides the default |
|
org.w3c.dom.Element |
generateKeyInfo(org.w3c.dom.Document document,
String xmlNamespace,
String prefix)
This method takes whatever this |
getCertificates(CertJ certj)
Returns the certificates stored in this
|
|
com.rsa.jsafe.JSAFE_PublicKey |
getKey()
Returns the public key to be used for signature validation, if the
|
getKeyInfoName()
Returns the |
|
int |
getKeyInfoType()
Returns the |
boolean |
hasCertificate()
Determines whether the |
boolean |
hasKey()
Determines whether the |
void |
parseKeyInfo(org.w3c.dom.Element keyInfoNode,
String xmlNamespace)
This method processes the keyInfoNode, and retrieves the key or
certificates referred to by this |
void |
setCertificates(Certificate[] certificates)
Sets the certificates of this |
void |
setKey(com.rsa.jsafe.JSAFE_PublicKey key)
Sets the key of this |
void |
setType(String type)
Sets the |
void |
setURI(String uri)
Sets the URI of this |
Methods inherited from class com.rsa.certj.xml.KeyInfo |
getInstance |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RetrievalMethod()
RetrievalMethod
object.public RetrievalMethod(String uri)
RetrievalMethod
object by setting the URI
to uri.
Parameters
uri | A |
public RetrievalMethod(String uri, String type)
RetrievalMethod
object by setting uri
and type to the given String
values.
Parameters
uri | A | ||
type | An optional identifier for the type of data to retrieve. |
Method Detail |
public int getKeyInfoType()
keyInfo
type as an integer.
Overrides
getKeyInfoType
in class KeyInfo
Returns
keyInfo
type as an integer.public String getKeyInfoName()
keyInfo
name.
Overrides
getKeyInfoName
in class KeyInfo
Returns
keyInfo
name of this
RetrievalMethod
object as
a String
. The return value is
always "RetrievalMethod
."public org.w3c.dom.Element generateKeyInfo(org.w3c.dom.Document document, String xmlNamespace, String prefix) throws XMLException
KeyInfo
object contains and
creates a DOM Element object. The element will be attached to
document.
Overrides
generateKeyInfo
in class KeyInfo
Parameters
document | A DOM | ||
xmlNamespace | A | ||
prefix | A |
Returns
Element
object that stores all the information
of this KeyInfo
.Throws
XMLException
- If an error occured in generating the
KeyInfo
as an Element
.public void parseKeyInfo(org.w3c.dom.Element keyInfoNode, String xmlNamespace) throws XMLException
RetrievalMethod
object.
Overrides
parseKeyInfo
in class KeyInfo
Parameters
keyInfoNode | A DOM | ||
xmlNamespace | A |
Throws
XMLException
- If an error occured during processing
the keyInfo Element
object.public void setURI(String uri)
RetrievalMethod
object
to uri.
Parameters
uri | A |
public void setType(String type)
KeyInfo
type of this
RetrievalMethod
instance to type.
This method does not check the validity of the type value.
The type value
is checked during signing and when generating the
reference digest value.
Parameters
type | The identifier data type as a |
public Certificate[] getCertificates(CertJ certj) throws XMLException
RetrievalMethod
object.
Overrides
getCertificates
in class KeyInfo
Parameters
certj | A |
Returns
RetrievalMethod
object.Throws
XMLException
- If an error occurs in retrieving the
certificates stored in this KeyInfo
.public com.rsa.jsafe.JSAFE_PublicKey getKey() throws XMLException
keyInfo
to which this RetrievalMethod
refers contains a public key.
Overrides
getKey
in class KeyInfo
Returns
JSAFE_PublicKey
used to validate
the signature.Throws
XMLException
- If an error occurs during the retrieval of
the key.public boolean hasKey() throws XMLException
keyInfo
to which this
retrievalMethod
refers contains a
public key.
Overrides
hasKey
in class KeyInfo
Returns
true
if this RetrievalMethod
object contains a key; false
, otherwise.public boolean hasCertificate() throws XMLException
KeyInfo
to which this
RetrievalMethod
refers contains
certificates.
Overrides
hasCertificate
in class KeyInfo
Returns
true
if this RetrievalMethod
object contains
certificates; false
, otherwise.Throws
XMLException
- If an error occurs while determining whether
the keyInfo
for this RetrievalMethod
contains certificates.public void setKey(com.rsa.jsafe.JSAFE_PublicKey key) throws XMLException
RetrievalMethod
object to
key. RetrievalMethod
does
not store a key or certificates
directly, so do not call this method on a
RetrievalMethod
object.
Overrides
setKey
in class KeyInfo
Parameters
key | A |
Throws
XMLException
- Always throws an XMLException
,
because RetrievalMethod
does not store a key or certificates
directly.public void setCertificates(Certificate[] certificates) throws XMLException
RetrievalMethod
object to
certificates. RetrievalMethod
does not store a key or
certificates directly, so do not call this method on a
RetrievalMethod
object.
Overrides
setCertificates
in class KeyInfo
Parameters
certificates | A list of |
Throws
XMLException
- Always throws an XMLException
,
because a RetrievalMethod
does not store a key or certificates
directly.public Object clone() throws CloneNotSupportedException
clone
method to get a deeper clone.
Returns
RetrievalMethod
object,
a copy of this object.Throws
CloneNotSupportedException
- If the cloning operation failed.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |