com.sun.identity.saml.protocol
Class AuthenticationQuery

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

public class AuthenticationQuery
extends SubjectQuery

This concrete class extends from the abstract base class SubjectQuery. It represents the query for an authentication assertion. It corresponds to the <samlp:AuthenticationQueryType> 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
AuthenticationQuery(org.w3c.dom.Element element)
          This constructor is used to build an Authentication Query from a DOM tree that was built from the XML string.
AuthenticationQuery(Subject subject)
          Constructor.
AuthenticationQuery(Subject subject, java.lang.String authMethod)
          Constructor.
 
Method Summary
 java.lang.String getAuthenticationMethod()
          Returns the AuthenticationMethod.
 int getQueryType()
          Returns the type of this query.
 java.lang.String toString()
          Translates the AuthenticationQuery to an XML document String based on the AuthenticationQuery schema described above.
 java.lang.String toString(boolean includeNS, boolean declareNS)
          Creates a String representation of the 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

AuthenticationQuery

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

AuthenticationQuery

public AuthenticationQuery(Subject subject,
                           java.lang.String authMethod)
                    throws SAMLException
Constructor.
Parameters:
subject - the Subject of the AuthenticationQuery.
authMethod - the AuthenticationMethod in string format. It could be null.
Throws:
SAMLException -  

AuthenticationQuery

public AuthenticationQuery(Subject subject)
                    throws SAMLException
Constructor.
Parameters:
subject - The Subject of the AuthenticationQuery.
Throws:
SAMLException -  
Method Detail

getAuthenticationMethod

public java.lang.String getAuthenticationMethod()
Returns the AuthenticationMethod.
Returns:
AuthenticationMethod in string format; or null if there is none.

getQueryType

public int getQueryType()
Returns the type of this query.
Overrides:
getQueryType in class Query
Returns:
Query.AUTHENTICATION_QUERY.

toString

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

toString

public java.lang.String toString(boolean includeNS,
                                 boolean declareNS)
Creates a String representation of the 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.