atg.commerce.order
Class OrderLookup

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
All Implemented Interfaces:
atg.naming.AbsoluteNameable, NameContextBindingListener, NameContextElement, atg.naming.NameContextParentable, NameResolver, AdminableService, atg.nucleus.Configured, ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, VariableArgumentApplicationLogging, ComponentNameResolver, Service, ServiceListener, ParameterServlet, java.util.EventListener, javax.servlet.Servlet
Direct Known Subclasses:
B2BOrderLookup, CancelOrder

public class OrderLookup
extends DynamoServlet

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
Optional input parameter to indicate how to further narrow the result set when we search for a user's orders. The state may be one of the named order states or one of the 2 'virtual states' used in this servlet: "open" and "closed".
siteScope
Optional input parameter to indicate how to further narrow the result set when we search for a user's orders. The siteScope parameter may be "current", "all", or a shareable type ID such as "atg.ShoppingCart". The siteScope parameter is ignored if the siteIds parameter is specified. If both siteIds and siteScope are omitted, the scope defaults to the value of the configured siteScope property, which defaults to "all".
siteIds
Optional input parameter to indicate how to further narrow the result set when we search for a user's orders. If specified, the siteIds parameter must be a Collection of Strings.
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.)
openStates
The comma-separated list of states that correspond to open state. The parameter is used with userId and state input parameter. (optional input parameter may be used to dynamically change the open states.)
closedStates
The comma-separated list of states that correspond to closed state. The parameter is used with userId and state input parameter. (optional input parameter may be used to dynamically change the closed states.)
sortBy
The parameter indicates the column that should be used for sorting. It is used with userId and state input parameter. By default sorting is done in descending order. (optional input parameter.)
sortAscending
The parameter takes a value of false or true. It is used along with the sortBy parameter. It specifies whether the results shown are sorted in ascending or descending order. By default sorting is done in descending order. (optional input parameter.)
queryTotalOnly
Optional boolean parameter indicating that only a count of orders is required. If true, the total_count and totalCount output parameters will be rendered; the result output parameter will not. This option can be used to improve performance.
queryTotal
Optional boolean parameter that will override the "queryTotal" property for just the current lookup. If true, the lookup will provide a count of orders in the "total_count" and "totalCount" output parameters. If false, it will not. This option can be used to improve performance in cases where a count is not required. 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.
empty
empty will be rendered if there are no orders
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.
count
This will contain the size of the array of order objects.
totalCount
This will contain the total number of order objects which satisfy the criteria
total_count
Identical to the totalCount property
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.
startRange
The 1-based index of the first order in the set of results.
endRange
The 1-based index of the last order in the set of results.
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 his own orders. This feature is enabled by default. To disable it, set the property enableSecurity=false


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 ParameterName COSTCENTERID
          The input parameter that indicates which cost center's orders to get
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.
 CostCenterManager getCostCenterManager()
          Returns the costCenterManager property which is a component that is useful for many order management functions.
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
 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 isSearchByCostCenterId()
          gets the property searchByCostCenterId.
 boolean isSearchByOrderId()
          gets the property searchByOrderId.
 boolean isSearchByUserId()
          gets the property searchByUserId.
 boolean isUseRequestLocale()
          Returns property UseRequestLocale
 void SearchByCostCenterId(DynamoHttpServletRequest pReq, DynamoHttpServletResponse pRes, java.lang.String costCenterId)
          This method uses the CostCenterManager to find the orders for the cost center corresponding to the request parameter "costCenterId".
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 setCostCenterManager(CostCenterManager pCostCenterManager)
          Sets the property costCenterManager which points to the DCS cost center manager nucleus component.
 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 setSearchByCostCenterId(boolean pSearchByCostCenterId)
          sets the property searchByCostCenterId.
 void setSearchByOrderId(boolean pSearchByOrderId)
          sets the property searchByOrderId.
 void setSearchByUserId(boolean pSearchByUserId)
          sets the property searchByUserId.
 void setSiteGroupManager(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.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
Class version string

See Also:
Constant Field Values

ORDERID

public static final ParameterName ORDERID
The input parameter that indicates which order to get


USERID

public static final ParameterName USERID
The input parameter that indicates whose list of orders to get


COSTCENTERID

public static final ParameterName COSTCENTERID
The input parameter that indicates which cost center's orders to get


OPENSTATES

public static final ParameterName OPENSTATES
The optional input parameter that indicates which are the states that correspond to open states. The states are specified as a comma-separated string array.


SORTBY

public static final ParameterName SORTBY
The input parameter that indicates the column that should be used to sorting.


SORTASCENDING

public static final ParameterName SORTASCENDING
The input parameter that indicates the sorting order - it is true for ascending.


QUERYTOTALONLY

public static final 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


QUERYTOTAL

public static final ParameterName QUERYTOTAL
The input parameter that indicates whether a count of orders should be returned in the totalCount and total_count output parameters.


CLOSEDSTATES

public static final ParameterName CLOSEDSTATES
The input parameter that indicates which are the states that correspond to closed states.


STARTINDEX

public static final ParameterName STARTINDEX
The input parameter that indicates the index of the first order to return.


NUMORDERS

public static final ParameterName NUMORDERS
The input parameter that indicates the number (count) of orders that need to be returned.


STATE

public static final ParameterName STATE
The input parameter to indicate how to further narrow the result set when we search for a user's orders. The state may be one of the named order states or one of the 2 'virtual states' used in this servlet: "open" and "closed".


SITEIDS

public static final ParameterName SITEIDS
The input parameter that indicates which sites' orders to get


SITESCOPE

public static final ParameterName SITESCOPE
The input parameter that indicates which shareable type's sites' orders to get


ERRORMESSAGE

public static final java.lang.String ERRORMESSAGE
The output parameter that includes the error message.

See Also:
Constant Field Values

RESULT

public static final 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.

See Also:
Constant Field Values

COUNT

public static final java.lang.String COUNT
The number of orders in the result object

See Also:
Constant Field Values

TOTAL_COUNT

public static final java.lang.String TOTAL_COUNT
The total number of orders that match the criteria, this is unset if queryTotal is set to false

See Also:
Constant Field Values

TOTALCOUNT

public static final java.lang.String TOTALCOUNT
The total number of orders that match the criteria, this is unset if queryTotal is set to false

See Also:
Constant Field Values

NEXTINDEX

public static final java.lang.String NEXTINDEX
The output parameter that indicates the first index of the next batch

See Also:
Constant Field Values

PREVIOUSINDEX

public static final java.lang.String PREVIOUSINDEX
The output parameter that indicates the first index of the previous batch

See Also:
Constant Field Values

STARTRANGE

public static final java.lang.String STARTRANGE
The output parameter that indicates the start value of the current batch

See Also:
Constant Field Values

ENDRANGE

public static final java.lang.String ENDRANGE
The output parameter that indicates the end value of the current batch

See Also:
Constant Field Values

ERROR

public static final java.lang.String ERROR
The open parameter that indicates that there was an error

See Also:
Constant Field Values

OUTPUT

public static final java.lang.String OUTPUT
The open parameter that indicates that there is a result

See Also:
Constant Field Values

EMPTY

public static final java.lang.String EMPTY
The open parameter that indicates that there were no results

See Also:
Constant Field Values

CLOSED

public static final java.lang.String CLOSED
See Also:
Constant Field Values

OPEN

public static final java.lang.String OPEN
See Also:
Constant Field Values

ALL

public static final java.lang.String ALL
See Also:
Constant Field Values

CURRENT

public static final java.lang.String CURRENT
See Also:
Constant Field Values

MSG_GENERAL_ERROR

protected static final java.lang.String MSG_GENERAL_ERROR
See Also:
Constant Field Values

MSG_NO_SUCH_ORDER

protected static final java.lang.String MSG_NO_SUCH_ORDER
See Also:
Constant Field Values

MSG_NO_PARAM_SPECIFIED

protected static final java.lang.String MSG_NO_PARAM_SPECIFIED
See Also:
Constant Field Values

MSG_NO_PERMISSION_FOR_ORDER

protected static final java.lang.String MSG_NO_PERMISSION_FOR_ORDER
See Also:
Constant Field Values

MSG_NO_PERMISSION_FOR_USERS_ORDERS

protected static final java.lang.String MSG_NO_PERMISSION_FOR_USERS_ORDERS
See Also:
Constant Field Values

DEFAULT_NUM_ORDERS

protected static int DEFAULT_NUM_ORDERS

mProfilePath

protected ComponentName mProfilePath
Constructor Detail

OrderLookup

public OrderLookup()
Method Detail

setEnableSecurity

public void setEnableSecurity(boolean pEnableSecurity)
sets the property enableSecurity. If this is true, then users will only be able to view their own orders. If false then anyone can see any order.


isEnableSecurity

public boolean isEnableSecurity()
gets the property enableSecurity. If this is true, then users will only be able to view their own orders. If false then anyone can see any order.


setDefaultNumOrders

public void setDefaultNumOrders(int pDefaultNumOrders)

getDefaultNumOrders

public int getDefaultNumOrders()
The default number of orders returned with each call. The default is 10. Use -1 for all orders to be returned.


setOrderManager

public void setOrderManager(OrderManager pOrderManager)
Sets the property orderManager which points to the DCS order manager nucleus component.

Parameters:
pOrderManager - the OrderManager component. Usually /atg/commerce/order/OrderManager

getOrderManager

public OrderManager getOrderManager()
Returns the orderManager property which is a component that is useful for many order management functions.


setOrderLookupService

public void setOrderLookupService(atg.commerce.order.OrderLookupService pOrderLookupService)
The service that is actually used to find the desired orders

Parameters:
pOrderLookupService - the OrderLookupService component. Usually /atg/commerce/order/OrderLookupService

getOrderLookupService

public atg.commerce.order.OrderLookupService getOrderLookupService()
The service that is actually used to find the desired orders


setSiteGroupManager

public void setSiteGroupManager(SiteGroupManager pSiteGroupManager)
Sets the SiteGroupManager component

Parameters:
pSiteGroupManager - the SiteGroupManager component. Usually /atg/multisite/SiteGroupManager

getSiteGroupManager

public SiteGroupManager getSiteGroupManager()
Returns the SiteGroupManager component

Returns:
returns property siteGroupManager

setProfilePath

public void setProfilePath(java.lang.String pProfilePath)
Sets property ProfilePath

Parameters:
pProfilePath - path to the profile nucleus component. Usually atg/userprofiling/Profile

getProfilePath

public java.lang.String getProfilePath()
Returns property ProfilePath


setOpenStates

public void setOpenStates(java.lang.String[] pOpenStates)
sets the property openStates. This property is the list of one or more state that are considered to be "open"


getOpenStates

public java.lang.String[] getOpenStates()
gets the property openStates. This property is the list of one or more state that are considered to be "open"


setClosedStates

public void setClosedStates(java.lang.String[] pClosedStates)
sets the property closedStates. This property is the list of one or more state that are considered to be "closed"


getClosedStates

public java.lang.String[] getClosedStates()
gets the property closedStates. This property is the list of one or more state that are considered to be "closed"


setSearchByOrderId

public void setSearchByOrderId(boolean pSearchByOrderId)
sets the property searchByOrderId. This property determines whether the service should look for and attempt a search by Order Id


isSearchByOrderId

public boolean isSearchByOrderId()
gets the property searchByOrderId.


setSearchByUserId

public void setSearchByUserId(boolean pSearchByUserId)
sets the property searchByUserId. This property determines whether the service should look for and attempt a search by User Id


isSearchByUserId

public boolean isSearchByUserId()
gets the property searchByUserId.


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.


setSiteScope

public void setSiteScope(java.lang.String pSiteScope)
sets the property siteScope. This property specifies the default for the siteScope input parameter.


getSiteScope

public java.lang.String getSiteScope()
gets the property siteScope


service

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

Overrides:
service in class DynamoServlet
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.

SearchByOrderId

protected void SearchByOrderId(DynamoHttpServletRequest pReq,
                               DynamoHttpServletResponse pRes,
                               java.lang.String orderId)
                        throws javax.servlet.ServletException,
                               java.io.IOException
Deprecated. Use searchByOrderId(DynamoHttpServletRequest,DynamoHttpServletResponse,String) instead

This method loads the order with the given id using the OrderManager.

Parameters:
pReq - The http request object
pRes - The http response object
orderId - The order id being retrieved
Throws:
javax.servlet.ServletException
java.io.IOException

searchByOrderId

protected void searchByOrderId(DynamoHttpServletRequest pReq,
                               DynamoHttpServletResponse pRes,
                               java.lang.String orderId)
                        throws javax.servlet.ServletException,
                               java.io.IOException
This method loads the order with the given id using the OrderManager.

Parameters:
pReq - The http request object
pRes - The http response object
orderId - The order id being retrieved
Throws:
javax.servlet.ServletException
java.io.IOException

SearchByUserId

protected void SearchByUserId(DynamoHttpServletRequest pReq,
                              DynamoHttpServletResponse pRes,
                              java.lang.String userId)
                       throws javax.servlet.ServletException,
                              java.io.IOException
Deprecated. Use searchByUserId(DynamoHttpServletRequest,DynamoHttpServletResponse,String) instead

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). If the "state" parameter is "open" or "closed" then states used to narrow the search are either passed in through the "openStates" or "closedStats" parameters or (if those are not set) configured as properties on this class. If "state" parameter is a different value, it is assume to be a specific state value.

