|
|||||||||
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.b2bcommerce.approval.ApprovedDroplet
public class ApprovedDroplet
This droplet is used to load all the orders which have been approved and whose approver ids list contains the profile id contained in the approverid parameter.
Example:
Usage:
No Orders
Field Summary | |
---|---|
static ParameterName |
APPROVERID
|
static java.lang.String |
CLASS_VERSION
|
protected static int |
DEFAULT_NUM_ORDERS
|
protected ComponentName |
mProfilePath
|
protected static java.lang.String |
MSG_GENERAL_ERROR
|
protected static java.lang.String |
MSG_NO_PERMISSION_FOR_ORDERS
|
static ParameterName |
NUMORDERS
|
static java.lang.String |
RESOURCE_BUNDLE
Resource bundle that holds messages to dispay to the end user |
static ParameterName |
STARTINDEX
|
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 | |
---|---|
ApprovedDroplet()
|
Method Summary | |
---|---|
protected int |
getApprovedOrderCount(java.lang.String pApproverId)
This method creates and executes the query that returns the count of all the orders for approval by the approver whose id is in pApproverId. |
protected RepositoryItem[] |
getApprovedOrders(java.lang.String pApproverId,
int pStartIndex,
int pNumOrders,
DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
This method creates and executes the query that returns the orders for approval by the approver whose id is in pApproverId. |
java.lang.String |
getApproverIdsPropertyName()
Returns the approverIdsPropertyName |
protected java.lang.String |
getCurrentProfileId(DynamoHttpServletRequest pRequest)
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 |
getOrderByProperty()
Returns property orderByProperty |
Repository |
getOrderRepository()
Returns property orderRepository |
java.lang.String |
getOrderRepositoryItemName()
Returns property OrderRepositoryItemName |
java.lang.String |
getProfilePath()
Returns property ProfilePath |
boolean |
getSortAscending()
Returns property sortAscending |
java.util.Locale |
getUserLocale(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Returns the locale associated with the request. |
boolean |
isEnableSecurity()
Returns property enableSecurity |
boolean |
isQueryTotal()
True if the total order count should be retrieved when any order lookup is done. |
boolean |
isUseRequestLocale()
Returns property UseRequestLocale |
void |
service(DynamoHttpServletRequest pRequest,
DynamoHttpServletResponse pResponse)
Looks up all the orders that are have been approved by the approver with the passed in parameter: approverId. |
void |
setApproverIdsPropertyName(java.lang.String pApproverIdsPropertyName)
Sets the approverIdsPropertyName |
void |
setDefaultLocale(java.util.Locale pDefaultLocale)
Sets property DefaultLocale |
void |
setDefaultNumOrders(int pDefaultNumOrders)
|
void |
setEnableSecurity(boolean pEnableSecurity)
Sets property enableSecurity |
void |
setOrderByProperty(java.lang.String pOrderByProperty)
Sets property orderByProperty |
void |
setOrderRepository(Repository pOrderRepository)
Sets property orderRepository |
void |
setOrderRepositoryItemName(java.lang.String pOrderRepositoryItemName)
Sets property OrderRepositoryItemName |
void |
setProfilePath(java.lang.String pProfilePath)
Sets property ProfilePath |
void |
setQueryTotal(boolean pQueryTotal)
Sets the queryTotal |
void |
setSortAscending(boolean pSortAscending)
Sets property sortAscending |
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 java.lang.String CLASS_VERSION
public static java.lang.String RESOURCE_BUNDLE
public static final ParameterName APPROVERID
public static final ParameterName STARTINDEX
public static final ParameterName NUMORDERS
protected static final java.lang.String MSG_GENERAL_ERROR
protected static final java.lang.String MSG_NO_PERMISSION_FOR_ORDERS
protected static int DEFAULT_NUM_ORDERS
protected ComponentName mProfilePath
Constructor Detail |
---|
public ApprovedDroplet()
Method Detail |
---|
public void setDefaultNumOrders(int pDefaultNumOrders)
public int getDefaultNumOrders()
public Repository getOrderRepository()
public void setOrderRepository(Repository pOrderRepository)
pOrderRepository
- the value to set for property orderRepositorypublic java.lang.String getOrderRepositoryItemName()
public void setOrderRepositoryItemName(java.lang.String pOrderRepositoryItemName)
pOrderRepositoryItemName
- the value to set for property OrderRepositoryItemNamepublic java.lang.String getApproverIdsPropertyName()
public void setApproverIdsPropertyName(java.lang.String pApproverIdsPropertyName)
public void setProfilePath(java.lang.String pProfilePath)
pProfilePath
- path to the profile nucleus component. Usually atg/userprofiling/Profilepublic java.lang.String getProfilePath()
public boolean isEnableSecurity()
public void setEnableSecurity(boolean pEnableSecurity)
pEnableSecurity
- the value to set for property enableSecuritypublic java.lang.String getOrderByProperty()
public void setOrderByProperty(java.lang.String pOrderByProperty)
pOrderByProperty
- the value to set for property orderByPropertypublic boolean getSortAscending()
public void setSortAscending(boolean pSortAscending)
pSortAscending
- the value to set for property sortAscendingpublic boolean isQueryTotal()
public void setQueryTotal(boolean pQueryTotal)
public void service(DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
Looks up all the orders that are have been approved by the approver with the passed in parameter: approverId. The getApprovedOrders method is used to return the list of orders which have been approved by the user whose id is approverId.
service
in class DynamoServlet
DynamoHttpServletRequest
- DynamoHttpServletResponse
-
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 RepositoryItem[] getApprovedOrders(java.lang.String pApproverId, int pStartIndex, int pNumOrders, DynamoHttpServletRequest pRequest, DynamoHttpServletResponse pResponse) throws RepositoryException, javax.servlet.ServletException, java.io.IOException
pApproverId
- the approver idpStartIndex
- the startIndex of orders to retrievepNumOrders
- the number of orders to retrieve
RepositoryException
- if a repository error occurs
javax.servlet.ServletException
java.io.IOException
protected int getApprovedOrderCount(java.lang.String pApproverId) throws RepositoryException, javax.servlet.ServletException, java.io.IOException
pApproverId
- the approver id
RepositoryException
- if a repository error occurs
javax.servlet.ServletException
java.io.IOException
protected java.lang.String getCurrentProfileId(DynamoHttpServletRequest pRequest)
public void setDefaultLocale(java.util.Locale pDefaultLocale)
public java.util.Locale getDefaultLocale()
public void setUseRequestLocale(boolean pUseRequestLocale)
public boolean isUseRequestLocale()
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 |