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.saml1.core;
18  
19  import javax.xml.namespace.QName;
20  
21  import org.opensaml.common.SAMLObject;
22  import org.opensaml.common.xml.SAMLConstants;
23  
24  /**
25   * This interface defines how the object representing a SAML 1 <code> StatusCode</code> element behaves.
26   */
27  public interface StatusCode extends SAMLObject {
28  
29      /** Element name, no namespace. */
30      public static final String DEFAULT_ELEMENT_LOCAL_NAME = "StatusCode";
31  
32      /** Default element name. */
33      public static final QName DEFAULT_ELEMENT_NAME = new QName(SAMLConstants.SAML10P_NS, DEFAULT_ELEMENT_LOCAL_NAME,
34              SAMLConstants.SAML1P_PREFIX);
35  
36      /** Local name of the XSI type. */
37      public static final String TYPE_LOCAL_NAME = "StatusCodeType";
38  
39      /** QName of the XSI type. */
40      public static final QName TYPE_NAME = new QName(SAMLConstants.SAML10P_NS, TYPE_LOCAL_NAME,
41              SAMLConstants.SAML1P_PREFIX);
42  
43      /** Success status value. */
44      public static final QName SUCCESS = new QName(SAMLConstants.SAML10P_NS, "Success", SAMLConstants.SAML1P_PREFIX);
45  
46      /** VersionMismatch status value. */
47      public static final QName VERSION_MISMATCH = new QName(SAMLConstants.SAML10P_NS, "VersionMismatch",
48              SAMLConstants.SAML1P_PREFIX);
49  
50      /** Requester status value. */
51      public static final QName REQUESTER = new QName(SAMLConstants.SAML10P_NS, "Requester", SAMLConstants.SAML1P_PREFIX);
52  
53      /** Responder status value. */
54      public static final QName RESPONDER = new QName(SAMLConstants.SAML10P_NS, "Responder", SAMLConstants.SAML1P_PREFIX);
55  
56      /** RequestVersionTooHigh status value. */
57      public static final QName REQUEST_VERSION_TOO_HIGH = new QName(SAMLConstants.SAML10P_NS, "RequestVersionTooHigh",
58              SAMLConstants.SAML1P_PREFIX);
59  
60      /** RequestVersionTooLow status value. */
61      public static final QName REQUEST_VERSION_TOO_LOW = new QName(SAMLConstants.SAML10P_NS, "RequestVersionTooLow",
62              SAMLConstants.SAML1P_PREFIX);
63  
64      /** RequestVersionDepricated status value. */
65      public static final QName REQUEST_VERSION_DEPRICATED = new QName(SAMLConstants.SAML10P_NS,
66              "RequestVersionDepricated", SAMLConstants.SAML1P_PREFIX);
67  
68      /** TooManyResponses status value. */
69      public static final QName TOO_MANY_RESPONSES = new QName(SAMLConstants.SAML10P_NS, "TooManyResponses",
70              SAMLConstants.SAML1P_PREFIX);
71  
72      /** RequestDenied status value. */
73      public static final QName REQUEST_DENIED = new QName(SAMLConstants.SAML10P_NS, "RequestDenied",
74              SAMLConstants.SAML1P_PREFIX);
75  
76      /** ResourceNotRecognized status value. */
77      public static final QName RESOURCE_NOT_RECOGNIZED = new QName(SAMLConstants.SAML10P_NS, "ResourceNotRecognized",
78              SAMLConstants.SAML1P_PREFIX);
79  
80      /** Name for the attribute which defines the Value. */
81      public static final String VALUE_ATTRIB_NAME = "Value";
82  
83      /**
84       * Gets the value of the status code.
85       * 
86       * @return value of the status code
87       */
88      public QName getValue();
89  
90      /**
91       * Sets the value of the status code.
92       * 
93       * @param value value of the status code
94       */
95      public void setValue(QName value);
96  
97      /**
98       * Gets the second level status code.
99       * 
100      * @return second level status code
101      */
102     public StatusCode getStatusCode();
103 
104     /**
105      * Sets the second level status code.
106      * 
107      * @param statusCode second level status code
108      * @throws IllegalArgumentException
109      */
110     public void setStatusCode(StatusCode statusCode);
111 }