/**
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS HEADER.
*
* Copyright (c) 2006 Sun Microsystems Inc. All Rights Reserved
*
* The contents of this file are subject to the terms
* of the Common Development and Distribution License
* (the License). You may not use this file except in
* compliance with the License.
*
* You can obtain a copy of the License at
* See the License for the specific language governing
* permission and limitations under the License.
*
* When distributing Covered Code, include this CDDL
* Header Notice in each file and include the License file
* at opensso/legal/CDDLv1.0.txt.
* If applicable, add the following below the CDDL Header,
* with the fields enclosed by brackets [] replaced by
* your own identifying information:
* "Portions Copyrighted [year] [name of copyright owner]"
*
* $Id: QueryResponse.java,v 1.2 2008/06/25 05:47:10 qcheng Exp $
*
*/
/**
* The class <code>QueryResponse</code> represents a response for a discovery
* query request.
* The following schema fragment specifies the expected content within the
* <code>QueryResponse</code> object.
* <pre>
* <complexType name="QueryResponseType">
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <element ref="{urn:liberty:disco:2003-08}Status"/>
* <element ref="{urn:liberty:disco:2003-08}ResourceOffering" maxOccurs="unbounded" minOccurs="0"/>
* <element name="Credentials" minOccurs="0">
* <complexType>
* <complexContent>
* <restriction base="{http://www.w3.org/2001/XMLSchema}anyType">
* <sequence>
* <any/>
* </sequence>
* </restriction>
* </complexContent>
* </complexType>
* </element>
* </sequence>
* <attribute name="id" type="{http://www.w3.org/2001/XMLSchema}ID" />
* </restriction>
* </complexContent>
* </complexType>
* </pre>
*
* @supported.all.api
*/
public class QueryResponse {
/**
* Constructor.
* @param root <code>QueryResponse</code> DOM element.
* @exception DiscoveryException if error occurs.
*/
throw new DiscoveryException(
}
{
throw new DiscoveryException(
}
boolean foundCreds = false;
if ((nameSpaceURI == null) ||
{
+ "invalid namespace for node " + nodeName);
}
throw new DiscoveryException(
}
+ "included more than one Status.");
}
throw new DiscoveryException(
}
}
if (foundCreds) {
+ "included more than one Credentials.");
}
throw new DiscoveryException(
}
foundCreds = true;
} else {
+ "invalid node" + nodeName);
}
throw new DiscoveryException(
}
}
}
+ "Status.");
}
throw new DiscoveryException(
}
}
try {
} catch (SAMLException se) {
+ "Exception thrown when parsing Credentials:", se);
}
throw new DiscoveryException(
}
}
}
}
}
/**
* Default constructor.
*/
public QueryResponse () {}
/**
* Constructor.
*
* @param status Status of the response.
*/
}
/**
* Gets status of the query response.
*
* @return status of the query response.
* @see #setStatus(com.sun.identity.liberty.ws.common.Status)
*/
return status;
}
/**
* Sets the Status of the query response.
*
* @param status the Status of the query response.
* @see #getStatus()
*/
}
/**
* Gets the returned <code>ResourceOffering</code>.
*
* @return List of <code>ResourceOffering</code> objects
* @see #setResourceOffering(List)
*/
return offerings;
}
/**
* Sets <code>ResourceOffering</code> to return.
*
* @param offerings List of <code>ResourceOffering</code> objects
* @see #getResourceOffering()
*/
}
/**
* Gets id attribute.
*
* @return id attribute.
* @see #setId(String)
*/
return id;
}
/**
* Sets id attribute.
*
* @param id id attribute.
* @see #getId()
*/
}
/**
* Gets credentials.
* @return List of
* <code>com.sun.identity.liberty.ws.security.SecurityAssertion</code>
* objects.
* @see #setCredentials(List)
*/
return creds;
}
/**
* Sets credentials.
* @param credentials List of
* <code>com.sun.identity.liberty.ws.security.SecurityAssertion</code>
* objects.
* @see #getCredentials()
*/
creds = credentials;
}
/**
* Returns formatted string of the <code>QueryResponse</code>.
*
* @return formatted string of the <code>QueryResponse</code>.
*/
append("\"");
}
}
}
}
append("\">");
}
}
}
}