atg.commerce.csr.order
Class OrderTableFormHandler

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.droplet.TransactionalFormHandler
                      extended by atg.web.formhandlers.ApplicationFormHandler
                          extended by atg.svc.ui.formhandlers.ServiceFormHandler
                              extended by atg.svc.ui.formhandlers.FrameworkBaseFormHandler
                                  extended by atg.svc.search.PagingTableFormHandler
                                      extended by atg.svc.search.RepositoryQueryTableFormHandler
                                          extended by atg.commerce.csr.order.OrderTableFormHandler
All Implemented Interfaces:
atg.droplet.DropletFormHandler, atg.naming.AbsoluteNameable, atg.naming.NameContextBindingListener, atg.naming.NameContextElement, atg.naming.NameContextParentable, atg.naming.NameResolver, atg.nucleus.AdminableService, atg.nucleus.Configured, atg.nucleus.logging.ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, atg.nucleus.naming.ComponentNameResolver, atg.nucleus.Service, atg.nucleus.ServiceListener, atg.svc.ui.formhandlers.FormHandlerConstants, java.util.EventListener
Direct Known Subclasses:
RelatedOrdersTableFormHandler, ScheduledOrderTableFormHandler, SubmittedOrderTableFormHandler

public class OrderTableFormHandler
extends atg.svc.search.RepositoryQueryTableFormHandler

This is the base class used by panels to generate list of orders that's generated from a repository search.

See Also:
RepositoryQueryTableFormHandler

Nested Class Summary
static class OrderTableFormHandler.ResultWrapper
          This inner class defines the wrapper object used to wrap each repository item in the result.
 
Field Summary
static java.lang.String CLASS_VERSION
           
protected  atg.commerce.catalog.CatalogTools mCatalogTools
           
protected  CSRAgentTools mCSRAgentTools
           
protected  java.lang.String mProfileId
           
 
Fields inherited from class atg.svc.search.RepositoryQueryTableFormHandler
mItemDescriptorName, mRepository, mRepositoryView
 
Fields inherited from class atg.svc.search.PagingTableFormHandler
mCurrentPage, mResultsPerPage, mSearchResults, mSortDirection, mSortField, mTotalItemCount, SORT_DIRECTION_ASCENDING, SORT_DIRECTION_DESCENDING
 
Fields inherited from class atg.svc.ui.formhandlers.ServiceFormHandler
PERFMON_OP_FORM_HANDLER
 
Fields inherited from class atg.web.formhandlers.ApplicationFormHandler
EQUALS, PARAM_DELIMITER, QUERY_DELIMITER, STATUS_ERROR_REDIRECT, STATUS_ERROR_STAY, STATUS_SUCCESS
 
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.svc.ui.formhandlers.FormHandlerConstants
OPTIONS_ANSWER_DISPLAY, OPTIONS_ANSWER_DISPLAY_CURRENT_WINDOW, OPTIONS_ANSWER_DISPLAY_MULTIPLE_WINDOWS, OPTIONS_ANSWER_DISPLAY_SINGLE_WINDOW, OPTIONS_FILTER_BY_DOC_SET, OPTIONS_FILTER_BY_FORMAT, OPTIONS_FILTER_BY_SOURCE, OPTIONS_FILTER_BY_TITLE, OPTIONS_FILTER_OR_GROUPING_FILTER, OPTIONS_FILTER_OR_GROUPING_GROUP, OPTIONS_FILTER_OR_GROUPING_NONE, OPTIONS_QUERY_LANGUAGE, OPTIONS_RESULT_LANGUAGE, OPTIONS_SHOW_ANSWERS_AS, OPTIONS_SHOW_ANSWERS_BY_DOC, OPTIONS_SHOW_ANSWERS_INDIVIDUAL, OPTIONS_SHOW_FAQS_AS_QUESTIONS, OPTIONS_SHOW_FAQS_AS_QUESTIONS_AND_ANSWERS, PARAM_SITE_ID
 
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
OrderTableFormHandler()
           
 
Method Summary
protected  java.util.List assembleSearchResults(atg.repository.RepositoryItem[] results)
          Overrides the base bahavior to wrap each repository item in the result with a ResultWrapper object.
