Class MechanismReply

  • All Implemented Interfaces:
    com.portwise.core.storage.Containable, java.io.Serializable

    public class MechanismReply
    extends java.lang.Object
    implements com.portwise.core.storage.Containable
    This persistent class is a challenge state for authentication methods.

    It holds a name, state and a template specification. These can be used when an authentication method requires a challenge state and for this state wants to challenge the user with a certain HTML template.

    The name identifies the state name, this is also used in the reply object when responding CHALLENGE, the state is used internally in the method if needed to identify the certain reply for example, and finally the template specification is the actual template.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      MechanismReply()
      Constructs a new empty MechanismReply instance.
      MechanismReply​(java.lang.String name, java.lang.String state, byte[] templateSpecification)
      Constructs a new MechanismReply instance with the specified parameters.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void beforeStore()  
      java.lang.String getName()
      Returns the name of this reply.
      java.lang.String getState()
      Returns the state of this reply.
      byte[] getTemplateSpecification()
      Returns the template specification for this reply.
      void initialized()  
      void setName​(java.lang.String name)
      Sets the name of this reply.
      void setState​(java.lang.String state)
      Sets the state for this reply.
      void setTemplateSpecification​(byte[] templateSpecification)
      Sets the template specification for this reply.
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • MechanismReply

        public MechanismReply()
        Constructs a new empty MechanismReply instance.
      • MechanismReply

        public MechanismReply​(java.lang.String name,
                              java.lang.String state,
                              byte[] templateSpecification)
        Constructs a new MechanismReply instance with the specified parameters.
        Parameters:
        name - The name.
        state - The state.
        templateSpecification - The template specification.
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns the name of this reply.
        Returns:
        The name.
      • setName

        public void setName​(java.lang.String name)
        Sets the name of this reply.
        Parameters:
        name - The name to set.
      • getState

        public java.lang.String getState()
        Returns the state of this reply.
        Returns:
        The state.
      • setState

        public void setState​(java.lang.String state)
        Sets the state for this reply.
        Parameters:
        state - The state to set.
      • getTemplateSpecification

        public byte[] getTemplateSpecification()
        Returns the template specification for this reply.
        Returns:
        The template specification as a byte array.
      • setTemplateSpecification

        public void setTemplateSpecification​(byte[] templateSpecification)
        Sets the template specification for this reply.
        Parameters:
        templateSpecification - The template specification.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
        See Also:
        Object.toString()
      • initialized

        public void initialized()
        Specified by:
        initialized in interface com.portwise.core.storage.Containable
        See Also:
        Containable.initialized()
      • beforeStore

        public void beforeStore()
        Specified by:
        beforeStore in interface com.portwise.core.storage.Containable