atg.b2bcommerce.order
Class B2BOrderLookup

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.nucleus.TimedOperationService
              extended by atg.nucleus.servlet.ServletService
                  extended by atg.nucleus.servlet.HttpServletService
                      extended by atg.servlet.DynamoServlet
                          extended by atg.commerce.order.OrderLookup
                              extended by atg.b2bcommerce.order.B2BOrderLookup
All Implemented Interfaces:
NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, ParameterServlet, java.util.EventListener, javax.servlet.Servlet

public class B2BOrderLookup
extends OrderLookup

This servlet renders one or more order objects based on the input params. It takes as parameters:

orderId
the id of the order to get
userId
the id of the user profile whose orders we will get
costCenterId
the id of the cost centers whose orders we will get
state
the desired state of orders to get (optional. used in conjunction with userId)
startIndex
the first order to return. This is useful for cycling through large amounts of orders. On first first query start at 0 and return 10. On the second query, start at 10, etc. If startIndex is null, it defaults to 0. (the beginning) (optional. used to break large result sets into manageable pieces.)
numOrders
the number of orders to return on the query. (optional. used to break large result sets into manageable pieces.)
It renders the following oparams:
output
The oparam output is rendered once and the array of order objects (or the single order object if the orderId object was used) will be set in the "result" param. The index of the next displayable order is in the "nextIndex" param. The index of the previous set of orders (allowing the user to cycle back and forth) is in the "previousIndex" param.
error
error will be rendered if an error occurred
It sets the following output params:
result
This will contain an array of order objects. If the orderId input param was used, then it will contain a single order object.
nextIndex
The index of the first order in the next set of results. If startIndex or numOrders was null, this will also be null.
previousIndex
The index of the first order in the previous set of results. If startIndex or numOrders was null, this will also be null.
errorMsg
if an error occurred this will be the detailed error message for the user.
This droplet has a security feature that allows only the current user to view the his own orders. This feature is enabled by default. To disable it, set the property enableSecurity=false


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
static ParameterName COSTCENTERID
           
protected static java.lang.String MSG_NO_B2B_PARAM_SPECIFIED
           
 
Fields inherited from class atg.commerce.order.OrderLookup
CLOSEDSTATES, COUNT, DEFAULT_NUM_ORDERS, EMPTY, ENDRANGE, ERROR, ERRORMESSAGE, mProfilePath, MSG_GENERAL_ERROR, MSG_NO_PARAM_SPECIFIED, MSG_NO_PERMISSION_FOR_ORDER, MSG_NO_PERMISSION_FOR_USERS_ORDERS, MSG_NO_SUCH_ORDER, NEXTINDEX, NUMORDERS, OPENSTATES, ORDERID, OUTPUT, PREVIOUSINDEX, QUERYTOTAL, QUERYTOTALONLY, RESOURCE_BUNDLE, RESULT, SORTASCENDING, SORTBY, STARTINDEX, STARTRANGE, STATE, TOTAL_COUNT, TOTALCOUNT, USERID
 
Fields inherited from class atg.servlet.DynamoServlet
mAllowCleanupRequest, mParameters
 
Fields inherited from class atg.nucleus.servlet.ServletService
SERVLET_INFO_KEY
 
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
B2BOrderLookup()
           
 
Method Summary
 CostCenterManager getCostCenterManager()
          Returns the costCenterManager property which is a component that is useful for many order management functions.
 boolean isSearchByCostCenterId()
          gets the property searchByCostCenterId.
 void SearchByCostCenterId(DynamoHttpServletRequest pReq, DynamoHttpServletResponse pRes, java.lang.String costCenterId)
           
 void service(DynamoHttpServletRequest pReq, DynamoHttpServletResponse pRes)
          service the request
 void setCostCenterManager(CostCenterManager pCostCenterManager)
          Sets the property costCenterManager which points to the DCS cost center manager nucleus component.
 void setSearchByCostCenterId(boolean pSearchByCostCenterId)
          sets the property searchByCostCenterId.
 
Methods inherited from class atg.commerce.order.OrderLookup
getClosedStates, getCurrentProfileId, getDefaultLocale, getDefaultNumOrders, getOpenStates, getOrderLookupService, getOrderManager, getProfilePath, getUserLocale, isEnableSecurity, isQueryTotal, isSearchByOrderId, isSearchByUserId, isUseRequestLocale, searchByOrderId, SearchByOrderId, searchByUserId, SearchByUserId, setClosedStates, setDefaultLocale, setDefaultNumOrders, setEnableSecurity, setOpenStates, setOrderLookupService, setOrderManager, setProfilePath, setQueryTotal, setSearchByOrderId, setSearchByUserId, setUseRequestLocale
 
Methods inherited from class atg.servlet.DynamoServlet
doDelete, doGet, doPost, doPut, getParameter, getParameters, getServletContext, service, service, setParameter
 
Methods inherited from class atg.nucleus.servlet.ServletService
destroy, getServletConfig, getServletInfo, init, setServletInfo
 
Methods inherited from class atg.nucleus.TimedOperationService
getAverageRequestHandlingTime, getHandledRequestCount, getRequestStartTime, getTotalRequestHandlingTime, isKeepingStatistics, notifyHandledRequest, resetStatistics, setKeepingStatistics
 
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
Class version string


COSTCENTERID

public static final ParameterName COSTCENTERID

MSG_NO_B2B_PARAM_SPECIFIED

protected static final java.lang.String MSG_NO_B2B_PARAM_SPECIFIED
See Also:
Constant Field Values
Constructor Detail

B2BOrderLookup

public B2BOrderLookup()
Method Detail

setCostCenterManager

public void setCostCenterManager(CostCenterManager pCostCenterManager)
Sets the property costCenterManager which points to the DCS cost center manager nucleus component.

Parameters:
pCostCenterManager - the CostCenterManager component. Usually /atg/commerce/order/CostCenterManager

getCostCenterManager

public CostCenterManager getCostCenterManager()
Returns the costCenterManager property which is a component that is useful for many order management functions.


setSearchByCostCenterId

public void setSearchByCostCenterId(boolean pSearchByCostCenterId)
sets the property searchByCostCenterId. This property determines whether the service should look for and attempt a search by Cost Center Id


isSearchByCostCenterId

public boolean isSearchByCostCenterId()
gets the property searchByCostCenterId.


service

public void service(DynamoHttpServletRequest pReq,
                    DynamoHttpServletResponse pRes)
             throws javax.servlet.ServletException,
                    java.io.IOException
service the request

Overrides:
service in class OrderLookup
Parameters:
pReq - the request to be processed
pRes - the response object for this request
Throws:
javax.servlet.ServletException - an application specific error occurred processing this request
java.io.IOException - an error occurred reading data from the request or writing data to the response.

SearchByCostCenterId

public void SearchByCostCenterId(DynamoHttpServletRequest pReq,
                                 DynamoHttpServletResponse pRes,
                                 java.lang.String costCenterId)
                          throws javax.servlet.ServletException,
                                 java.io.IOException
Throws:
javax.servlet.ServletException
java.io.IOException