atg.b2bcommerce.order
Class B2BOrderLookup
java.lang.Object
atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.nucleus.TimedOperationService
atg.nucleus.servlet.ServletService
atg.nucleus.servlet.HttpServletService
atg.servlet.DynamoServlet
atg.commerce.order.OrderLookup
atg.b2bcommerce.order.B2BOrderLookup
- All Implemented Interfaces:
- NameContextBindingListener, NameContextElement, NameResolver, AdminableService, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, 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.)
- Additional optional input parameters are described at
OrderLookup
.
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
Fields inherited from class atg.commerce.order.OrderLookup |
ALL, CLOSED, CLOSEDSTATES, COUNT, CURRENT, 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, OPEN, OPENSTATES, ORDERID, OUTPUT, PREVIOUSINDEX, QUERYTOTAL, QUERYTOTALONLY, RESULT, SITEIDS, SITESCOPE, SORTASCENDING, SORTBY, STARTINDEX, STARTRANGE, STATE, TOTAL_COUNT, TOTALCOUNT, USERID |
Fields inherited from interface atg.nucleus.logging.TraceApplicationLogging |
DEFAULT_LOG_TRACE_STATUS |
Methods inherited from class atg.commerce.order.OrderLookup |
getClosedStates, getCurrentProfileId, getDefaultLocale, getDefaultNumOrders, getOpenStates, getOrderLookupService, getOrderManager, getProfilePath, getSiteGroupManager, getSiteScope, getUserLocale, isEnableSecurity, isQueryTotal, isSearchByOrderId, isSearchByUserId, isUseRequestLocale, searchByOrderId, SearchByOrderId, searchByUserId, SearchByUserId, setClosedStates, setDefaultLocale, setDefaultNumOrders, setEnableSecurity, setOpenStates, setOrderLookupService, setOrderManager, setProfilePath, setQueryTotal, setSearchByOrderId, setSearchByUserId, setSiteGroupManager, setSiteScope, setUseRequestLocale |
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, reResolveThis, 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 |
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
B2BOrderLookup
public B2BOrderLookup()
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 processedpRes
- 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