com.sun.identity.liberty.ws.disco
Class QueryResponse

java.lang.Object
  extended by com.sun.identity.liberty.ws.disco.QueryResponse

public class QueryResponse
extends Object

The class QueryResponse represents a response for a discovery query request. The following schema fragment specifies the expected content within the QueryResponse object.

 <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>
 


Constructor Summary
QueryResponse()
          Default constructor.
QueryResponse(Element root)
          Constructor.
QueryResponse(Status status)
          Constructor.
 
Method Summary
 List getCredentials()
          Gets credentials.
 String getId()
          Gets id attribute.
 List getResourceOffering()
          Gets the returned ResourceOffering.
 Status getStatus()
          Gets status of the query response.
 void setCredentials(List credentials)
          Sets credentials.
 void setId(String id)
          Sets id attribute.
 void setResourceOffering(List offerings)
          Sets ResourceOffering to return.
 void setStatus(Status status)
          Sets the Status of the query response.
 String toString()
          Returns formatted string of the QueryResponse.
 

Constructor Detail

QueryResponse

public QueryResponse(Element root)
              throws DiscoveryException
Constructor.

Parameters:
root - QueryResponse DOM element.
Throws:
DiscoveryException - if error occurs.

QueryResponse

public QueryResponse()
Default constructor.


QueryResponse

public QueryResponse(Status status)
Constructor.

Parameters:
status - Status of the response.
Method Detail

getStatus

public Status getStatus()
Gets status of the query response.

Returns:
status of the query response.
See Also:
QueryResponse.setStatus(com.sun.identity.liberty.ws.common.Status)

setStatus

public void setStatus(Status status)
Sets the Status of the query response.

Parameters:
status - the Status of the query response.
See Also:
QueryResponse.getStatus()

getResourceOffering

public List getResourceOffering()
Gets the returned ResourceOffering.

Returns:
List of ResourceOffering objects
See Also:
QueryResponse.setResourceOffering(List)

setResourceOffering

public void setResourceOffering(List offerings)
Sets ResourceOffering to return.

Parameters:
offerings - List of ResourceOffering objects
See Also:
QueryResponse.getResourceOffering()

getId

public String getId()
Gets id attribute.

Returns:
id attribute.
See Also:
QueryResponse.setId(String)

setId

public void setId(String id)
Sets id attribute.

Parameters:
id - id attribute.
See Also:
QueryResponse.getId()

getCredentials

public List getCredentials()
Gets credentials.

Returns:
List of com.sun.identity.liberty.ws.security.SecurityAssertion objects.
See Also:
QueryResponse.setCredentials(List)

setCredentials

public void setCredentials(List credentials)
Sets credentials.

Parameters:
credentials - List of com.sun.identity.liberty.ws.security.SecurityAssertion objects.
See Also:
QueryResponse.getCredentials()

toString

public String toString()
Returns formatted string of the QueryResponse.

Overrides:
toString in class Object
Returns:
formatted string of the QueryResponse.