|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
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
public class OrderLookup
This servlet renders one or more order objects based on the input params. It takes as parameters:
siteScope
property, which defaults to "all".
Field Summary | |
---|---|
static java.lang.String |
ALL
|
static java.lang.String |
CLASS_VERSION
Class version string |
static java.lang.String |
CLOSED
|
static ParameterName |
CLOSEDSTATES
The input parameter that indicates which are the states that correspond to closed states. |
static java.lang.String |
COUNT
The number of orders in the result object |
static java.lang.String |
CURRENT
|
protected static int |
DEFAULT_NUM_ORDERS
|
static java.lang.String |
EMPTY
The open parameter that indicates that there were no results |
static java.lang.String |
ENDRANGE
The output parameter that indicates the end value of the current batch |
static java.lang.String |
ERROR
The open parameter that indicates that there was an error |
static java.lang.String |
ERRORMESSAGE
The output parameter that includes the error message. |
protected ComponentName |
mProfilePath
|
protected static java.lang.String |
MSG_GENERAL_ERROR
|
protected static java.lang.String |
MSG_NO_PARAM_SPECIFIED
|
protected static java.lang.String |
MSG_NO_PERMISSION_FOR_ORDER
|
protected static java.lang.String |
MSG_NO_PERMISSION_FOR_USERS_ORDERS
|
protected static java.lang.String |
MSG_NO_SUCH_ORDER
|
static java.lang.String |
NEXTINDEX
The output parameter that indicates the first index of the next batch |
static ParameterName |
NUMORDERS
The input parameter that indicates the number (count) of orders that need to be returned. |
static java.lang.String |
OPEN
|
static ParameterName |
OPENSTATES
The optional input parameter that indicates which are the states that correspond to open states. |
static ParameterName |
ORDERID
The input parameter that indicates which order to get |
static java.lang.String |
OUTPUT
The open parameter that indicates that there is a result |
static java.lang.String |
PREVIOUSINDEX
The output parameter that indicates the first index of the previous batch |
static ParameterName |
QUERYTOTAL
The input parameter that indicates whether a count of orders should be returned in the totalCount and total_count output parameters. |
static ParameterName |
QUERYTOTALONLY
The input parameter that indicates that only a count of orders should be returned in the totalCount and total_count output parameters, and that the orders themselves should not be returned |
static java.lang.String |
RESULT
The output parameter that includes the order object or list of order objects that were found in response to the input parameters. |
static ParameterName |
SITEIDS
The input parameter that indicates which sites' orders to get |
static ParameterName |
SITESCOPE
The input parameter that indicates which shareable type's sites' orders to get |
static ParameterName |
SORTASCENDING
The input parameter that indicates the sorting order - it is true for ascending. |
static ParameterName |
SORTBY
The input parameter that indicates the column that should be used to sorting. |
static ParameterName |
STARTINDEX
The input parameter that indicates the index of the first order to return. |
static java.lang.String |
STARTRANGE
The output parameter that indicates the start value of the current batch |
static ParameterName |
STATE
The input parameter to indicate how to further narrow the result set when we search for a user's orders. |
static java.lang.String |
TOTAL_COUNT
The total number of orders that match the criteria, this is unset if queryTotal is set to false |
static java.lang.String |
TOTALCOUNT
The total number of orders that match the criteria, this is unset if queryTotal is set to false |
static ParameterName |
USERID
The input parameter that indicates whose list of orders to get |
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 | |
---|---|
OrderLookup()
|
Method Summary | |
---|---|
java.lang.String[] |
getClosedStates()
gets the property closedStates. |
protected java.lang.String |
getCurrentProfileId(DynamoHttpServletRequest pReq)
get the profile id of the current user |
java.util.Locale |
getDefaultLocale()
Returns property DefaultLocale. |
int |
getDefaultNumOrders()
The default number of orders returned with each call. |
java.lang.String[] |
getOpenStates()
gets the property openStates. |
atg.commerce.order.OrderLookupService |
getOrderLookupService()
The service that is actually used to find the desired orders |
OrderManager |
getOrderManager()
Returns the orderManager property which is a component that is useful for many order management functions. |
java.lang.String |
getProfilePath()
Returns property ProfilePath |
atg.multisite.SiteGroupManager |
getSiteGroupManager()
Returns the SiteGroupManager component |
java.lang.String |
getSiteScope()
gets the property siteScope |
java.util.Locale |
getUserLocale(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Returns the locale associated with the request. |
boolean |
isEnableSecurity()
gets the property enableSecurity. |
boolean |
isQueryTotal()
|
boolean |
isSearchByOrderId()
gets the property searchByOrderId. |
boolean |
isSearchByUserId()
gets the property searchByUserId. |
boolean |
isUseRequestLocale()
Returns property UseRequestLocale |
protected void |
searchByOrderId(DynamoHttpServletRequest pReq,
DynamoHttpServletResponse pRes,
java.lang.String orderId)
This method loads the order with the given id using the OrderManager. |
protected void |
SearchByOrderId(DynamoHttpServletRequest pReq,
DynamoHttpServletResponse pRes,
java.lang.String orderId)
Deprecated. Use searchByOrderId(DynamoHttpServletRequest,DynamoHttpServletResponse,String) instead |
protected void |
searchByUserId(DynamoHttpServletRequest pReq,
DynamoHttpServletResponse pRes,
java.lang.String userId)
This method uses the OrderLookupService to find the orders for the states corresponding to the request parameter "state" that are owned by the given user (userId). |
protected void |
SearchByUserId(DynamoHttpServletRequest pReq,
DynamoHttpServletResponse pRes,
java.lang.String userId)
Deprecated. Use searchByUserId(DynamoHttpServletRequest,DynamoHttpServletResponse,String) instead |
void |
service(DynamoHttpServletRequest pReq,
DynamoHttpServletResponse pRes)
service the request |
void |
setClosedStates(java.lang.String[] pClosedStates)
sets the property closedStates. |
void |
setDefaultLocale(java.util.Locale pDefaultLocale)
Sets property DefaultLocale |
void |
setDefaultNumOrders(int pDefaultNumOrders)
|
void |
setEnableSecurity(boolean pEnableSecurity)
sets the property enableSecurity. |
void |
setOpenStates(java.lang.String[] pOpenStates)
sets the property openStates. |
void |
setOrderLookupService(atg.commerce.order.OrderLookupService pOrderLookupService)
The service that is actually used to find the desired orders |
void |
setOrderManager(OrderManager pOrderManager)
Sets the property orderManager which points to the DCS order manager nucleus component. |
void |
setProfilePath(java.lang.String pProfilePath)
Sets property ProfilePath |
void |
setQueryTotal(boolean pQueryTotal)
True if the total order count should be retrieved when any order lookup is done. |
void |
setSearchByOrderId(boolean pSearchByOrderId)
sets the property searchByOrderId. |
void |
setSearchByUserId(boolean pSearchByUserId)
sets the property searchByUserId. |
void |
setSiteGroupManager(atg.multisite.SiteGroupManager pSiteGroupManager)
Sets the SiteGroupManager component |
void |
setSiteScope(java.lang.String pSiteScope)
sets the property siteScope. |
void |
setUseRequestLocale(boolean pUseRequestLocale)
Sets property UseRequestLocale |
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.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 |
---|
public static final java.lang.String CLASS_VERSION
public static final ParameterName ORDERID
public static final ParameterName USERID
public static final ParameterName OPENSTATES
public static final ParameterName SORTBY
public static final ParameterName SORTASCENDING
public static final ParameterName QUERYTOTALONLY
public static final ParameterName QUERYTOTAL
public static final ParameterName CLOSEDSTATES
public static final ParameterName STARTINDEX
public static final ParameterName NUMORDERS
public static final ParameterName STATE
public static final ParameterName SITEIDS
public static final ParameterName SITESCOPE
public static final java.lang.String ERRORMESSAGE
public static final java.lang.String RESULT
public static final java.lang.String COUNT
public static final java.lang.String TOTAL_COUNT
public static final java.lang.String TOTALCOUNT
public static final java.lang.String NEXTINDEX
public static final java.lang.String PREVIOUSINDEX
public static final java.lang.String STARTRANGE
public static final java.lang.String ENDRANGE
public static final java.lang.String ERROR
public static final java.lang.String OUTPUT
public static final java.lang.String EMPTY
public static final java.lang.String CLOSED
public static final java.lang.String OPEN
public static final java.lang.String ALL
public static final java.lang.String CURRENT
protected static final java.lang.String MSG_GENERAL_ERROR
protected static final java.lang.String MSG_NO_SUCH_ORDER
protected static final java.lang.String MSG_NO_PARAM_SPECIFIED
protected static final java.lang.String MSG_NO_PERMISSION_FOR_ORDER
protected static final java.lang.String MSG_NO_PERMISSION_FOR_USERS_ORDERS
protected static int DEFAULT_NUM_ORDERS
protected ComponentName mProfilePath
Constructor Detail |
---|
public OrderLookup()
Method Detail |
---|
public void setEnableSecurity(boolean pEnableSecurity)
public boolean isEnableSecurity()
public void setDefaultNumOrders(int pDefaultNumOrders)
public int getDefaultNumOrders()
public void setOrderManager(OrderManager pOrderManager)
pOrderManager
- the OrderManager component. Usually /atg/commerce/order/OrderManagerpublic OrderManager getOrderManager()
public void setOrderLookupService(atg.commerce.order.OrderLookupService pOrderLookupService)
pOrderLookupService
- the OrderLookupService component. Usually /atg/commerce/order/OrderLookupServicepublic atg.commerce.order.OrderLookupService getOrderLookupService()
public void setSiteGroupManager(atg.multisite.SiteGroupManager pSiteGroupManager)
pSiteGroupManager
- the SiteGroupManager component. Usually /atg/multisite/SiteGroupManagerpublic atg.multisite.SiteGroupManager getSiteGroupManager()
public void setProfilePath(java.lang.String pProfilePath)
pProfilePath
- path to the profile nucleus component. Usually atg/userprofiling/Profilepublic java.lang.String getProfilePath()
public void setOpenStates(java.lang.String[] pOpenStates)
public java.lang.String[] getOpenStates()
public void setClosedStates(java.lang.String[] pClosedStates)
public java.lang.String[] getClosedStates()
public void setSearchByOrderId(boolean pSearchByOrderId)
public boolean isSearchByOrderId()
public void setSearchByUserId(boolean pSearchByUserId)
public boolean isSearchByUserId()
public void setSiteScope(java.lang.String pSiteScope)
public java.lang.String getSiteScope()
public void service(DynamoHttpServletRequest pReq, DynamoHttpServletResponse pRes) throws javax.servlet.ServletException, java.io.IOException
service
in class DynamoServlet
pReq
- the request to be processedpRes
- the response object for this request
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.protected void SearchByOrderId(DynamoHttpServletRequest pReq, DynamoHttpServletResponse pRes, java.lang.String orderId) throws javax.servlet.ServletException, java.io.IOException
searchByOrderId(DynamoHttpServletRequest,DynamoHttpServletResponse,String)
instead
pReq
- The http request objectpRes
- The http response objectorderId
- The order id being retrieved
javax.servlet.ServletException
java.io.IOException
protected void searchByOrderId(DynamoHttpServletRequest pReq, DynamoHttpServletResponse pRes, java.lang.String orderId) throws javax.servlet.ServletException, java.io.IOException
pReq
- The http request objectpRes
- The http response objectorderId
- The order id being retrieved
javax.servlet.ServletException
java.io.IOException
protected void SearchByUserId(DynamoHttpServletRequest pReq, DynamoHttpServletResponse pRes, java.lang.String userId) throws javax.servlet.ServletException, java.io.IOException
searchByUserId(DynamoHttpServletRequest,DynamoHttpServletResponse,String)
instead
pReq
- The http request objectpRes
- The http response objectuserId
- The user whose orders are being retrieved
javax.servlet.ServletException
java.io.IOException
getOpenStates()
,
getClosedStates()
protected void searchByUserId(DynamoHttpServletRequest pReq, DynamoHttpServletResponse pRes, java.lang.String userId) throws javax.servlet.ServletException, java.io.IOException
pReq
- The http request objectpRes
- The http response objectuserId
- The user whose orders are being retrieved
javax.servlet.ServletException
java.io.IOException
getOpenStates()
,
getClosedStates()
protected java.lang.String getCurrentProfileId(DynamoHttpServletRequest pReq)
public void setDefaultLocale(java.util.Locale pDefaultLocale)
public java.util.Locale getDefaultLocale()
public void setUseRequestLocale(boolean pUseRequestLocale)
public boolean isUseRequestLocale()
public void setQueryTotal(boolean pQueryTotal)
public boolean isQueryTotal()
public java.util.Locale getUserLocale(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
locale
. This value can be
either a java.util.Locale object or a String which represents the locale.
Next if the useRequestLocale
property is true, then the locale
of the request will be returned. Finally, if the locale cannot be determined,
the the defaultLocale
property is used.
javax.servlet.ServletException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |