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.encryption; 18 19 import javax.xml.namespace.QName; 20 21 import org.opensaml.xml.util.XMLConstants; 22 23 /** 24 * XMLObject representing XML Encryption, version 20021210, EncryptedKey element. 25 */ 26 public interface EncryptedKey extends EncryptedType { 27 28 /** Element local name. */ 29 public static final String DEFAULT_ELEMENT_LOCAL_NAME = "EncryptedKey"; 30 31 /** Default element name. */ 32 public static final QName DEFAULT_ELEMENT_NAME = new QName(XMLConstants.XMLENC_NS, DEFAULT_ELEMENT_LOCAL_NAME, 33 XMLConstants.XMLENC_PREFIX); 34 35 /** Local name of the XSI type. */ 36 public static final String TYPE_LOCAL_NAME = "EncryptedKeyType"; 37 38 /** QName of the XSI type. */ 39 public static final QName TYPE_NAME = new QName(XMLConstants.XMLENC_NS, TYPE_LOCAL_NAME, 40 XMLConstants.XMLENC_PREFIX); 41 42 /** Recipient attribute name. */ 43 public static final String RECIPIENT_ATTRIB_NAME = "Recipient"; 44 45 /** 46 * Gets the hint about for whom this encrypted key is intended. 47 * 48 * @return the hint about who this encrypted key is intended for 49 */ 50 public String getRecipient(); 51 52 /** 53 * Sets the hint about for whom this encrypted key is intended. 54 * 55 * @param newRecipient the hint about who this encrypted key is intended for 56 */ 57 public void setRecipient(String newRecipient); 58 59 /** 60 * Gets the child element containing pointers to EncryptedData and EncryptedKey elements 61 * encrypted using this key. 62 * 63 * @return the element containing a list of pointers to encrypted elements 64 */ 65 public ReferenceList getReferenceList(); 66 67 /** 68 * Sets the child element containing pointers to EncryptedData and EncryptedKey elements 69 * encrypted using this key. 70 * 71 * @param newReferenceList the new reference list for this encrypted key 72 */ 73 public void setReferenceList(ReferenceList newReferenceList); 74 75 /** 76 * Gets the child element carrying the human readable name for this key. 77 * 78 * @return the human readable name for this key 79 */ 80 public CarriedKeyName getCarriedKeyName(); 81 82 /** 83 * Sets the child element carrying the human readable name for this key. 84 * 85 * @param newCarriedKeyName the human readable name for this key 86 */ 87 public void setCarriedKeyName(CarriedKeyName newCarriedKeyName); 88 89 }