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 /** 30 * XMLObject representing XML Digital Signature, version 20020212, KeyInfoType complex type. 31 */ 32 public interface KeyInfoType extends ValidatingXMLObject { 33 34 /** Local name of the XSI type */ 35 public final static String TYPE_LOCAL_NAME = "KeyInfoType"; 36 37 /** QName of the XSI type */ 38 public final static QName TYPE_NAME = new QName(XMLConstants.XMLSIG_NS, TYPE_LOCAL_NAME, XMLConstants.XMLSIG_PREFIX); 39 40 /** Id attribute name */ 41 public final static String ID_ATTRIB_NAME = "Id"; 42 43 /** 44 * Get the Id attribute value 45 * 46 * @return the Id attribute value 47 */ 48 public String getID(); 49 50 /** 51 * Set the Id attribute value 52 * 53 * @param newID the new Id attribute value 54 */ 55 public void setID(String newID); 56 57 /** 58 * Get the list of all XMLObject children 59 * 60 * @return the list of XMLObject children 61 */ 62 public List<XMLObject> getXMLObjects(); 63 64 /** 65 * Get the list of XMLObject children whose type or element 66 * QName matches the specified QName 67 * 68 * @param typeOrName the QName of the desired elements 69 * 70 * @return the matching list of XMLObject children 71 */ 72 public List<XMLObject> getXMLObjects(QName typeOrName); 73 74 /** 75 * Get the list of KeyName child elements 76 * 77 * @return the list of KeyName child elements 78 */ 79 public List<KeyName> getKeyNames(); 80 81 /** 82 * Get the list of KeyValue child elements 83 * 84 * @return the list of KeyValue child elements 85 */ 86 public List<KeyValue> getKeyValues(); 87 88 /** 89 * Get the list of RetrievalMethod child elements 90 * 91 * @return the list of RetrievalMethod child elements 92 */ 93 public List<RetrievalMethod> getRetrievalMethods(); 94 95 /** 96 * Get the list of X509Data child elements 97 * 98 * @return the list of X509Data child elements 99 */ 100 public List<X509Data> getX509Datas(); 101 102 /** 103 * Get the list of PGPData child elements 104 * 105 * @return the list of PGPData child elements 106 */ 107 public List<PGPData> getPGPDatas(); 108 109 /** 110 * Get the list of SPKIData child elements 111 * 112 * @return the list of SPKIData child elements 113 */ 114 public List<SPKIData> getSPKIDatas(); 115 116 /** 117 * Get the list of MgmtData child elements 118 * 119 * @return the list of MgmtData child elements 120 */ 121 public List<MgmtData> getMgmtDatas(); 122 123 /** 124 * Get the list of AgreementMethod child elements. 125 * 126 * Note: AgreementMethod is actually defined in the XML Encryption schema, 127 * and is not explicitly defined in the KeyInfoType content model, 128 * but for convenience this named getter method is exposed. 129 * 130 * @return the list of AgreementMethod child elements 131 */ 132 public List<AgreementMethod> getAgreementMethods(); 133 134 /** 135 * Get the list of EncryptedKey child elements 136 * 137 * Note: EncryptedKey is actually defined in the XML Encryption schema, 138 * and is not explicitly defined in the KeyInfoType content model, 139 * but for convenience this named getter method is exposed. 140 * 141 * @return the list of EncryptedKey child elements 142 */ 143 public List<EncryptedKey> getEncryptedKeys(); 144 145 }