Class SessionParameter

java.lang.Object
com.invirgance.convirgance.web.parameter.SessionParameter
All Implemented Interfaces:
Parameter

@Wiring public class SessionParameter extends Object implements Parameter
Retrieves a value from the http session
Author:
jbanes
  • Constructor Details

    • SessionParameter

      public SessionParameter()
  • Method Details

    • getName

      public String getName()
      The name of the parameter or the session key if name has not been set
      Specified by:
      getName in interface Parameter
      Returns:
      name of the parameter
    • setName

      public void setName(String name)
      Set the name of the parameter
      Parameters:
      name - name of the parameter
    • getSessionKey

      public String getSessionKey()
      The key to retrieve from the session
      Returns:
      key to retrieve from session
    • setSessionKey

      public void setSessionKey(String key)
      Set the key to retrieve from the session
      Parameters:
      key - key to retrieve from session
    • getDefaultValue

      public String getDefaultValue()
      Set the value to return if the session value is null
      Returns:
      default value to return
    • setDefaultValue

      public void setDefaultValue(String defaultValue)
      Set the value to return if the session value is null
      Parameters:
      defaultValue - default value to return
    • getValue

      public Object getValue(HttpRequest request)
      Description copied from interface: Parameter
      Extracts a value from the HTTP request.
      Specified by:
      getValue in interface Parameter
      Parameters:
      request - The HTTP request to extract values from
      Returns:
      The extracted value