|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
public interface KeyInfo
「W3C Recommendation for XML-Signature Syntax and Processing」で定義されている XML KeyInfo 要素の表現。KeyInfo には、XMLStructure のリストが含まれています。それぞれの XMLStructure には、XML 署名を検証するために必要な鍵を受信者が取得できるようにする情報が格納されています。XML スキーマ定義は、次のように定義されます。
<element name="KeyInfo" type="ds:KeyInfoType"/>
<complexType name="KeyInfoType" mixed="true">
<choice maxOccurs="unbounded">
<element ref="ds:KeyName"/>
<element ref="ds:KeyValue"/>
<element ref="ds:RetrievalMethod"/>
<element ref="ds:X509Data"/>
<element ref="ds:PGPData"/>
<element ref="ds:SPKIData"/>
<element ref="ds:MgmtData"/>
<any processContents="lax" namespace="##other"/>
<!-- (1,1) elements from (0,unbounded) namespaces -->
</choice>
<attribute name="Id" type="ID" use="optional"/>
</complexType>
KeyInfo インスタンスは、KeyInfoFactory クラスの newKeyInfo メソッドの 1 つを呼び出し、それに 1 つ以上の XMLStructure および省略可能な id パラメータのリストを渡すことによって作成されます。次に例を示します。
KeyInfoFactory factory = KeyInfoFactory.getInstance("DOM");
KeyInfo keyInfo = factory.newKeyInfo
(Collections.singletonList(factory.newKeyName("Alice"), "keyinfo-1"));
KeyInfo オブジェクトは、marshal メソッドを呼び出すことによっても XML に整列化できます。
KeyInfoFactory.newKeyInfo(List),
KeyInfoFactory.newKeyInfo(List, String)| メソッドの概要 | |
|---|---|
List |
getContent()
鍵情報を格納する 変更不可能なリストを返します。 |
String |
getId()
この KeyInfo の省略可能な id 属性を返します。 |
void |
marshal(XMLStructure parent,
XMLCryptoContext context)
鍵情報を XML に整列化します。 |
| インタフェース javax.xml.crypto.XMLStructure から継承されたメソッド |
|---|
isFeatureSupported |
| メソッドの詳細 |
|---|
List getContent()
変更不可能なリストを返します。リストのそれぞれのエントリは、XMLStructure です。
XMLStructure の型を表現する public サブクラスがある場合、そのクラスのインスタンスとして返されます。たとえば、X509Data 要素は X509Data のインスタンスとして返されます。
KeyInfo 内の 1 つ以上の XMLStructure の変更不可能なリスト。null または空のリストが返されることはないString getId()
KeyInfo の省略可能な id 属性を返します。KeyInfo をほかの XML 構造から参照する場合に有用です。
KeyInfo の id 属性。指定されていない場合は null になることもある
void marshal(XMLStructure parent,
XMLCryptoContext context)
throws MarshalException
parent - 整列化された鍵情報が追加される親ノードを格納する、機構固有の構造context - 追加のコンテキストを格納する XMLCryptoContext。該当しない場合は null も可
ClassCastException - parent または context の型がこの鍵情報と互換性がない場合
MarshalException - 鍵情報を整列化できない場合
NullPointerException - parent が null の場合
|
JavaTM Platform Standard Ed. 6 |
|||||||||
| 前のクラス 次のクラス | フレームあり フレームなし | |||||||||
| 概要: 入れ子 | フィールド | コンストラクタ | メソッド | 詳細: フィールド | コンストラクタ | メソッド | |||||||||
Copyright 2009 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms. Documentation Redistribution Policy も参照してください。