Parameters:
pReq - The http request object
pRes - The http response object
userId - The user whose orders are being retrieved
Throws:
javax.servlet.ServletException
java.io.IOException
See Also:
getOpenStates(), getClosedStates()

searchByUserId

protected void searchByUserId(DynamoHttpServletRequest pReq,
                              DynamoHttpServletResponse pRes,
                              java.lang.String userId)
                       throws javax.servlet.ServletException,
                              java.io.IOException
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). If the "state" parameter is "open" or "closed" then states used to narrow the search are either passed in through the "openStates" or "closedStats" parameters or (if those are not set) configured as properties on this class. If the "state" parameter is a different value, it is assumed to be a specific state value.

Parameters:
pReq - The http request object
pRes - The http response object
userId - The user whose orders are being retrieved
Throws:
javax.servlet.ServletException
java.io.IOException
See Also:
getOpenStates(), getClosedStates()

SearchByCostCenterId

public void SearchByCostCenterId(DynamoHttpServletRequest pReq,
                                 DynamoHttpServletResponse pRes,
                                 java.lang.String costCenterId)
                          throws javax.servlet.ServletException,
                                 java.io.IOException
This method uses the CostCenterManager to find the orders for the cost center corresponding to the request parameter "costCenterId". The request parameter "state" is ignored.

