Novell exteNd
Director 5.2 API

com.sssw.fw.util.http
Class HttpParameterHelper

java.lang.Object
 |
 +--com.sssw.fw.util.http.HttpParameterHelper

public class HttpParameterHelper
extends Object

HttpParameterHelper is a helper class used to more easily get submitted parameters and file content from POSTs and GETs.
Example: HttpParameterHelper paramUtil = new HttpParameterHelper(context.getEbiRequest());

String movieTitle = paramUtil.getParameter("movie_title");
byte[] moviePoster = paramUtil.getFileContent("movie_poster");
String moviePoster_MIME = paramUtil.getFileContentType("movie_poster");


Constructor Summary
HttpParameterHelper(HttpServletRequest request)
          Creates a new HttpParameterHelper
 
Method Summary
 com.sssw.fw.util.mime.EboMimeType getEboMimeType()
          Return the EboMimeType object
 byte[] getFileContent(String param)
          Get the bytes of the file submitted from the POST.
 String getFileContentType(String param)
          Get the Content-Type of the file submitted from the POST.
 HttpServletRequest getHttpServletRequest()
          Return the HttpServletRequest object
 String getParameter(String param)
          Get a parameter from the POST/GET.
 String[] getParameterValues(String param)
          Get a string array of values for a parameter from the POST/GET.
 EboParameterHolder getParamHolder()
          Return the ParameterHolder object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HttpParameterHelper

public HttpParameterHelper(HttpServletRequest request)
Creates a new HttpParameterHelper
Method Detail

getParamHolder

public EboParameterHolder getParamHolder()
Return the ParameterHolder object
Returns:
EboParameterHolder example - myParamUtil.getParamHolder();

getEboMimeType

public com.sssw.fw.util.mime.EboMimeType getEboMimeType()
Return the EboMimeType object
Returns:
EboMimeType example - myParamUtil.getEboMimeType();

getHttpServletRequest

public HttpServletRequest getHttpServletRequest()
Return the HttpServletRequest object
Returns:
HttpServletRequest example - myParamUtil.getHttpServletRequest();

getParameter

public String getParameter(String param)
Get a parameter from the POST/GET.
Parameters:
param - - String, the name of a parameter to get the value of from the submitted form or URL.
Returns:
string or null example - myParamUtil.getParameter("userName");

getParameterValues

public String[] getParameterValues(String param)
Get a string array of values for a parameter from the POST/GET.
Parameters:
param - - String, the name of a parameter to get the values of from the submitted form or URL.
Returns:
string[] or null example - myParamUtil.getParameterValues("categories");

getFileContent

public byte[] getFileContent(String param)
Get the bytes of the file submitted from the POST.
Parameters:
param - - String, the name of a field from the submitted form.
Returns:
byte[] or null example - myParamUtil.getFileContent("moviePoster");

getFileContentType

public String getFileContentType(String param)
Get the Content-Type of the file submitted from the POST.
Parameters:
param - - String, the name of a field from the submitted form.
Returns:
string or null example - myParamUtil.getFileContentType("moviePoster");

Novell exteNd
Director 5.2 API