The atg.search.query.formhandlers package provides a set of six form handlers for submitting queries to ATG Search. Each form handler can construct one of the six ATG Search query types.

Form Handler Class

Query Type

Client API Request Type

QueryFormHandler

<query>

ClientQueryRequest

StructuredQueryFormHandler

<structquery>

ClientStructuredRequest

BrowseFormHandler

<browse>

ClientCategoryRequest

ViewInContextFormHandler

<viewInContext>

ClientVicRequest

SimilarDocsFormHandler

<similardocs>

ClientSimilarDocsRequest

CategorizeFormHandler

<categorize>

ClientCategorizeRequest

These form handler classes are all subclasses of an abstract class, BaseSearchFormHandler, that implements much of the generic functionality of the form handlers: error handling, URL redirection, maintaining state information, query submission, event firing, etc. Each subclass then implements the logic necessary for constructing queries of one specific type.

From an architectural point of view, the search form handler classes are designed to be as simple as possible. Rather than including related functionality in the form handlers themselves, the ATG platform provides a number of additional classes with discrete functional roles. This approach allows each piece of functionality to be replaced more easily, and helps minimize the duplication of code.

A key element of this design is the SearchContext class, which is used as a session-scoped component for maintaining state information between requests. The form handlers themselves are designed to be request scoped.

 
loading table of contents...