com.sun.identity.saml.protocol
Class AuthenticationQuery

java.lang.Object
  extended by com.sun.identity.saml.protocol.Query
      extended by com.sun.identity.saml.protocol.SubjectQuery
          extended by 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.


Field Summary
protected  String authMethod
           
 
Fields inherited from class com.sun.identity.saml.protocol.SubjectQuery
subject
 
Fields inherited from class com.sun.identity.saml.protocol.Query
ATTRIBUTE_QUERY, AUTHENTICATION_QUERY, AUTHORIZATION_DECISION_QUERY, NOT_SUPPORTED_QUERY
 
Constructor Summary
protected AuthenticationQuery()
          Default Constructor
  AuthenticationQuery(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, String authMethod)
          Constructor.
 
Method Summary
 String getAuthenticationMethod()
          Returns the AuthenticationMethod.
 int getQueryType()
          Returns the type of this query.
 String toString()
          Translates the AuthenticationQuery to an XML document String based on the AuthenticationQuery schema described above.
 String toString(boolean includeNS, boolean declareNS)
          Returns a String representation of the element.
 
Methods inherited from class com.sun.identity.saml.protocol.SubjectQuery
getSubject
 

Field Detail

authMethod

protected String authMethod
Constructor Detail

AuthenticationQuery

protected AuthenticationQuery()
Default Constructor


AuthenticationQuery

public AuthenticationQuery(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,
                           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 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.

Specified by:
getQueryType in class Query
Returns:
Query.AUTHENTICATION_QUERY.

toString

public String toString()
Translates the AuthenticationQuery to an XML document String based on the AuthenticationQuery schema described above.

Overrides:
toString in class Object
Returns:
An XML String representing the AuthenticationQuery.

toString

public String toString(boolean includeNS,
                       boolean declareNS)
Returns a String representation of the element.

Specified by:
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