|
|||||||||
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.ApprovalRequiredDroplet
public class ApprovalRequiredDroplet
This droplet is used to load all the orders which require approval and whose authorized approver ids list contains the profile id contained in the approverid parameter.
Example:
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 | |
---|---|
ApprovalRequiredDroplet()
|
Method Summary | |
---|---|
java.lang.String |
getAuthorizedApproverIdsPropertyName()
Returns property authorizedApproverIdsPropertyName |
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 |
protected int |
getOrderCountToBeApproved(java.lang.String pApproverId)
This method creates and executes the query that returns the total count of orders for approval by the approver whose id is in pApproverId. |
Repository |
getOrderRepository()
Returns property orderRepository |
java.lang.String |
getOrderRepositoryItemName()
Returns property OrderRepositoryItemName |
java.lang.String |
getOrderStatePropertyName()
Returns property orderStatePropertyName |
java.lang.String[] |
getOrderStatesRequiringApproval()
Returns property orderStatesRequiringApproval |
protected RepositoryItem[] |
getOrdersToBeApproved(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 |
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 pending approval for the approver with the passed in parameter: approverId. |
void |
setAuthorizedApproverIdsPropertyName(java.lang.String pAuthorizedApproverIdsPropertyName)
Sets property authorizedApproverIdsPropertyName |
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 |
setOrderStatePropertyName(java.lang.String pOrderStatePropertyName)
Sets property orderStatePropertyName |
void |
setOrderStatesRequiringApproval(java.lang.String[] pOrderStatesRequiringApproval)
Sets property orderStatesRequiringApproval |
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 ApprovalRequiredDroplet()
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[] getOrderStatesRequiringApproval()
public void setOrderStatesRequiringApproval(java.lang.String[] pOrderStatesRequiringApproval)
pOrderStatesRequiringApproval
- the value to set for property orderStatesRequiringApprovalpublic java.lang.String getOrderRepositoryItemName()
public void setOrderRepositoryItemName(java.lang.String pOrderRepositoryItemName)
pOrderRepositoryItemName
- the value to set for property OrderRepositoryItemNamepublic java.lang.String getOrderStatePropertyName()
public void setOrderStatePropertyName(java.lang.String pOrderStatePropertyName)
pOrderStatePropertyName
- the value to set for property orderStatePropertyNamepublic java.lang.String getAuthorizedApproverIdsPropertyName()
public void setAuthorizedApproverIdsPropertyName(java.lang.String pAuthorizedApproverIdsPropertyName)
pAuthorizedApproverIdsPropertyName
- the value to set for property authorizedApproverIdsPropertyNamepublic 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 pending approval for the approver with the passed in parameter: approverId. The getOrdersToBeApproved method is used to return the list of orderswhose state is one of orderStatesRequiringApproval.
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[] getOrdersToBeApproved(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 getOrderCountToBeApproved(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 |