protected  atg.repository.Query createOrdersByUserQuery(atg.repository.QueryBuilder pQueryBuilder, java.lang.String pProfileId)
          Creates a query for finding all orders that are owned by the customer.
protected  atg.repository.Query createSearchQuery(atg.repository.QueryBuilder pQueryBuilder)
           
protected  atg.repository.Query createSearchQuery(atg.repository.QueryBuilder pQueryBuilder, java.lang.String pProfileId)
          Creates the query that will be used to produce the search results.
 atg.commerce.catalog.CatalogTools getCatalogTools()
          Returns a reference to CatalogTools
 CSRAgentTools getCSRAgentTools()
           
protected  java.lang.String getFirstOrderItemName(atg.repository.RepositoryItem pOrder)
          Returns the name of the product referenced by the first commerce item in the order.
 java.lang.String getProfileId()
          returns the profile id for which the order search will be generated
 boolean isNullValue(java.lang.String pValue)
           
 void setCatalogTools(atg.commerce.catalog.CatalogTools pCatalogTools)
           
 void setCSRAgentTools(CSRAgentTools pCSRAgentTools)
          Sets the property CSRAgentTools.
 void setProfileId(java.lang.String pProfileId)
           
 
Methods inherited from class atg.svc.search.RepositoryQueryTableFormHandler
executeCountQuery, getItemDescriptorName, getRepository, getRepositoryView, search, setItemDescriptorName, setRepository
 
Methods inherited from class atg.svc.search.PagingTableFormHandler
buildSortDirectives, calculateEndIndex, calculateStartIndex, getCurrentPage, getResultsPerPage, getSearchResults, getSortDirection, getSortField, getTotalItemCount, handleSearch, postSearch, preSearch, setCurrentPage, setResultsPerPage, setSearchResults, setSortDirection, setSortField, setTotalItemCount
 
Methods inherited from class atg.svc.ui.formhandlers.FrameworkBaseFormHandler
formHandlerInit, getErrorURL, getParameterMap, getParameters, handleChangeTab, handleCloseWindow, handleGetWindowTab, handleHidePanel, handleProcessPanel, handleScrollPanelTabsLeft, handleScrollPanelTabsRight, handleSelectTabbedPanel, handleShowPanel, handleToggleCell, handleTogglePanel, handleTogglePanelContent, handleTogglePanelsToTabs, handleTransform, setErrorURL, setParameterMap, setParameters
 
Methods inherited from class atg.svc.ui.formhandlers.ServiceFormHandler
handleUncheckedFormException, isLoggingUncheckedException, isRollbackTransactionOnFormError, isTransactionMarkedAsRollback, processException, processException, setLoggingUncheckedException, setRollbackTransactionOnFormError
 
Methods inherited from class atg.web.formhandlers.ApplicationFormHandler
addParameterToURLString, beforeGet, beforeSet, checkFormError, checkFormRedirect, checkFormSuccess, formHandlerBeforeGet, formHandlerBeforeSet, getDefaultLocale, getRedirectDelayMS, getString, getString, getString, getSuccessURL, getUserLocale, getUserMessagesResourceBundle, handleCancel, isUseRequestLocale, processException, processException, processExceptionAndLog, processExceptionAndLog, redirect, setDefaultLocale, setRedirectDelayMS, setSuccessURL, setUseRequestLocale, setUserMessagesResourceBundle
 
Methods inherited from class atg.droplet.TransactionalFormHandler
afterSet, commitTransaction, getTransactionDemarcation, getTransactionStatus, isEnsureTransaction, isRollbackTransaction, isRollbackTransactionOnUnhandledException, setEnsureTransaction, setRollbackTransaction, setRollbackTransactionOnUnhandledException, setTransactionDemarcation
 
