mls.controller
Class Workflow

java.lang.Object
  |
  +--mls.controller.Workflow

public class Workflow
extends java.lang.Object

Multiple listing service workflow operations that process user requests from Web and WAP browsers


Field Summary
private static java.lang.String EMPTY_STRING
           
private static java.lang.String LAST_RESULTS
          Label used to cache results for a session
private static int MAX_RESULTS_PER_PAGE
           
private static int MIN_RESULTS_PER_PAGE
           
private static java.lang.String QUERY_CLASS
           
private static java.lang.String QUERY_PAGE
           
private static java.lang.String RESULTS_CLASS
           
private static java.lang.String RESULTS_PAGE
           
private static java.lang.String RESULTS_PER_PAGE
           
 
Constructor Summary
Workflow()
           
 
Method Summary
 boolean doQuery(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Viewer viewer)
          Operation method to do a query.
 boolean fetchNext(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Viewer viewer)
          Operation method to fetch a partial results set from a previous query.
private  int getNewResultsPerPage(javax.servlet.http.HttpServletRequest request)
          Get the specified or default results to be displayed on a page.
 boolean getQuery(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Viewer viewer)
          Operation method to display a query entry page
private  int getSavedResultsPerPage(javax.servlet.http.HttpServletRequest request)
          Get the previously saved number of results to be displayed on a page.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

QUERY_PAGE

private static final java.lang.String QUERY_PAGE

RESULTS_PAGE

private static final java.lang.String RESULTS_PAGE

QUERY_CLASS

private static final java.lang.String QUERY_CLASS

RESULTS_CLASS

private static final java.lang.String RESULTS_CLASS

LAST_RESULTS

private static final java.lang.String LAST_RESULTS
Label used to cache results for a session

MIN_RESULTS_PER_PAGE

private static final int MIN_RESULTS_PER_PAGE

MAX_RESULTS_PER_PAGE

private static final int MAX_RESULTS_PER_PAGE

RESULTS_PER_PAGE

private static final java.lang.String RESULTS_PER_PAGE

EMPTY_STRING

private static final java.lang.String EMPTY_STRING
Constructor Detail

Workflow

public Workflow()
Method Detail

getQuery

public boolean getQuery(javax.servlet.http.HttpServletRequest request,
                        javax.servlet.http.HttpServletResponse response,
                        Viewer viewer)
                 throws java.io.IOException
Operation method to display a query entry page
Parameters:
request - the Http request from the user agent
response - where the response is to be written
viewer - a viewer to display the output

doQuery

public boolean doQuery(javax.servlet.http.HttpServletRequest request,
                       javax.servlet.http.HttpServletResponse response,
                       Viewer viewer)
                throws java.io.IOException
Operation method to do a query. If the returned results are larger than the resultsPerPage, these results are saved in the user's session for later use.
Parameters:
request - the Http request from the user agent
response - where the response is to be written
viewer - a viewer to display the output
Returns:
true
See Also:
fetchNext(HttpServletRequest, HttpServletResponse, Viewer)

fetchNext

public boolean fetchNext(javax.servlet.http.HttpServletRequest request,
                         javax.servlet.http.HttpServletResponse response,
                         Viewer viewer)
                  throws java.io.IOException
Operation method to fetch a partial results set from a previous query.
Parameters:
request - the Http request from the user agent
response - where the response is to be written
viewer - a viewer to display the output
Returns:
true

getNewResultsPerPage

private int getNewResultsPerPage(javax.servlet.http.HttpServletRequest request)
Get the specified or default results to be displayed on a page.
Parameters:
IN - OUT request the Http request from the user agent. The session retrieved from this will be updated
Returns:
results per page

getSavedResultsPerPage

private int getSavedResultsPerPage(javax.servlet.http.HttpServletRequest request)
Get the previously saved number of results to be displayed on a page.
Parameters:
request - the Http request from the user agent.
Returns:
results per page or the default if something bad happens