com.sun.identity.saml.protocol
Class AttributeQuery

java.lang.Object
  |
  +--com.sun.identity.saml.protocol.Query
        |
        +--com.sun.identity.saml.protocol.SubjectQuery
              |
              +--com.sun.identity.saml.protocol.AttributeQuery

public class AttributeQuery
extends SubjectQuery

This concrete class extends from the abstract base class SubjectQuery. It represents the query for an attribute assertion. It corresponds to the samlp:AttributeQueryType in the SAML protocol schema.


Fields inherited from class com.sun.identity.saml.protocol.Query
ATTRIBUTE_QUERY, AUTHENTICATION_QUERY, AUTHORIZATION_DECISION_QUERY, NOT_SUPPORTED_QUERY
 
Constructor Summary
AttributeQuery(org.w3c.dom.Element element)
          This constructor is used to build an Attribute Query from a DOM tree that was built from the XML string.
AttributeQuery(Subject theSubject)
          Constructor to construct an AttributeQuery with 0 AttributeDesignator, and no Resource attribute.
AttributeQuery(Subject theSubject, java.util.List designators)
          Constructor to construct an AttributeQuery with a list of AttributeDesignators.
AttributeQuery(Subject theSubject, java.util.List designators, java.lang.String theResource)
          Constructor.
 
Method Summary
 java.util.List getAttributeDesignator()
          Returns the AttributeDesignators.
 int getQueryType()
          Gets the type of the query.
 java.lang.String getResource()
          Gets the Resource.
 java.lang.String toString()
          Translates the AttributeQuery to an XML document String based on the AttributeQuery schema.
 java.lang.String toString(boolean includeNS, boolean declareNS)
          Create a String representation of the samlp:AttributeQuery element.
 
Methods inherited from class com.sun.identity.saml.protocol.SubjectQuery
getSubject
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AttributeQuery

public AttributeQuery(org.w3c.dom.Element element)
               throws SAMLException
This constructor is used to build an Attribute Query from a DOM tree that was built from the XML string.
Parameters:
element - the DOM tree element which contains an Attribute Query.
Throws:
SAMLException -  

AttributeQuery

public AttributeQuery(Subject theSubject,
                      java.util.List designators,
                      java.lang.String theResource)
               throws SAMLException
Constructor.
Parameters:
theSubject - Subject of this query.
designators - List of AttributeDesignators of this query.
theResource - the Resource attribute of this query in String format.
Throws:
SAMLException -  

AttributeQuery

public AttributeQuery(Subject theSubject,
                      java.util.List designators)
               throws SAMLException
Constructor to construct an AttributeQuery with a list of AttributeDesignators.
Parameters:
theSubject - Subject of this query.
designators - List of AttributeDesignators of this query.
Throws:
SAMLException -  

AttributeQuery

public AttributeQuery(Subject theSubject)
               throws SAMLException
Constructor to construct an AttributeQuery with 0 AttributeDesignator, and no Resource attribute.
Parameters:
theSubject - Subject of this query.
Throws:
SAMLException -  
Method Detail

getResource

public java.lang.String getResource()
Gets the Resource.
Returns:
the Resource associated with this query in String format; or null if there is none.

getAttributeDesignator

public java.util.List getAttributeDesignator()
Returns the AttributeDesignators.
Returns:
the AttributeDesignators(s) associated with this query. It could contain 0 or more AttributeDesignators.

getQueryType

public int getQueryType()
Gets the type of the query.
Overrides:
getQueryType in class Query
Returns:
an integer which is Query.ATTRIBUTE_QUERY.

toString

public java.lang.String toString()
Translates the AttributeQuery to an XML document String based on the AttributeQuery schema.
Overrides:
toString in class java.lang.Object
Returns:
An XML String representing the AttributeQuery.

toString

public java.lang.String toString(boolean includeNS,
                                 boolean declareNS)
Create a String representation of the samlp:AttributeQuery element.
Overrides:
toString in class Query
Parameters:
includeNS - Determines whether or not the namespace qualifier is prepended to the Element when converted.
declareNS - Determines whether or not the namespace is declared within the Element.
Returns:
A string containing the valid XML for this element.


Copyright 2005 Sun Microsystems, Inc. All rights reserved. Use is subject to license terms.