1 /* 2 * Copyright [2005] [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.saml2.metadata; 18 19 import java.util.List; 20 21 import javax.xml.namespace.QName; 22 23 import org.opensaml.common.SAMLObject; 24 import org.opensaml.common.xml.SAMLConstants; 25 import org.opensaml.xml.security.credential.UsageType; 26 import org.opensaml.xml.signature.KeyInfo; 27 28 public interface KeyDescriptor extends SAMLObject { 29 30 /** Element name, no namespace */ 31 public final static String DEFAULT_ELEMENT_LOCAL_NAME = "KeyDescriptor"; 32 33 /** Default element name */ 34 public final static QName DEFAULT_ELEMENT_NAME = new QName(SAMLConstants.SAML20MD_NS, DEFAULT_ELEMENT_LOCAL_NAME, SAMLConstants.SAML20MD_PREFIX); 35 36 /** Local name of the XSI type */ 37 public final static String TYPE_LOCAL_NAME = "KeyDescriptorType"; 38 39 /** QName of the XSI type */ 40 public final static QName TYPE_NAME = new QName(SAMLConstants.SAML20MD_NS, TYPE_LOCAL_NAME, SAMLConstants.SAML20MD_PREFIX); 41 42 /** "use" attribute's local name */ 43 public final static String USE_ATTRIB_NAME = "use"; 44 45 /** 46 * Gets the use of this key. 47 * 48 * @return the use of this key 49 */ 50 public UsageType getUse(); 51 52 /** 53 * Sets the use of this key. 54 * 55 * @param newType the use of this key 56 */ 57 public void setUse(UsageType newType); 58 59 /** 60 * Gets information about the key, including the key itself. 61 * 62 * @return information about the key, including the key itself 63 */ 64 public KeyInfo getKeyInfo(); 65 66 /** 67 * Sets information about the key, including the key itself. 68 * 69 * @param newKeyInfo information about the key, including the key itself 70 */ 71 public void setKeyInfo(KeyInfo newKeyInfo); 72 73 /** 74 * Gets the encryption methods that are supported by the entity. 75 * 76 * @return the encryption methods that are supported by the entity 77 */ 78 public List<EncryptionMethod> getEncryptionMethods(); 79 }