Parameters:
pReq - The http request object
pRes - The http response object
costCenterId - The cost center whose orders are being retrieved
Throws:
javax.servlet.ServletException
java.io.IOException
See Also:
getOpenStates(), getClosedStates()

getCurrentProfileId

protected java.lang.String getCurrentProfileId(DynamoHttpServletRequest pReq)
get the profile id of the current user


setDefaultLocale

public void setDefaultLocale(java.util.Locale pDefaultLocale)
Sets property DefaultLocale


getDefaultLocale

public java.util.Locale getDefaultLocale()
Returns property DefaultLocale. If the property value is null, then JVM's default locale is returned.


setUseRequestLocale

public void setUseRequestLocale(boolean pUseRequestLocale)
Sets property UseRequestLocale


isUseRequestLocale

public boolean isUseRequestLocale()
Returns property UseRequestLocale


setQueryTotal

public void setQueryTotal(boolean pQueryTotal)
True if the total order count should be retrieved when any order lookup is done. The default setting is true, if the original 5.0 functionality is desired set to false.


isQueryTotal

public boolean isQueryTotal()

getUserLocale

public java.util.Locale getUserLocale(DynamoHttpServletRequest pRequest,
                                      DynamoHttpServletResponse pResponse)
                               throws javax.servlet.ServletException,
                                      java.io.IOException
Returns the locale associated with the request. The method first searches for a request paramater named 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.

Throws:
javax.servlet.ServletException
java.io.IOException