Open SiteSearch 4.1.1
Final

ORG.oclc.webz
Class LIMIT

java.lang.Object
  |
  +--ORG.oclc.webz.Verb
        |
        +--ORG.oclc.webz.ZVerb
              |
              +--ORG.oclc.webz.ZQueryHandler
                    |
                    +--ORG.oclc.webz.LIMIT

public class LIMIT
extends ZQueryHandler

The LIMIT class is the WebZ Verb to set a persistent limiting query string to be 'anded' on all queries until the limit is reset. LIMIT uses input parameters contained in a RequestManager object, or a RequestManager object and a string containing a URL. A successful execution of LIMIT updates the UserStateObject to save the limiting query string and sets up the next page or command for execution in the RequestManager object. If a failure occurs, the user variables code and msg are updated to contain the reason and the next page or command for execution is set up in the RequestManager.

The processing flow of the LIMIT class is to initialize the user state for the correct database, parse the URL input parameters, invoke the query parser to create the appropriate Z39.50 limit query string, save the query in the user state, and set up the next command to execute in the RequestManager object.

The URL widgets recognized by the LIMIT class are:
dbname - the database name
dbgroup - the name of the database group defining the attributes for cross database searches
limitxx - a limiting query term
indexxx - an index for a query term
next - the next command or page to process
bad - the failure command or page to process
reset - flag to indicate that all persistent limits are to be reset. if the widget reset=true is found, the current limits are removed.

The user state entities that are set as a result LIMIT class are:
limits - the limiting query to 'and' with subsequent Z39.50 searches
displaylimits - the limiting query string suitable for display
code - the status of the request - see WebZErrors
msg - the error message for the request

See Also:
FailurePage, SuccessPage, RequestManager, UserStateObject, ZQueryHandler

Fields inherited from class ORG.oclc.webz.ZVerb
bytesIn, bytesOut, dbGroupSearch, dbname, fmtClass, format, inputQueryInfo, numrecs, postings, ranked, recno, resultSetName, sorting, tempDb, traceMsgs, z39session, zDb, zQueryTerm, zServer, zUserData
 
Fields inherited from class ORG.oclc.webz.Verb
user, widgets
 
Constructor Summary
LIMIT()
          Constructs a LIMIT object.
 
Method Summary
protected  void parseParms()
          Retrieves the limit parameters from the incoming URL and invokes the Z3958 query parser to create the limit query string.
 void runit(RequestManager rMngr)
          Executes the LIMIT class using the parameters in the RequestManager object.
 void runit(RequestManager rMngr, String URLCmd)
          Executes the LIMIT class using the RequestManager object and the input parameters contained in the URLCmd.
 
Methods inherited from class ORG.oclc.webz.ZQueryHandler
getErrMsg, getErrno, parse
 
Methods inherited from class ORG.oclc.webz.ZVerb
doAccessControl, doSort, initZUser, restoreDbState, saveDbState, saveRecs, toString
 
Methods inherited from class ORG.oclc.webz.Verb
setUpPage
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

LIMIT

public LIMIT()
Constructs a LIMIT object.
Method Detail

runit

public void runit(RequestManager rMngr)
Executes the LIMIT class using the parameters in the RequestManager object. Each method called from the runit() method can throw a FailurePage exception. If this occurs, the catch logic for the exceptions invokes setup of the next page or command to execute upon return. Errors result in a failure to set the limits entity in the user state. Successful execution of all steps sets up the next page for execution upon return.
Parameters:
rMngr - the RequestManager object
Overrides:
runit in class Verb

runit

public void runit(RequestManager rMngr,
                  String URLCmd)
Executes the LIMIT class using the RequestManager object and the input parameters contained in the URLCmd. This is used when creating a LIMIT object from one of the application classes and sending in the query parameters in the URL String. Each method called from the runit() method can throw a FailurePage exception. If this occurs, the catch logic for the exceptions invokes setup of the next page or command to execute upon return. Errors result in a failure to set the limits entity in the user state. Successful execution of all steps sets up the next page for execution upon return.
Parameters:
rMngr - the RequestManager object
URLCmd - the command string with the widgets delimited by ":". For example, LIMIT:next=results.html:limit-pt:=dog

parseParms

protected void parseParms()
                   throws FailurePage
Retrieves the limit parameters from the incoming URL and invokes the Z3958 query parser to create the limit query string.
Throws:
FailurePage - the limit string is invalid

Open SiteSearch 4.1.1
Final