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: XACMLAuthzDecisionStatement.java,v 1.4 2008/06/25 05:48:15 qcheng Exp $ 026 * 027 */ 028 029package com.sun.identity.xacml.saml2; 030 031import com.sun.identity.xacml.common.XACMLException; 032import com.sun.identity.xacml.context.Request; 033import com.sun.identity.xacml.context.Response; 034import com.sun.identity.saml2.assertion.Statement; 035 036/** 037 * <code>XACMLAuthzDecisionStatement<code> is an extension of 038 * <code>samlp:StatementAbstractType</code> that is carried in a 039 * SAML Assertion to convey <code>xacml-context:Response</code> 040 * 041 * Schema: 042 * <p> 043 * <pre> 044 * <xs:element name="XACMLAuthzDecisionStatement" 045 * type="xacml-saml:XACMLAuthzDecisionStatementType"/> 046 * <xs:complexType name="XACMLAuthzDecisionStatementType"> 047 * <xs:complexContent> 048 * <xs:extension base="saml:StatementAbstractType"> 049 * <xs:sequence> 050 * <xs:element ref="xacml-context:Response"/> 051 * <xs:element ref="xacml-context:Request" minOccurs="0"/> 052 * <xs:sequence> 053 * <xs:extension> 054 * <xs:complexContent> 055 * <xs:complexType> 056 * <pre> 057 * </p> 058 * 059 * Schema for Base: 060 * Schema for the base type is 061 * <p> 062 * <pre> 063 * <complexType name="StatementAbstractType"> 064 * <complexContent> 065 * <restriction base="{http://www.w3.org/2001/XMLSchema}anyType"> 066 * </restriction> 067 * </complexContent> 068 * </complexType> 069 * </pre> 070 * </p> 071 * 072 *@supported.all.api 073 * 074 **/ 075 076public interface XACMLAuthzDecisionStatement extends Statement { 077 078 /** 079 * Returns <code>Response</code> element of this object 080 * 081 * @return the <code>Response</code> element of this object 082 */ 083 public Response getResponse(); 084 085 /** 086 * Sets <code>Response</code> element of this object 087 * @param response XACML context <code>Response</code> element to be 088 * set in this object 089 * 090 * @exception XACMLException if the object is immutable 091 */ 092 public void setResponse(Response response) throws XACMLException; 093 094 /** 095 * Returns <code>Request</code> element of this object 096 * 097 * @return the <code>Request</code> element of this object 098 */ 099 public Request getRequest() throws XACMLException; 100 101 /** 102 * Sets <code>Request</code> element of this object 103 * @param request XACML context <code>Request</code> element to be 104 * set in this object 105 * 106 * @exception XACMLException if the object is immutable 107 */ 108 public void setRequest(Request request) throws XACMLException; 109 110 /** 111 * Makes the object immutable. 112 */ 113 public void makeImmutable(); 114 115 /** 116 * Returns the mutability of the object. 117 * 118 * @return true if the object is mutable; false otherwise. 119 */ 120 public boolean isMutable(); 121 122 /** 123 * Returns a String representation of the element. 124 * 125 * @return A string containing the valid XML for this element. 126 * By default name space name is prepended to the element name. 127 * @throws XACMLException if the object does not conform to the schema. 128 */ 129 public String toXMLString() throws XACMLException; 130 131 /** 132 * Returns a String representation of the element. 133 * 134 * @param includeNS Determines whether or not the namespace qualifier is 135 * prepended to the Element when converted 136 * @param declareNS Determines whether or not the namespace is declared 137 * within the Element. 138 * @return A string containing the valid XML for this element 139 * @throws XACMLException if the object does not conform to the schema. 140 */ 141 public String toXMLString(boolean includeNS, boolean declareNS) 142 throws XACMLException; 143 144}