|
JavaTM Platform Standard Ed. 6 |
|||||||||
전의 클래스 다음의 클래스 | 프레임 있어 프레임 없음 | |||||||||
개요: 상자 | 필드 | 생성자 | 메소드 | 상세: 필드 | 생성자 | 메소드 |
public interface KeyInfo
「W3C Recommendation for XML-Signature Syntax and Processing 」로 정의되고 있는 XML KeyInfo
요소의 표현. KeyInfo
에는,XMLStructure
의 리스트가 포함되어 있습니다. 각각의 XMLStructure
에는, XML 서명을 검증하기 위해서 필요한 열쇠를 수신자가 취득할 수 있도록(듯이) 하는 정보가 포함되고 있습니다. XML schema 정의는, 다음과 같이 정의됩니다.
<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
또는
빈 상태(empty)의 리스트가 돌려주어질 것은 없다. 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 2006 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms . Documentation Redistribution Policy 도 참조해 주세요.