helma.framework
Class RequestBean

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

public class RequestBean
extends java.lang.Object
implements java.io.Serializable

See Also:
Serialized Form

Constructor Summary
RequestBean(RequestTrans req)
          Creates a new RequestBean object.
 
Method Summary
 java.lang.Object get(java.lang.String name)
           
 java.lang.String getAction()
           
 java.lang.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.
 java.util.Map getCookies()
           
 java.util.Map getData()
           
 long getDateHeader(java.lang.String name)
          Proxy to HttpServletRequest.getDateHeader(), fails silently by returning -1.
 java.lang.String getHeader(java.lang.String name)
          Proxy to HttpServletRequest.getHeader().
 java.lang.String[] getHeaders(java.lang.String name)
          Proxy to HttpServletRequest.getHeaders(), returns header values as string array.
 int getIntHeader(java.lang.String name)
          Proxy to HttpServletRequest.getIntHeader(), fails silently by returning -1.
 java.lang.String getMethod()
          Return the method of the request.
 java.util.Map getParams()
           
 java.lang.String getPassword()
           
 java.lang.String getPath()
           
 java.util.Map getPostParams()
           
 java.util.Map getQueryParams()
           
 long getRuntime()
           
 javax.servlet.http.HttpServletRequest getServletRequest()
          Returns the Servlet request represented by this RequestTrans instance.
 java.lang.String getUri()
           
 java.lang.String getUsername()
           
 boolean isGet()
           
 boolean isPost()
           
 void setActionHandler(java.lang.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.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RequestBean

public RequestBean(RequestTrans req)
Creates a new RequestBean object.

Parameters:
req - ...
Method Detail

get

public java.lang.Object get(java.lang.String name)
Parameters:
name - ...
Returns:
...

getMethod

public java.lang.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 java.lang.String getHeader(java.lang.String name)
Proxy to HttpServletRequest.getHeader().

Parameters:
name - the header name
Returns:
the header value, or null

getHeaders

public java.lang.String[] getHeaders(java.lang.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(java.lang.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(java.lang.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 java.lang.String toString()
Overrides:
toString in class java.lang.Object
Returns:
A string representation of this request

getAction

public java.lang.String getAction()
Returns:
the invoked action

getData

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

getParams

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

getQueryParams

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

getPostParams

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

getCookies

public java.util.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 java.lang.String getPassword()
Returns:
the password if using HTTP basic authentication

getPath

public java.lang.String getPath()
Returns:
the request path

getUri

public java.lang.String getUri()
Returns:
the request URI

getUsername

public java.lang.String getUsername()
Returns:
the username if using HTTP basic authentication

getActionHandler

public java.lang.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(java.lang.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


Copyright © 1998-1998-${year} Helma.org. All Rights Reserved.