モジュール java.xml.crypto

インタフェースRetrievalMethod

すべてのスーパー・インタフェース:
URIReference, XMLStructure

public interface RetrievalMethod extends URIReference, XMLStructure
W3C Recommendation for XML-Signature Syntax and Processing」で定義されているXML RetrievalMethod要素の表現。 RetrievalMethodオブジェクトは、別の場所に格納されているKeyInfo情報への参照を送信するために使用されます。 XMLスキーマ定義は、次のように定義されます。
   <element name="RetrievalMethod" type="ds:RetrievalMethodType"/>
   <complexType name="RetrievalMethodType">
     <sequence>
       <element name="Transforms" type="ds:TransformsType" minOccurs="0"/>
     </sequence>
     <attribute name="URI" type="anyURI"/>
     <attribute name="Type" type="anyURI" use="optional"/>
   </complexType>
 
RetrievalMethodインスタンスは、KeyInfoFactoryクラスのnewRetrievalMethodメソッドの1つを呼び出し、KeyInfoの位置を識別するURI、オプションのKeyInfoの型を識別する型URI、およびオプションのTransformのリストを渡すことによって作成されます。たとえば:
   KeyInfoFactory factory = KeyInfoFactory.getInstance("DOM");
   RetrievalMethod rm = factory.newRetrievalMethod
      ("#KeyValue-1", KeyValue.DSA_TYPE, Collections.singletonList(Transform.BASE64));
 
導入されたバージョン:
1.6
関連項目:
  • メソッドの詳細

    • getTransforms

      List<Transform> getTransforms()
      このRetrievalMethodTransformunmodifiable listを返します。
      戻り値:
      Transformオブジェクトの変更不可能なリスト。空の場合もあるがnullになることはない。
    • getURI

      String getURI()
      参照されたKeyInfo情報のURIを返します。
      定義:
      getURI、インタフェースURIReference
      戻り値:
      RFC 2396形式の、参照されたKeyInfo情報のURI。nullになることはない
    • dereference

      このRetrievalMethodによって参照されるKeyInfo情報を間接参照し、指定したTransformを適用します。
      パラメータ:
      context - URIの間接参照に役立つ追加情報が含まれている場合のあるXMLCryptoContext コンテキストのbaseURIおよびdereferencerパラメータ(指定されている場合)は、このRetrievalMethodの解決と間接参照に使用される
      戻り値:
      このRetrievalMethodによって参照されるKeyInfo情報のrawコンテンツを表すDataオブジェクト。 呼出し側で、返されたデータを適切なKeyInfoオブジェクトに変換する必要がある。
      例外:
      NullPointerException - contextnullである場合
      URIReferenceException - 間接参照の間にエラーが発生した場合