atg.search.query.formhandlers
Class StructuredQueryFormHandler

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.droplet.EmptyFormHandler
              extended by atg.droplet.GenericFormHandler
                  extended by atg.search.query.formhandlers.BaseSearchFormHandler
                      extended by atg.search.query.formhandlers.StructuredQueryFormHandler
All Implemented Interfaces:
DropletFormHandler, NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, java.util.EventListener

public class StructuredQueryFormHandler
extends BaseSearchFormHandler

This form handler issues requests using the <structquery> tag


Field Summary
static java.lang.String CLASS_VERSION
           
 
Fields inherited from class atg.search.query.formhandlers.BaseSearchFormHandler
DEFAULT_ANONYMOUS_USERNAME, DEFAULT_SITE_NAME
 
Fields inherited from class atg.droplet.GenericFormHandler
PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS
 
Fields inherited from class atg.nucleus.GenericService
SERVICE_INFO_KEY
 
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging
DEFAULT_LOG_TRACE_STATUS
 
Fields inherited from interface atg.nucleus.logging.ApplicationLogging
DEFAULT_LOG_DEBUG_STATUS, DEFAULT_LOG_ERROR_STATUS, DEFAULT_LOG_INFO_STATUS, DEFAULT_LOG_WARNING_STATUS
 