Methods inherited from class atg.droplet.GenericFormHandler
addFormException, addUncheckedFormException, createFormSubmissionMessage, getCancelURL, getCheckForValidSession, getFormError, getFormExceptions, getFormName, getMessagePort, getMessageSource, getMessageType, getPropertyExceptions, getSendMessages, getUncheckedFormExceptions, handleFormException, 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, getAdminServletOutputStreamEncoding, getLoggingForVlogging, getLogListenerCount, getLogListeners, getName, getNameContext, getNucleus, getRoot, getServiceConfiguration, getServiceInfo, isAdminServletUseServletOutputStream, isLoggingDebug, isLoggingError, isLoggingInfo, isLoggingTrace, isLoggingWarning, isRunning, logDebug, logDebug, logDebug, logError, logError, logError, logInfo, logInfo, logInfo, logTrace, logTrace, logTrace, logWarning, logWarning, logWarning, nameContextElementBound, nameContextElementUnbound, removeLogListener, reResolveThis, resolveName, resolveName, resolveName, resolveName, sendLogEvent, setAdminServletOutputStreamEncoding, setAdminServletUseServletOutputStream, setLoggingDebug, setLoggingError, setLoggingInfo, setLoggingTrace, setLoggingWarning, setNucleus, setServiceInfo, startService, stopService
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, 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 final java.lang.String CLASS_VERSION
See Also:
Constant Field Values

mCatalogTools

protected atg.commerce.catalog.CatalogTools mCatalogTools

mCSRAgentTools

protected CSRAgentTools mCSRAgentTools

mProfileId

protected java.lang.String mProfileId
Constructor Detail

OrderTableFormHandler

public OrderTableFormHandler()
Method Detail

getCatalogTools

public atg.commerce.catalog.CatalogTools getCatalogTools()
Returns a reference to CatalogTools

Returns:
CatalogTools

setCatalogTools

public void setCatalogTools(atg.commerce.catalog.CatalogTools pCatalogTools)

setCSRAgentTools

public void setCSRAgentTools(CSRAgentTools pCSRAgentTools)
Sets the property CSRAgentTools.


getCSRAgentTools

public CSRAgentTools getCSRAgentTools()
Returns:
The value of the property CSRAgentTools.

getProfileId

public java.lang.String getProfileId()
returns the profile id for which the order search will be generated

Returns:
String

setProfileId

public void setProfileId(java.lang.String pProfileId)

createSearchQuery

protected atg.repository.Query createSearchQuery(atg.repository.QueryBuilder pQueryBuilder,
                                                 java.lang.String pProfileId)
                                          throws atg.repository.RepositoryException
Creates the query that will be used to produce the search results.

By default the query produced will find all orders owned by the given customer that are not scheduled order templates.

Parameters:
pQueryBuilder -
pProfileId -
Returns:
Query
Throws:
atg.repository.RepositoryException
See Also:
createOrdersByUserQuery(QueryBuilder, String)

createSearchQuery

protected atg.repository.Query createSearchQuery(atg.repository.QueryBuilder pQueryBuilder)
                                          throws atg.repository.RepositoryException
Specified by:
createSearchQuery in class atg.svc.search.RepositoryQueryTableFormHandler
Throws:
atg.repository.RepositoryException
See Also:
createOrdersByUserQuery(QueryBuilder, String)

createOrdersByUserQuery

protected atg.repository.Query createOrdersByUserQuery(atg.repository.QueryBuilder pQueryBuilder,
                                                       java.lang.String pProfileId)
                                                throws atg.repository.RepositoryException
Creates a query for finding all orders that are owned by the customer.

Parameters:
pQueryBuilder -
pProfileId -
Returns:
Query
Throws:
atg.repository.RepositoryException

assembleSearchResults

protected java.util.List assembleSearchResults(atg.repository.RepositoryItem[] results)
Overrides the base bahavior to wrap each repository item in the result with a ResultWrapper object.

Overrides:
assembleSearchResults in class atg.svc.search.RepositoryQueryTableFormHandler

getFirstOrderItemName

protected java.lang.String getFirstOrderItemName(atg.repository.RepositoryItem pOrder)
Returns the name of the product referenced by the first commerce item in the order.

Parameters:
pOrder -
Returns:
product name

isNullValue

public boolean isNullValue(java.lang.String pValue)