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.schema.XSBooleanValue; 26 27 /** 28 * SAML 2.0 Metadata AttributeAuthorityDescriptor 29 */ 30 public interface AttributeConsumingService extends SAMLObject { 31 32 /** Element name, no namespace */ 33 public final static String DEFAULT_ELEMENT_LOCAL_NAME = "AttributeConsumingService"; 34 35 /** Default element name */ 36 public final static QName DEFAULT_ELEMENT_NAME = new QName(SAMLConstants.SAML20MD_NS, DEFAULT_ELEMENT_LOCAL_NAME, 37 SAMLConstants.SAML20MD_PREFIX); 38 39 /** Local name of the XSI type */ 40 public final static String TYPE_LOCAL_NAME = "AttributeConsumingServiceType"; 41 42 /** QName of the XSI type */ 43 public final static QName TYPE_NAME = new QName(SAMLConstants.SAML20MD_NS, TYPE_LOCAL_NAME, 44 SAMLConstants.SAML20MD_PREFIX); 45 46 /** "index" attribute's local name */ 47 public final static String INDEX_ATTRIB_NAME = "index"; 48 49 /** "isDefault" attribute's local name */ 50 public final static String IS_DEFAULT_ATTRIB_NAME = "isDefault"; 51 52 /** 53 * Gets the index for this service. 54 * 55 * @return the index for this service 56 */ 57 public int getIndex(); 58 59 /** 60 * Sets the index for this service. 61 * 62 * @param index the index for this service 63 */ 64 public void setIndex(int index); 65 66 /** 67 * Checks if this is the default service for the service provider. 68 * 69 * @return true if this is the default service, false if not 70 */ 71 public Boolean isDefault(); 72 73 /** 74 * Checks if this is the default service for the service provider. 75 * 76 * @return true if this is the default service, false if not 77 */ 78 public XSBooleanValue isDefaultXSBoolean(); 79 80 /** 81 * Sets if this is the default service for the service provider. Boolean values will be marshalled to either "true" 82 * or "false". 83 * 84 * @param newIsDefault true if this is the default service, false if not 85 */ 86 public void setIsDefault(Boolean newIsDefault); 87 88 /** 89 * Sets if this is the default service for the service provider. 90 * 91 * @param newIsDefault true if this is the default service, false if not 92 */ 93 public void setIsDefault(XSBooleanValue newIsDefault); 94 95 /** 96 * Gets the list of names this service has. 97 * 98 * @return list of names this service has 99 */ 100 public List<ServiceName> getNames(); 101 102 /** 103 * Gets the descriptions for this service. 104 * 105 * @return descriptions for this service 106 */ 107 public List<ServiceDescription> getDescriptions(); 108 109 /** 110 * Gets the attributes this service requests. 111 * 112 * @return attributes this service requests 113 */ 114 public List<RequestedAttribute> getRequestAttributes(); 115 }