Java Doc for KeyInfo.java in  » 6.0-JDK-Core » xml » javax » xml » crypto » dsig » keyinfo » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Home
Java Source Code / Java Documentation
1.6.0 JDK Core
2.6.0 JDK Modules
3.6.0 JDK Modules com.sun
4.6.0 JDK Modules com.sun.java
5.6.0 JDK Modules sun
6.6.0 JDK Platform
7.Ajax
8.Apache Harmony Java SE
9.Aspect oriented
10.Authentication Authorization
11.Blogger System
12.Build
13.Byte Code
14.Cache
15.Chart
16.Chat
17.Code Analyzer
18.Collaboration
19.Content Management System
20.Database Client
21.Database DBMS
22.Database JDBC Connection Pool
23.Database ORM
24.Development
25.EJB Server
26.ERP CRM Financial
27.ESB
28.Forum
29.Game
30.GIS
31.Graphic 3D
32.Graphic Library
33.Groupware
34.HTML Parser
35.IDE
36.IDE Eclipse
37.IDE Netbeans
38.Installer
39.Internationalization Localization
40.Inversion of Control
41.Issue Tracking
42.J2EE
43.J2ME
44.JBoss
45.JMS
46.JMX
47.Library
48.Mail Clients
49.Music
50.Net
51.Parser
52.PDF
53.Portal
54.Profiler
55.Project Management
56.Report
57.RSS RDF
58.Rule Engine
59.Science
60.Scripting
61.Search Engine
62.Security
63.Sevlet Container
64.Source Control
65.Swing Library
66.Template Engine
67.Test Coverage
68.Testing
69.UML
70.Web Crawler
71.Web Framework
72.Web Mail
73.Web Server
74.Web Services
75.Web Services apache cxf 2.2.6
76.Web Services AXIS2
77.Wiki Engine
78.Workflow Engines
79.XML
80.XML UI
Java Source Code / Java Documentation » 6.0 JDK Core » xml » javax.xml.crypto.dsig.keyinfo 
Source Cross Reference  Class Diagram Java Document (Java Doc) 


javax.xml.crypto.dsig.keyinfo.KeyInfo

KeyInfo
public interface KeyInfo extends XMLStructure(Code)
A representation of the XML KeyInfo element as defined in the W3C Recommendation for XML-Signature Syntax and Processing. A KeyInfo contains a list of XMLStructure s, each of which contain information that enables the recipient(s) to obtain the key needed to validate an XML signature. The XML Schema Definition is defined as:
 <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>
 
A KeyInfo instance may be created by invoking one of the KeyInfoFactory.newKeyInfo newKeyInfo methods of the KeyInfoFactory class, and passing it a list of one or more XMLStructures and an optional id parameter; for example:
 KeyInfoFactory factory = KeyInfoFactory.getInstance("DOM");
 KeyInfo keyInfo = factory.newKeyInfo
 (Collections.singletonList(factory.newKeyName("Alice"), "keyinfo-1"));
 

KeyInfo objects can also be marshalled to XML by invoking the KeyInfo.marshal marshal method.
author:
   Sean Mullan
author:
   JSR 105 Expert Group
since:
   1.6
See Also:   KeyInfoFactory.newKeyInfo(List)
See Also:   KeyInfoFactory.newKeyInfo(ListString)





Method Summary
 ListgetContent()
     Returns an java.util.Collections.unmodifiableList unmodifiable list containing the key information.
 StringgetId()
     Return the optional Id attribute of this KeyInfo, which may be useful for referencing this KeyInfo from other XML structures.
 voidmarshal(XMLStructure parent, XMLCryptoContext context)
     Marshals the key info to XML.



Method Detail
getContent
List getContent()(Code)
Returns an java.util.Collections.unmodifiableList unmodifiable list containing the key information. Each entry of the list is an XMLStructure .

If there is a public subclass representing the type of XMLStructure, it is returned as an instance of that class (ex: an X509Data element would be returned as an instance of javax.xml.crypto.dsig.keyinfo.X509Data ). an unmodifiable list of one or more XMLStructures in this KeyInfo. Never returns null or anempty list.




getId
String getId()(Code)
Return the optional Id attribute of this KeyInfo, which may be useful for referencing this KeyInfo from other XML structures. the Id attribute of this KeyInfo (may be null if not specified)



marshal
void marshal(XMLStructure parent, XMLCryptoContext context) throws MarshalException(Code)
Marshals the key info to XML.
Parameters:
  parent - a mechanism-specific structure containing the parent nodethat the marshalled key info will be appended to
Parameters:
  context - the XMLCryptoContext containing additionalcontext (may be null if not applicable)
throws:
  ClassCastException - if the type of parent orcontext is not compatible with this key info
throws:
  MarshalException - if the key info cannot be marshalled
throws:
  NullPointerException - if parent is null



www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.