com.indexdata.serviceproxy
Interface ServiceRequest

All Known Implementing Classes:
SimpleServiceRequest

public interface ServiceRequest

Represents the current service request.

Author:
jakub

Field Summary
static String CLIENT_WINDOW_ID_PARAMETER
           
 
Method Summary
 String getClientWindowId()
           
 String getMandatoryParameter(String name)
           
 String getMandatoryParameter(String name, List<String> validValues)
          Gets the value of a request parameter while validating the value against a list of allowed values
 String[] getMandatoryParameterValues(String name, List<String> validValues)
          Gets an array of values for a request parameter while checking that the parameter is indeed provided on the request and validating each of the values against a list of allowed values.
 String getParameter(String name)
           
 String getParameter(String name, List<String> validValues)
           
 Map<String,String[]> getParameterMap()
           
 String[] getParameterValues(String name, List<String> validValues)
           
 String getQueryString()
           
 javax.servlet.http.HttpServletRequest getRequest()
          Wrapped current HTTP request
 StringBuffer getRequestURL()
           
 javax.servlet.http.HttpSession getSession()
           
 

Field Detail

CLIENT_WINDOW_ID_PARAMETER

static final String CLIENT_WINDOW_ID_PARAMETER
See Also:
Constant Field Values
Method Detail

getRequest

javax.servlet.http.HttpServletRequest getRequest()
Wrapped current HTTP request

Returns:

getQueryString

String getQueryString()

getParameter

String getParameter(String name)

getParameter

String getParameter(String name,
                    List<String> validValues)
                    throws StandardServiceException
Throws:
StandardServiceException

getParameterValues

String[] getParameterValues(String name,
                            List<String> validValues)
                            throws StandardServiceException
Parameters:
name -
validValues -
Returns:
Throws:
StandardServiceException

getMandatoryParameter

String getMandatoryParameter(String name)
                             throws StandardServiceException
Throws:
StandardServiceException

getMandatoryParameter

String getMandatoryParameter(String name,
                             List<String> validValues)
                             throws StandardServiceException
Gets the value of a request parameter while validating the value against a list of allowed values

Parameters:
name - The name of the parameter
validValues - A list of valid parameter values
Returns:
The value of the parameter
Throws:
StandardServiceException - If the parameters value is not in the list of valid values or if the parameter is not provided with the request

getMandatoryParameterValues

String[] getMandatoryParameterValues(String name,
                                     List<String> validValues)
                                     throws StandardServiceException
Gets an array of values for a request parameter while checking that the parameter is indeed provided on the request and validating each of the values against a list of allowed values.

Parameters:
name -
validValues -
Returns:
Array of parameter values
Throws:
StandardServiceException - If any of the values are not in the list of valid values or if no parameter of that name is provided with the request

getParameterMap

Map<String,String[]> getParameterMap()

getSession

javax.servlet.http.HttpSession getSession()

getRequestURL

StringBuffer getRequestURL()

getClientWindowId

String getClientWindowId()


Copyright © 2008-2013 Index Data. All Rights Reserved.