View Javadoc

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.xml.SAMLConstants;
24  import org.opensaml.xml.schema.XSBooleanValue;
25  
26  /**
27   * SAML 2.0 Metadata SPSSODescriptorType
28   */
29  public interface SPSSODescriptor extends SSODescriptor {
30      /** Element name, no namespace */
31      public final static String DEFAULT_ELEMENT_LOCAL_NAME = "SPSSODescriptor";
32  
33      /** Default element name */
34      public final static QName DEFAULT_ELEMENT_NAME = new QName(SAMLConstants.SAML20MD_NS, DEFAULT_ELEMENT_LOCAL_NAME,
35              SAMLConstants.SAML20MD_PREFIX);
36  
37      /** Local name of the XSI type */
38      public final static String TYPE_LOCAL_NAME = "SPSSODescriptorType";
39  
40      /** QName of the XSI type */
41      public final static QName TYPE_NAME = new QName(SAMLConstants.SAML20MD_NS, TYPE_LOCAL_NAME,
42              SAMLConstants.SAML20MD_PREFIX);
43  
44      /** "AuthnRequestsSigned" attribute's local name */
45      public final static String AUTH_REQUESTS_SIGNED_ATTRIB_NAME = "AuthnRequestsSigned";
46  
47      /** "WantAssertionsSigned" attribute's local name */
48      public final static String WANT_ASSERTIONS_SIGNED_ATTRIB_NAME = "WantAssertionsSigned";
49  
50      /**
51       * Gets whether this service signs AuthN requests.
52       * 
53       * @return true of this service signs requests, false if not
54       */
55      public Boolean isAuthnRequestsSigned();
56  
57      /**
58       * Gets whether this service signs AuthN requests.
59       * 
60       * @return true of this service signs requests, false if not
61       */
62      public XSBooleanValue isAuthnRequestsSignedXSBoolean();
63  
64      /**
65       * Sets whether this service signs AuthN requests. Boolean values will be marshalled to either "true" or "false".
66       * 
67       * @param newIsSigned true of this service signs requests, false if not
68       */
69      public void setAuthnRequestsSigned(Boolean newIsSigned);
70  
71      /**
72       * Sets whether this service signs AuthN requests.
73       * 
74       * @param newIsSigned true of this service signs requests, false if not
75       */
76      public void setAuthnRequestsSigned(XSBooleanValue newIsSigned);
77  
78      /**
79       * Gets whether this service wants assertions signed.
80       * 
81       * @return true if this service wants assertions signed, false if not
82       */
83      public Boolean getWantAssertionsSigned();
84  
85      /**
86       * Gets whether this service wants assertions signed.
87       * 
88       * @return true if this service wants assertions signed, false if not
89       */
90      public XSBooleanValue getWantAssertionsSignedXSBoolean();
91  
92      /**
93       * Sets whether this service wants assertions signed. Boolean values will be marshalled to either "true" or "false".
94       * 
95       * @param newWantAssestionSigned true if this service wants assertions signed, false if not
96       */
97      public void setWantAssertionsSigned(Boolean newWantAssestionSigned);
98  
99      /**
100      * Sets whether this service wants assertions signed.
101      * 
102      * @param newWantAssestionSigned true if this service wants assertions signed, false if not
103      */
104     public void setWantAssertionsSigned(XSBooleanValue newWantAssestionSigned);
105 
106     /**
107      * Gets an list of assertion consumer service {@link Endpoint}s for this service.
108      * 
109      * @return list of assertion consumer service {@link Endpoint}s for this service
110      */
111     public List<AssertionConsumerService> getAssertionConsumerServices();
112     
113     /**
114      * Gets the default assertion consumer service or null if no service is marked as the default.
115      * 
116      * @return default assertion consumer service or null if no service is marked as the default
117      */
118     public AssertionConsumerService getDefaultAssertionConsumerService();
119 
120     /**
121      * Gets an list of attribute consuming service {@link Endpoint}s for this service.
122      * 
123      * @return list of attribute consuming service {@link Endpoint}s for this service
124      */
125     public List<AttributeConsumingService> getAttributeConsumingServices();
126     
127     /**
128      * Gets the default attribute consumer service or null if no service is marked as the default.
129      * 
130      * @return default attribute consumer service or null if no service is marked as the default
131      */
132     public AttributeConsumingService getDefaultAttributeConsumingService();
133 }