Class RequestBean

java.lang.Object
helma.framework.RequestBean
All Implemented Interfaces:
Serializable

public class RequestBean extends Object implements Serializable
See Also:
  • Constructor Details

    • RequestBean

      public RequestBean(RequestTrans req)
      Creates a new RequestBean object.
      Parameters:
      req - ...
  • Method Details

    • get

      public Object get(String name)
      Parameters:
      name - ...
      Returns:
      ...
    • getMethod

      public String getMethod()
      Return the method of the request. This may either be a HTTP method or one of the Helma pseudo methods defined in RequestTrans.
    • isGet

      public boolean isGet()
      Returns:
      ...
    • isPost

      public boolean isPost()
      Returns:
      ...
    • getServletRequest

      public javax.servlet.http.HttpServletRequest getServletRequest()
      Returns the Servlet request represented by this RequestTrans instance. Returns null for internal and XML-RPC requests.
    • getHeader

      public String getHeader(String name)
      Proxy to HttpServletRequest.getHeader().
      Parameters:
      name - the header name
      Returns:
      the header value, or null
    • getHeaders

      public String[] getHeaders(String name)
      Proxy to HttpServletRequest.getHeaders(), returns header values as string array.
      Parameters:
      name - the header name
      Returns:
      the header values as string array
    • getIntHeader

      public int getIntHeader(String name)
      Proxy to HttpServletRequest.getIntHeader(), fails silently by returning -1.
      Parameters:
      name - the header name
      Returns:
      the header parsed as integer or -1
    • getDateHeader

      public long getDateHeader(String name)
      Proxy to HttpServletRequest.getDateHeader(), fails silently by returning -1.
      Parameters:
      name - the header name
      Returns:
      the date in milliseconds, or -1
    • toString

      public String toString()
      Overrides:
      toString in class Object
      Returns:
      A string representation of this request
    • getAction

      public String getAction()
      Returns:
      the invoked action
    • getData

      public Map getData()
      Returns:
      The req.data map containing request parameters, cookies and assorted HTTP headers
    • getParams

      public Map getParams()
      Returns:
      the req.params map containing combined query and post parameters
    • getQueryParams

      public Map getQueryParams()
      Returns:
      the req.queryParams map containing parameters parsed from the query string
    • getPostParams

      public Map getPostParams()
      Returns:
      the req.postParams map containing params parsed from post data
    • getCookies

      public Map getCookies()
      Returns:
      the req.cookies map containing request cookies
    • getRuntime

      public long getRuntime()
      Returns:
      the time this request has been running, in milliseconds
    • getPassword

      public String getPassword()
      Returns:
      the password if using HTTP basic authentication
    • getPath

      public String getPath()
      Returns:
      the request path
    • getUri

      public String getUri()
      Returns:
      the request URI
    • getUsername

      public String getUsername()
      Returns:
      the username if using HTTP basic authentication
    • getActionHandler

      public Object getActionHandler()
      The action handler allows the onRequest() method to set the function object to be invoked for processing the request, overriding the action resolved from the request path.
      Returns:
      the action handler
    • setActionHandler

      public void setActionHandler(Object handler)
      The action handler allows the onRequest() method to set the function object to be invoked for processing the request, overriding the action resolved from the request path.
      Parameters:
      handler - the action handler