com.waveset.object
Class Answer

java.lang.Object
  extended bycom.waveset.util.AbstractXmlObject
      extended bycom.waveset.object.Answer
All Implemented Interfaces:
javax.naming.Referenceable, XmlObject

public class Answer
extends AbstractXmlObject

A class used to hold the answers to the authentication questions defined in the effective policy for this user. This was originally an inner class of WSUser. It was pulled out, so that it could be shared with SPE.


Field Summary
static java.lang.String EL_ANSWER
           
 
Fields inherited from class com.waveset.util.AbstractXmlObject
_trace, code_id
 
Constructor Summary
Answer(org.w3c.dom.Element e)
          Create an answer by parsing its DOM representation.
Answer(java.lang.String id, EncryptedData answer, java.lang.String loginInterface)
          Create an answer.
Answer(java.lang.String id, java.lang.String answer, java.lang.String loginInterface)
          Create an answer.
 
Method Summary
 boolean ascii()
          Check if ascii answer.
 EncryptedData getAnswer()
          Get the answer.
 java.lang.String getElementName()
          Return the element name.
 java.lang.String getLoginInterface()
          Get the login interface associated with this answer
 java.lang.String getQuestionId()
          Get the question id.
 java.lang.String getSuppliedQuestion()
           
 void parseXml(org.w3c.dom.Element e)
          Parse the DOM representation of the answer, and set the corresponding fields.
 void setAnswer(EncryptedData ans)
          Change the answer.
 void setAscii(boolean ascii)
          set if ascii answer or not
 void setLoginInterface(java.lang.String loginInterface)
          Set the login interface associated with which this answer is associated.
 void setSuppliedQuestion(java.lang.String questionString)
           
 void toXml(java.lang.StringBuffer b, int indent)
          Serialize the answer to an XML string buffer.
 
Methods inherited from class com.waveset.util.AbstractXmlObject
addXmlHeader, cloneObject, dump, dumpFile, getReference, println, setTrace, toIdentityString, toVerboseString, toVerboseString, toXml, toXml, toXml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EL_ANSWER

public static final java.lang.String EL_ANSWER
See Also:
Constant Field Values
Constructor Detail

Answer

public Answer(java.lang.String id,
              java.lang.String answer,
              java.lang.String loginInterface)
Create an answer.


Answer

public Answer(java.lang.String id,
              EncryptedData answer,
              java.lang.String loginInterface)
Create an answer.


Answer

public Answer(org.w3c.dom.Element e)
       throws WavesetException
Create an answer by parsing its DOM representation.

Method Detail

getQuestionId

public java.lang.String getQuestionId()
Get the question id.


getAnswer

public EncryptedData getAnswer()
Get the answer.


setAnswer

public void setAnswer(EncryptedData ans)
Change the answer.


ascii

public boolean ascii()
Check if ascii answer.


setAscii

public void setAscii(boolean ascii)
set if ascii answer or not


getLoginInterface

public java.lang.String getLoginInterface()
Get the login interface associated with this answer


setLoginInterface

public void setLoginInterface(java.lang.String loginInterface)
Set the login interface associated with which this answer is associated.

Parameters:
loginInterface - the login interface

setSuppliedQuestion

public void setSuppliedQuestion(java.lang.String questionString)

getSuppliedQuestion

public java.lang.String getSuppliedQuestion()

toXml

public void toXml(java.lang.StringBuffer b,
                  int indent)
Serialize the answer to an XML string buffer.

Specified by:
toXml in interface XmlObject
Specified by:
toXml in class AbstractXmlObject

parseXml

public void parseXml(org.w3c.dom.Element e)
              throws WavesetException
Parse the DOM representation of the answer, and set the corresponding fields.

Throws:
WavesetException

getElementName

public java.lang.String getElementName()
Description copied from class: AbstractXmlObject
Return the element name.

Specified by:
getElementName in interface XmlObject
Specified by:
getElementName in class AbstractXmlObject