1 /*
2 * Copyright 2006 University Corporation for Advanced Internet Development, Inc.
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17 package org.opensaml.xml.signature;
18
19 import java.util.List;
20
21 import javax.xml.namespace.QName;
22
23 import org.opensaml.xml.XMLObject;
24 import org.opensaml.xml.encryption.AgreementMethod;
25 import org.opensaml.xml.encryption.EncryptedKey;
26 import org.opensaml.xml.util.XMLConstants;
27 import org.opensaml.xml.validation.ValidatingXMLObject;
28
29 /** XMLObject representing XML Digital Signature, version 20020212, KeyInfoType complex type. */
30 public interface KeyInfoType extends ValidatingXMLObject {
31
32 /** Local name of the XSI type. */
33 public static final String TYPE_LOCAL_NAME = "KeyInfoType";
34
35 /** QName of the XSI type. */
36 public static final QName TYPE_NAME = new QName(XMLConstants.XMLSIG_NS, TYPE_LOCAL_NAME, XMLConstants.XMLSIG_PREFIX);
37
38 /** Id attribute name. */
39 public static final String ID_ATTRIB_NAME = "Id";
40
41 /**
42 * Get the Id attribute value.
43 *
44 * @return the Id attribute value
45 */
46 public String getID();
47
48 /**
49 * Set the Id attribute value.
50 *
51 * @param newID the new Id attribute value
52 */
53 public void setID(String newID);
54
55 /**
56 * Get the list of all XMLObject children.
57 *
58 * @return the list of XMLObject children
59 */
60 public List<XMLObject> getXMLObjects();
61
62 /**
63 * Get the list of XMLObject children whose type or element QName matches the specified QName.
64 *
65 * @param typeOrName the QName of the desired elements
66 *
67 * @return the matching list of XMLObject children
68 */
69 public List<XMLObject> getXMLObjects(QName typeOrName);
70
71 /**
72 * Get the list of KeyName child elements.
73 *
74 * @return the list of KeyName child elements
75 */
76 public List<KeyName> getKeyNames();
77
78 /**
79 * Get the list of KeyValue child elements.
80 *
81 * @return the list of KeyValue child elements
82 */
83 public List<KeyValue> getKeyValues();
84
85 /**
86 * Get the list of RetrievalMethod child elements.
87 *
88 * @return the list of RetrievalMethod child elements
89 */
90 public List<RetrievalMethod> getRetrievalMethods();
91
92 /**
93 * Get the list of X509Data child elements.
94 *
95 * @return the list of X509Data child elements
96 */
97 public List<X509Data> getX509Datas();
98
99 /**
100 * Get the list of PGPData child elements.
101 *
102 * @return the list of PGPData child elements
103 */
104 public List<PGPData> getPGPDatas();
105
106 /**
107 * Get the list of SPKIData child elements.
108 *
109 * @return the list of SPKIData child elements
110 */
111 public List<SPKIData> getSPKIDatas();
112
113 /**
114 * Get the list of MgmtData child elements.
115 *
116 * @return the list of MgmtData child elements
117 */
118 public List<MgmtData> getMgmtDatas();
119
120 /**
121 * Get the list of AgreementMethod child elements.
122 *
123 * Note: AgreementMethod is actually defined in the XML Encryption schema, and is not explicitly defined in the
124 * KeyInfoType content model, but for convenience this named getter method is exposed.
125 *
126 * @return the list of AgreementMethod child elements
127 */
128 public List<AgreementMethod> getAgreementMethods();
129
130 /**
131 * Get the list of EncryptedKey child elements
132 *
133 * Note: EncryptedKey is actually defined in the XML Encryption schema, and is not explicitly defined in the
134 * KeyInfoType content model, but for convenience this named getter method is exposed.
135 *
136 * @return the list of EncryptedKey child elements
137 */
138 public List<EncryptedKey> getEncryptedKeys();
139
140 }