001/**
002 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003 *
004 * Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved
005 *
006 * The contents of this file are subject to the terms
007 * of the Common Development and Distribution License
008 * (the License). You may not use this file except in
009 * compliance with the License.
010 *
011 * You can obtain a copy of the License at
012 * https://opensso.dev.java.net/public/CDDLv1.0.html or
013 * opensso/legal/CDDLv1.0.txt
014 * See the License for the specific language governing
015 * permission and limitations under the License.
016 *
017 * When distributing Covered Code, include this CDDL
018 * Header Notice in each file and include the License file
019 * at opensso/legal/CDDLv1.0.txt.
020 * If applicable, add the following below the CDDL Header,
021 * with the fields enclosed by brackets [] replaced by
022 * your own identifying information:
023 * "Portions Copyrighted [year] [name of copyright owner]"
024 *
025 * $Id: StatusCode.java,v 1.2 2008/06/25 05:47:58 qcheng Exp $
026 *
027 * Portions Copyrighted 2016 ForgeRock AS.
028 */
029
030
031package com.sun.identity.saml2.protocol;
032
033import com.fasterxml.jackson.annotation.JsonTypeInfo;
034import com.sun.identity.saml2.common.SAML2Exception;
035import com.sun.identity.saml2.protocol.impl.StatusCodeImpl;
036
037/**
038 * This class represents the <code>StatusCodeType</code> complex type in
039 * SAML protocol schema.
040 * The <code>StatusCode</code> element specifies a code or a set of nested codes
041 * representing the status of the corresponding request.
042 *
043 * <pre>
044 * &lt;complexType name="StatusCodeType">
045 *   &lt;complexContent>
046 *     &lt;restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
047 *       &lt;sequence>
048 *         &lt;element ref="{urn:oasis:names:tc:SAML:2.0:protocol}StatusCode" minOccurs="0"/>
049 *       &lt;/sequence>
050 *       &lt;attribute name="Value" use="required" type="{http://www.w3.org/2001/XMLSchema}anyURI" />
051 *     &lt;/restriction>
052 *   &lt;/complexContent>
053 * &lt;/complexType>
054 * </pre>
055 *
056 * @supported.all.api
057 */
058
059@JsonTypeInfo(include = JsonTypeInfo.As.PROPERTY, use = JsonTypeInfo.Id.CLASS,
060        defaultImpl = StatusCodeImpl.class)
061public interface StatusCode {
062    
063    /**
064     * Returns the value of the statusCode property.
065     *
066     * @return the value of the statusCode property
067     * @see #setStatusCode(StatusCode)
068     */
069    public com.sun.identity.saml2.protocol.StatusCode getStatusCode();
070    
071    /**
072     * Sets the value of the statusCode property.
073     *
074     * @param value the value of the statusCode property to be set
075     * @throws SAML2Exception if the object is immutable
076     * @see #getStatusCode
077     */
078    public void setStatusCode(com.sun.identity.saml2.protocol.StatusCode value)
079    throws SAML2Exception;
080    
081    /**
082     * Returns the value of the value property.
083     *
084     * @return the value of the value property
085     * @see #setValue(String)
086     */
087    public java.lang.String getValue();
088    
089    /**
090     * Sets the value of the value property.
091     *
092     * @param value the value of the value property to be set
093     * @throws SAML2Exception if the object is immutable
094     * @see #getValue
095     */
096    public void setValue(java.lang.String value) throws SAML2Exception;
097    
098    /**
099     * Returns the <code>StatusCode</code> in an XML document String format
100     * based on the <code>StatusCode</code> schema described above.
101     *
102     * @return An XML String representing the <code>StatusCode</code>.
103     * @throws SAML2Exception if some error occurs during conversion to
104     * <code>String</code>.
105     */
106    public String toXMLString() throws SAML2Exception;
107    
108    /**
109     * Returns the <code>StatusCode</code> in an XML document String format
110     * based on the <code>StatusCode</code> schema described above.
111     *
112     * @param includeNSPrefix Determines whether or not the namespace qualifier 
113     *        is prepended to the Element when converted
114     * @param declareNS Determines whether or not the namespace is declared
115     *        within the Element.
116     * @return A XML String representing the <code>StatusCode</code>.
117     * @throws SAML2Exception if some error occurs during conversion to
118     * <code>String</code>.
119     */
120    public String toXMLString(boolean includeNSPrefix, boolean declareNS)
121    throws SAML2Exception;   
122   
123    /**
124     * Makes the object immutable
125     */
126    public void makeImmutable();
127    
128    /**
129     * Returns true if the object is mutable, false otherwise
130     *
131     * @return true if the object is mutable, false otherwise
132     */
133    public boolean isMutable();
134}