Constructor Summary
StructuredQueryFormHandler()
           
 
Method Summary
protected  ClientRequest createClientRequest(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Creates and initializes the ClientRequest for this form handler, which is of type ClientStructuredRequest.
protected  SearchMessage createSearchMessage(ClientRequest pQueryRequest, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse)
          Create the JMS message to represent a ClientStructuredRequest and associated response data.
protected  ClientStructuredRequest getClientStructuredRequest()
          A convenience method to get the request object as the specific type for this request
 StructuredStatement getStatement(int pIndex)
          Get a StructuredStatement at specified index, if one does not yet exist, create it and return it.
protected  StructuredStatement[] getStructuredStatements()
          Return an array of structured statements
protected  DocumentSetConstraint getWeightedProps()
          Get the <weightedProps> tag contents as a DocumentSetConstraint object.
 XMLBuilder getWeightedPropsXMLBuilder()
          Get optional <weightedProps> XMLBuilder object.
protected  void prepareClientRequest(DynamoHttpServletRequest pDynamoHttpServletRequest)
          Overrides method in parent class, first calls parent method to set common request attributes/properties, then sets request specific weightedProperties and statments values into request.
 void setStatement(int pIndex, StructuredStatement pStatement)
          Set a StructuredStatement a specified index.
 void setWeightedPropsXMLBuilder(XMLBuilder pWeightedPropsBuilder)
          Set an optional <weightedProps> XMLBuilder object.
 
Methods inherited from class atg.search.query.formhandlers.BaseSearchFormHandler
afterSearch, beforeGet, beforeSearch, beforeSet, buildClientRequest, buildSimpleTag, createOptionSet, createSearchSession, createSessionConfig, decodeMapData, dumpMap, dumpRequestInfo, encodeArrayData, encodeCollectionData, encodeMapData, getAnonymousUserName, getAutoRedirect, getBooleanRequestAttribute, getBoolRequestAttribute, getClearQueryURL, getClientRequest, getDocumentSets, getDocumentSetsBuilder, getErrorURL, getIntegerRequestAttribute, getIntRequestAttribute, getOptionSet, getOptionSetName, getParserOptions, getParserOptionsBuilder, getRequestAttribute, getRequestAttributes, getResults, getResultsFetcher, getSearchContext, getSearchMessageSource, getSearchService, getSearchSession, getSessionBasedSearchRequest, getSessionBasedSearchResults, getSessionConfigLanguage, getSiteDefaultOptionSet, getSiteName, getStringArrayRequestAttribute, getSuccessURL, getUserProfile, handleAutoRedirect, handleClearQuery, handleErrorCondition, handleSearch, isRequestLogging, mergeMaps, sendSearchMessage, setAnonymousUserName, setAutoRedirect, setBooleanRequestAttribute, setClearQueryURL, setClientRequest, setDocumentSetsBuilder, setErrorURL, setOptionSet, setOptionSetName, setParserOptionsBuilder, setRequestAttribute, setRequestAttributes, setRequestLogging, setResults, setResultsFetcher, setSearchContext, setSearchService, setSessionBasedSearchRequest, setSessionBasedSearchResults, setSessionConfigLanguage, setSiteName, setSuccessURL, setUserProfile
 
Methods inherited from class atg.droplet.GenericFormHandler
addFormException, addUncheckedFormException, afterSet, checkFormRedirect, createFormSubmissionMessage, getCancelURL, getCheckForValidSession, getFormError, getFormExceptions, getFormName, getMessagePort, getMessageSource, getMessageType, getPropertyExceptions, getSendMessages, getUncheckedFormExceptions, handleCancel, handleFormException, handleUncheckedFormException, hasUncheckedFormExceptions, isDeferForwardsAndRedirects, isRestorableForm, isUseForwards, isValidSession, redirectOrForward, resetFormExceptions, setCancelURL, setCheckForValidSession, setDeferForwardsAndRedirects, setFormName, setMessagePort, setMessageSource, setMessageType, setRestorableForm, setSendMessages, setUseForwards
 
Methods inherited from class atg.droplet.EmptyFormHandler
afterGet
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, doStopService, getAbsoluteName, getAdminServlet, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Constructor Detail

StructuredQueryFormHandler

public StructuredQueryFormHandler()
Method Detail

setWeightedPropsXMLBuilder

public void setWeightedPropsXMLBuilder(XMLBuilder pWeightedPropsBuilder)
Set an optional <weightedProps> XMLBuilder object.

Parameters:
pWeightedPropsBuilder - the <weightedProps> constraints builder or null
See Also:
getWeightedProps()

getWeightedPropsXMLBuilder

public XMLBuilder getWeightedPropsXMLBuilder()
Get optional <weightedProps> XMLBuilder object.

Returns:
the <weightedProps> constraints builder or null
See Also:
getWeightedProps()

getWeightedProps

protected DocumentSetConstraint getWeightedProps()
Get the <weightedProps> tag contents as a DocumentSetConstraint object. Uses the object configured in weightedPropsXMLBuilder to create the tag's contents. If no weightedPropsBuilder object has been configured, creates a MapXMLBuilder.

Returns:
an object containing the <weightedProps> tag's contents
See Also:
XMLBuilder, MapXMLBuilder

createClientRequest

protected ClientRequest createClientRequest(DynamoHttpServletRequest pRequest,
                                            DynamoHttpServletResponse pResponse)
Creates and initializes the ClientRequest for this form handler, which is of type ClientStructuredRequest. Calls setOptionSet() with the result of createOptionSet(request).

Specified by:
createClientRequest in class BaseSearchFormHandler
Parameters:
pRequest - the dynamo request
pResponse - the dynamo response
Returns:
the new ClientStructuredRequest

getStatement

public StructuredStatement getStatement(int pIndex)
Get a StructuredStatement at specified index, if one does not yet exist, create it and return it.

Parameters:
pIndex - the statement index
Returns:
a structured statement

setStatement

public void setStatement(int pIndex,
                         StructuredStatement pStatement)
Set a StructuredStatement a specified index. Automatically expand backing collection to contain at least pIndex number of elements.

Parameters:
pIndex - the index
pStatement - the statement to add

prepareClientRequest

protected void prepareClientRequest(DynamoHttpServletRequest pDynamoHttpServletRequest)
Overrides method in parent class, first calls parent method to set common request attributes/properties, then sets request specific weightedProperties and statments values into request.

Overrides:
prepareClientRequest in class BaseSearchFormHandler
Parameters:
pDynamoHttpServletRequest - DynamoHttpServletRequest

getStructuredStatements

protected StructuredStatement[] getStructuredStatements()
Return an array of structured statements

Returns:
the possibly empty array of structured statements

createSearchMessage

protected SearchMessage createSearchMessage(ClientRequest pQueryRequest,
                                            DynamoHttpServletRequest pRequest,
                                            DynamoHttpServletResponse pResponse)
Create the JMS message to represent a ClientStructuredRequest and associated response data.

Specified by:
createSearchMessage in class BaseSearchFormHandler
Parameters:
pQueryRequest - the client request
pRequest - the Dynamo http request
pResponse - the Dynamo http response
Returns:
a JMS message of type StructuredQueryMessage

getClientStructuredRequest

protected ClientStructuredRequest getClientStructuredRequest()
A convenience method to get the request object as the specific type for this request

Returns:
the request object cast to the type used for this request