|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.epnet.eit.web.SearchRequestHelper
Helper class to service a search request
Constructor Summary | |
SearchRequestHelper(java.lang.String recordsPerPage)
Creates a new instance of RequestHelper |
Method Summary | |
protected java.lang.String |
getFirstAN(java.lang.String xml)
Gets the first article id (AN) from the search XML. |
protected java.lang.String |
getPage(javax.servlet.http.HttpServletRequest request)
Get the proper page according to request |
protected java.lang.String |
getParameter(javax.servlet.http.HttpServletRequest request,
java.lang.String param,
boolean mandatory)
This method throws an exception if a mandatory parameter is not found |
protected boolean |
isSingleRecordResult(java.lang.String xml)
Quickly analizes the XML to determine if it is a one-hit record search. |
protected boolean |
isValidRequest(javax.servlet.http.HttpServletRequest request)
Verifies that the request contains al least the main parameters: db and query |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SearchRequestHelper(java.lang.String recordsPerPage) throws java.lang.Exception
recordsPerPage
- Records per page for pagination
java.lang.Exception
- If records per page provided is not a valid numberMethod Detail |
protected java.lang.String getParameter(javax.servlet.http.HttpServletRequest request, java.lang.String param, boolean mandatory) throws javax.servlet.ServletException
request
- The HttpServletRequest receivedparam
- parameter to retrieve from request.mandatory
- if parameter to retrive if mandatory.
This indicates the object to throw an Exception if true not found.
javax.servlet.ServletException
- If parameter not found and mandatoryprotected java.lang.String getPage(javax.servlet.http.HttpServletRequest request)
request
- request
protected boolean isValidRequest(javax.servlet.http.HttpServletRequest request)
request
- The HttpServletRequest received
protected boolean isSingleRecordResult(java.lang.String xml)
xml
- search xml
protected java.lang.String getFirstAN(java.lang.String xml)
xml
- search xml
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |