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: Status.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.StatusImpl; 036 037/** 038 * This class represents the <code>StatusType</code> complex type in 039 * SAML protocol schema. 040 * 041 * <pre> 042 * <complexType name="StatusType"> 043 * <complexContent> 044 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 045 * <sequence> 046 * <element ref="{urn:oasis:names:tc:SAML:2.0:protocol}StatusCode"/> 047 * <element ref="{urn:oasis:names:tc:SAML:2.0:protocol}StatusMessage" minOccurs="0"/> 048 * <element ref="{urn:oasis:names:tc:SAML:2.0:protocol}StatusDetail" minOccurs="0"/> 049 * </sequence> 050 * </restriction> 051 * </complexContent> 052 * </complexType> 053 * </pre> 054 * 055 * @supported.all.api 056 */ 057 058@JsonTypeInfo(include = JsonTypeInfo.As.PROPERTY, use = JsonTypeInfo.Id.CLASS, 059 defaultImpl = StatusImpl.class) 060public interface Status { 061 062 /** 063 * Returns the value of the statusCode property. 064 * 065 * @return the value of the statusCode property 066 * @see #setStatusCode(StatusCode) 067 */ 068 public com.sun.identity.saml2.protocol.StatusCode getStatusCode(); 069 070 /** 071 * Sets the value of the statusCode property. 072 * 073 * @param value the value of the statusCode property to be set 074 * @throws SAML2Exception if the object is immutable 075 * @see #getStatusCode 076 */ 077 public void setStatusCode(com.sun.identity.saml2.protocol.StatusCode value) 078 throws SAML2Exception; 079 080 /** 081 * Returns the value of the statusMessage property. 082 * 083 * @return the value of the statusMessage property 084 * @see #setStatusMessage(String) 085 */ 086 public java.lang.String getStatusMessage(); 087 088 /** 089 * Sets the value of the statusMessage property. 090 * 091 * @param value the value of the statusMessage property to be set 092 * @throws SAML2Exception if the object is immutable 093 * @see #getStatusMessage 094 */ 095 public void setStatusMessage(java.lang.String value) 096 throws SAML2Exception; 097 098 /** 099 * Returns the value of the statusDetail property. 100 * 101 * @return the value of the statusDetail property 102 * @see #setStatusDetail(StatusDetail) 103 */ 104 public com.sun.identity.saml2.protocol.StatusDetail getStatusDetail(); 105 106 /** 107 * Sets the value of the statusDetail property. 108 * 109 * @param value the value of the statusDetail property to be set 110 * @throws SAML2Exception if the object is immutable 111 * @see #getStatusDetail 112 */ 113 public void setStatusDetail( 114 com.sun.identity.saml2.protocol.StatusDetail value) 115 throws SAML2Exception; 116 117 /** 118 * Returns the <code>Status</code> in an XML document String format 119 * based on the <code>Status</code> schema described above. 120 * 121 * @return An XML String representing the <code>Status</code>. 122 * @throws SAML2Exception if some error occurs during conversion to 123 * <code>String</code>. 124 */ 125 public String toXMLString() throws SAML2Exception; 126 127 /** 128 * Returns the <code>Status</code> in an XML document String format 129 * based on the <code>Status</code> schema described above. 130 * 131 * @param includeNSPrefix Determines whether or not the namespace qualifier 132 * is prepended to the Element when converted 133 * @param declareNS Determines whether or not the namespace is declared 134 * within the Element. 135 * @return A XML String representing the <code>Status</code>. 136 * @throws SAML2Exception if some error occurs during conversion to 137 * <code>String</code>. 138 */ 139 public String toXMLString(boolean includeNSPrefix, boolean declareNS) 140 throws SAML2Exception; 141 142 /** 143 * Makes the obejct immutable 144 */ 145 public void makeImmutable(); 146 147 /** 148 * Returns true if the object is mutable, false otherwise 149 * 150 * @return true if the object is mutable, false otherwise 151 */ 152 public boolean isMutable(); 153}