001/**
002 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
003 *
004 * Copyright (c) 2007 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: Response.java,v 1.2 2008/06/25 05:48:12 qcheng Exp $
026 *
027 */
028
029package com.sun.identity.xacml.context;
030
031import com.sun.identity.xacml.common.XACMLException;
032
033import java.util.List;
034
035/**
036 * The <code>Response</code> element is a container of 
037 * one or more <code>Result</code>s issued by policy decision point
038 * @supported.all.api
039 * <p/>
040 * <pre>
041 * schema:
042 *      &lt;xs:complexType name="ResponseType">
043 *          &lt;xs:sequence>
044 *              &lt;xs:element ref="xacml-context:Result" maxOccurs="unbounded"/>
045 *          &lt;xs:sequence>
046 *      &lt;xs:complexType>
047 * </pre>
048 */
049public interface Response {
050
051    /**
052     * Returns the <code>Result</code>s of this object
053     *
054     * @return the <code>Result</code>s of this object
055     */
056    public List getResults();
057
058    /**
059     * Adds a <code>Result</code> to this object
060     *
061     * @param result the <code>Result</code> to add
062     *
063     * @exception XACMLException if the object is immutable
064     */
065    public void addResult(Result result) throws XACMLException;
066
067    /**
068     * Sets the <code>Result</code>s of this object
069     *
070     * @param results the <code>Result</code>s of this object
071     *
072     * @exception XACMLException if the object is immutable
073     */
074    public void setResults(List results) throws XACMLException;
075
076   /**
077    * Returns a string representation of this object
078    *
079    * @return a string representation of this object
080    * @exception XACMLException if conversion fails for any reason
081    */
082    public String toXMLString() throws XACMLException;
083
084   /**
085    * Returns a string representation of this object
086    * @param includeNSPrefix Determines whether or not the namespace qualifier
087    *        is prepended to the Element when converted
088    * @param declareNS Determines whether or not the namespace is declared
089    *        within the Element.
090    * @return a string representation of this object
091    * @exception XACMLException if conversion fails for any reason
092     */
093    public String toXMLString(boolean includeNSPrefix, boolean declareNS)
094            throws XACMLException;
095
096   /**
097    * Checks if the object is mutable
098    *
099    * @return <code>true</code> if the object is mutable,
100    *         <code>false</code> otherwise
101    */
102    public boolean isMutable();
103    
104   /**
105    * Makes the object immutable
106    */
107    public void makeImmutable();
108
109}
110




























































Copyright © 2010-2017, ForgeRock All Rights Reserved.