|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectatg.nucleus.logging.VariableArgumentApplicationLoggingImpl
atg.nucleus.GenericService
atg.droplet.EmptyFormHandler
atg.droplet.GenericFormHandler
atg.commerce.order.purchase.PurchaseProcessFormHandler
atg.commerce.csr.order.ManualAdjustmentsFormHandler
public class ManualAdjustmentsFormHandler
A form handler for adding and removing manual order adjustments via the OrderTools.createOrderFixedAmountAdjustment() and OrderTools.removeOrderFixedAmountAdjustment() API
OrderTools
Nested Class Summary | |
---|---|
protected static class |
ManualAdjustmentsFormHandler.Operation
|
Field Summary | |
---|---|
static java.lang.String |
ADJUSTMENT
|
static java.lang.String |
ADJUSTMENT_AMOUNT
|
static java.lang.String |
ADJUSTMENT_ID
|
static java.lang.String |
ADJUSTMENT_TYPE
|
static java.lang.String |
CLASS_VERSION
|
static java.lang.String |
MSG_ERROR_ADDING_MANUAL_ADJUSTMENT
|
static java.lang.String |
MSG_ERROR_ADJUSTMENT_AMT_TOO_LARGE
|
static java.lang.String |
MSG_ERROR_ADJUSTMENT_AMT_TOO_SMALL
|
static java.lang.String |
MSG_ERROR_DELETING_MANUAL_ADJUSTMENT
|
static java.lang.String |
MSG_ERROR_NO_ADJUSTMENT_TYPE_SPECIFIED
|
static java.lang.String |
MSG_ERROR_REPRICING_ORDER
|
protected static java.lang.String |
RESOURCE_NAME
|
protected static java.util.ResourceBundle |
sResources
|
Fields inherited from class atg.commerce.order.purchase.PurchaseProcessFormHandler |
---|
LOCK_NAME_ATTRIBUTE_NAME, PARAM_TRANSACTION_CREATED, PARAM_VALUE_TRUE |
Fields inherited from class atg.droplet.GenericFormHandler |
---|
PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS |
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 | |
---|---|
ManualAdjustmentsFormHandler()
|
Method Summary | |
---|---|
protected atg.repository.RepositoryItem |
addAdjustment(atg.commerce.csr.order.ManualAdjustmentsFormHandler.Handler pHandler)
Add a new manual order adjustment. |
protected boolean |
deleteAdjustment(atg.commerce.csr.order.ManualAdjustmentsFormHandler.Handler pHandler)
Delete a manual adjustment identified by the adjustmentId property. |
java.lang.String |
getAddAdjustmentErrorURL()
|
java.lang.String |
getAddAdjustmentSuccessURL()
|
double |
getAdjustmentAmount()
|
java.lang.String |
getAdjustmentId()
Get the adjustment ID to be deleted. |
java.lang.String |
getAdjustmentNote()
|
java.lang.String |
getAdjustmentReasonCode()
The adjustment reason code is used when creating manual adjustments, and is also sent as the reason code value in the CSRAgentMessagingTools.sendRemoveOrderFixedAmountManualAdjustmentEvent() JMS message. |
java.lang.String |
getAdjustmentType()
Type in [ "amountOff" | "amountIncrease" ], from atg.commerce.pricing.Constants.java. |
CSRAgentTools |
getCSRAgentTools()
|
java.lang.String |
getDeleteAdjustmentErrorURL()
|
java.lang.String |
getDeleteAdjustmentSuccessURL()
|
double |
getMaximumAdjustmentAmount()
The maximum amount for an adjustment |
double |
getMinimumAdjustmentAmount()
The minimum amount for an adjustment |
java.lang.String |
getNewAdjustmentAsString()
|
protected atg.repository.RepositoryItem |
getOrderAdjustmentById(atg.commerce.order.Order pOrder,
java.lang.String pId)
Get a manual adjustment by ID |
java.lang.String |
getPricingOp()
Set the pricing operation to use for the order reprice that is executed after adding or deleting a manual adjustment. |
boolean |
handleAddAdjustment(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Add manual order adjustment |
boolean |
handleDeleteAdjustment(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse)
Delete manual order adjustment |
protected boolean |
handleRequest(atg.servlet.DynamoHttpServletRequest pRequest,
atg.servlet.DynamoHttpServletResponse pResponse,
atg.commerce.csr.order.ManualAdjustmentsFormHandler.Handler pHandler)
Boilerplate request handler, all specialization occurs in the Handler implementation. |
protected void |
postAddAdjustment(atg.commerce.csr.order.ManualAdjustmentsFormHandler.Handler pHandler)
Post process opportunity for the add adjustment action. |
protected void |
postDeleteAdjustment(atg.commerce.csr.order.ManualAdjustmentsFormHandler.Handler pHandler)
Post process opportunity for the delete adjustment action. |
protected void |
postProcessAddAdjustment(atg.commerce.csr.order.ManualAdjustmentsFormHandler.Handler pHandler)
Do things that need to be done after a manual order adjustment has been added. |
protected void |
postProcessDeleteAdjustment(atg.commerce.csr.order.ManualAdjustmentsFormHandler.Handler pHandler)
Do things that need to be done after a manual order adjustment has been removed. |
protected void |
preAddAdjustment(atg.commerce.csr.order.ManualAdjustmentsFormHandler.Handler pHandler)
Pre process opportunity for the add adjustment action. |
protected void |
preDeleteAdjustment(atg.commerce.csr.order.ManualAdjustmentsFormHandler.Handler pHandler)
Pre process opportunity for the delete adjustment action. |
protected void |
sendEvents(ManualAdjustmentsFormHandler.Operation pOp,
atg.commerce.csr.order.ManualAdjustmentsFormHandler.Handler pHandler)
Send events related to the completed operation. |
void |
setAddAdjustmentErrorURL(java.lang.String pURL)
|
void |
setAddAdjustmentSuccessURL(java.lang.String pURL)
|
void |
setAdjustmentAmount(double pAdjustmentAmount)
|
void |
setAdjustmentId(java.lang.String pAdjustmentId)
Set the manual adjustment ID. |
void |
setAdjustmentNote(java.lang.String pAdjustmentNote)
|
void |
setAdjustmentReasonCode(java.lang.String pAdjustmentReasonCode)
The adjustment reason code is used when creating manual adjustments, and is also sent as the reason code value in the CSRAgentMessagingTools.sendRemoveOrderFixedAmountManualAdjustmentEvent() JMS message. |
void |
setAdjustmentType(java.lang.String pAdjustmentType)
Type in [ "amountOff" | "amountIncrease" ], from atg.commerce.pricing.Constants.java. |
void |
setCSRAgentTools(CSRAgentTools pCAT)
|
void |
setDeleteAdjustmentErrorURL(java.lang.String pURL)
|
void |
setDeleteAdjustmentSuccessURL(java.lang.String pURL)
|
void |
setMaximumAdjustmentAmount(double pMax)
The maximum amount for an adjustment |
void |
setMinimumAdjustmentAmount(double pMax)
The minimum amount for an adjustment |
void |
setPricingOp(java.lang.String pPricingOp)
Get the pricing operation to use for the order reprice that is executed after adding or deleting a manual adjustment. |
protected void |
updateOrderAfterAdjustment(ManualAdjustmentsFormHandler.Operation pOp,
atg.commerce.csr.order.ManualAdjustmentsFormHandler.Handler pHandler)
Method called to update order after all changes have been applied. |
protected void |
validateAddAdjustmentFields()
Validate fields for the addAdjustment() handler. |
protected void |
validateDeleteAdjustmentFields()
|
Methods inherited from class atg.commerce.order.purchase.PurchaseProcessFormHandler |
---|
acquireTransactionLock, acquireTransactionLock, afterSet, beforeSet, checkFormRedirect, commitTransaction, copyConfiguration, createRepriceParameterMap, defaultLocalLockManager, defaultUserProfile, doStartService, ensureTransaction, formatUserMessage, formatUserMessage, formatUserMessage, formatUserMessage, generatePropertyPath, getClaimableManager, getCommerceIdentifierPaymentInfoContainer, getCommerceItemManager, getCommerceItemShippingInfoContainer, getCommerceProfileTools, getCommercePropertyManager, getConfiguration, getCurrentTransaction, getDefaultLocale, getGiftlistManager, getHandlingInstructionManager, getLocalLockManager, getOrder, getOrderManager, getPaymentGroupManager, getPaymentGroupMapContainer, getPipelineManager, getPriceList, getPriceListId, getPriceListManager, getProfile, getProfileRepository, getPurchaseProcessHelper, getRepeatingRequestMonitor, getRepriceOrderChainId, getResourceBundle, getResourceBundleName, getSessionExpirationURL, getShippingGroupManager, getShippingGroupMapContainer, getShoppingCart, getTransactionManager, getUserLocale, getUserLocale, getUserPricingModels, handlePipelineError, isEnsureTransaction, isFormSubmission, isTransactionCreated, isTransactionMarkedAsRollBack, isUseLocksAroundTransactions, isUseRequestLocale, processException, processPipelineErrors, releaseTransactionLock, releaseTransactionLock, runProcess, runProcess, runProcess, runProcessRepriceOrder, runProcessRepriceOrder, runRepricingProcess, setClaimableManager, setCommerceIdentifierPaymentInfoContainer, setCommerceItemManager, setCommerceItemShippingInfoContainer, setCommerceProfileTools, setCommercePropertyManager, setConfiguration, setCurrentTransaction, setDefaultLocale, setEnsureTransaction, setGiftlistManager, setHandlingInstructionManager, setLocalLockManager, setOrder, setOrderManager, setPaymentGroupManager, setPaymentGroupMapContainer, setPipelineManager, setPriceListId, setPriceListManager, setProfile, setProfileRepository, setPurchaseProcessHelper, setRepeatingRequestMonitor, setRepriceOrderChainId, setSessionExpirationURL, setShippingGroupManager, setShippingGroupMapContainer, setShoppingCart, setTransactionCreated, setTransactionManager, setTransactionToRollbackOnly, setUseLocksAroundTransactions, setUseRequestLocale, setUserLocale, setUserPricingModels, transactionLockName, unsetTransactionCreated |
Methods inherited from class atg.droplet.GenericFormHandler |
---|
addFormException, addUncheckedFormException, createFormSubmissionMessage, getCancelURL, getCheckForValidSession, getFormError, getFormExceptions, getFormName, getMessagePort, getMessageSource, getMessageType, getPropertyExceptions, getSendMessages, getUncheckedFormExceptions, handleCancel, handleFormException, handleUncheckedFormException, hasUncheckedFormExceptions, isDeferForwardsAndRedirects, isRestorableForm, isUseForwards, isValidSession, redirectOrForward, resetFormExceptions, setCancelURL, setCheckForValidSession, setDeferForwardsAndRedirects, setFormName, setMessagePort, setMessageSource, setMessageType, setRestorableForm, setSendMessages, setUseForwards |
Methods inherited from class atg.droplet.EmptyFormHandler |
---|
afterGet, beforeGet |
Methods inherited from class atg.nucleus.GenericService |
---|
addLogListener, createAdminServlet, 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, 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 |
Field Detail |
---|
public static final java.lang.String CLASS_VERSION
protected static final java.lang.String RESOURCE_NAME
protected static java.util.ResourceBundle sResources
public static final java.lang.String ADJUSTMENT
public static final java.lang.String ADJUSTMENT_ID
public static final java.lang.String ADJUSTMENT_TYPE
public static final java.lang.String ADJUSTMENT_AMOUNT
public static final java.lang.String MSG_ERROR_ADJUSTMENT_AMT_TOO_SMALL
public static final java.lang.String MSG_ERROR_ADJUSTMENT_AMT_TOO_LARGE
public static final java.lang.String MSG_ERROR_NO_ADJUSTMENT_TYPE_SPECIFIED
public static final java.lang.String MSG_ERROR_REPRICING_ORDER
public static final java.lang.String MSG_ERROR_ADDING_MANUAL_ADJUSTMENT
public static final java.lang.String MSG_ERROR_DELETING_MANUAL_ADJUSTMENT
Constructor Detail |
---|
public ManualAdjustmentsFormHandler()
Method Detail |
---|
public void setMaximumAdjustmentAmount(double pMax)
public double getMaximumAdjustmentAmount()
public void setMinimumAdjustmentAmount(double pMax)
public double getMinimumAdjustmentAmount()
public java.lang.String getPricingOp()
PricingConstants
public void setPricingOp(java.lang.String pPricingOp)
public double getAdjustmentAmount()
public void setAdjustmentAmount(double pAdjustmentAmount)
public java.lang.String getAdjustmentType()
public void setAdjustmentType(java.lang.String pAdjustmentType)
public java.lang.String getAdjustmentNote()
public void setAdjustmentNote(java.lang.String pAdjustmentNote)
public java.lang.String getAdjustmentReasonCode()
public void setAdjustmentReasonCode(java.lang.String pAdjustmentReasonCode)
pAdjustmentReasonCode
- the reason code or nullpublic void setAdjustmentId(java.lang.String pAdjustmentId)
pAdjustmentId
- the IDpublic java.lang.String getAdjustmentId()
public java.lang.String getAddAdjustmentSuccessURL()
public void setAddAdjustmentSuccessURL(java.lang.String pURL)
public java.lang.String getAddAdjustmentErrorURL()
public void setAddAdjustmentErrorURL(java.lang.String pURL)
public java.lang.String getDeleteAdjustmentSuccessURL()
public void setDeleteAdjustmentSuccessURL(java.lang.String pURL)
public java.lang.String getDeleteAdjustmentErrorURL()
public void setDeleteAdjustmentErrorURL(java.lang.String pURL)
public void setCSRAgentTools(CSRAgentTools pCAT)
public CSRAgentTools getCSRAgentTools()
protected void validateAddAdjustmentFields()
protected void validateDeleteAdjustmentFields()
protected atg.repository.RepositoryItem getOrderAdjustmentById(atg.commerce.order.Order pOrder, java.lang.String pId)
pOrder
- the order from which to get the adjustmentspId
- the ID of the adjustment to get
protected boolean handleRequest(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse, atg.commerce.csr.order.ManualAdjustmentsFormHandler.Handler pHandler) throws javax.servlet.ServletException, java.io.IOException
pRequest
- pResponse
- pHandler
-
javax.servlet.ServletException
java.io.IOException
protected void preAddAdjustment(atg.commerce.csr.order.ManualAdjustmentsFormHandler.Handler pHandler) throws javax.servlet.ServletException, java.io.IOException
pHandler
- the handler object
javax.servlet.ServletException
java.io.IOException
protected void postAddAdjustment(atg.commerce.csr.order.ManualAdjustmentsFormHandler.Handler pHandler) throws javax.servlet.ServletException, java.io.IOException
pHandler
- the handler object
javax.servlet.ServletException
java.io.IOException
protected atg.repository.RepositoryItem addAdjustment(atg.commerce.csr.order.ManualAdjustmentsFormHandler.Handler pHandler) throws javax.servlet.ServletException, java.io.IOException
pHandler
- the handler object
javax.servlet.ServletException
java.io.IOException
protected void postProcessAddAdjustment(atg.commerce.csr.order.ManualAdjustmentsFormHandler.Handler pHandler) throws javax.servlet.ServletException, java.io.IOException
pHandler
- the handler
javax.servlet.ServletException
java.io.IOException
protected void preDeleteAdjustment(atg.commerce.csr.order.ManualAdjustmentsFormHandler.Handler pHandler) throws javax.servlet.ServletException, java.io.IOException
pHandler
- the handler instance
javax.servlet.ServletException
java.io.IOException
protected void postDeleteAdjustment(atg.commerce.csr.order.ManualAdjustmentsFormHandler.Handler pHandler) throws javax.servlet.ServletException, java.io.IOException
pHandler
- the handler instance
javax.servlet.ServletException
java.io.IOException
protected boolean deleteAdjustment(atg.commerce.csr.order.ManualAdjustmentsFormHandler.Handler pHandler) throws javax.servlet.ServletException, java.io.IOException
pHandler
- the handler instance
javax.servlet.ServletException
java.io.IOException
protected void postProcessDeleteAdjustment(atg.commerce.csr.order.ManualAdjustmentsFormHandler.Handler pHandler) throws javax.servlet.ServletException, java.io.IOException
pHandler
- the handler
javax.servlet.ServletException
java.io.IOException
protected void sendEvents(ManualAdjustmentsFormHandler.Operation pOp, atg.commerce.csr.order.ManualAdjustmentsFormHandler.Handler pHandler)
pHandler
- the handler in usepOp
- the type of operation just performedprotected void updateOrderAfterAdjustment(ManualAdjustmentsFormHandler.Operation pOp, atg.commerce.csr.order.ManualAdjustmentsFormHandler.Handler pHandler) throws javax.servlet.ServletException, java.io.IOException
pOp
- type of operation (ADD, DELETE) that has occurredpHandler
- the request handler
javax.servlet.ServletException
java.io.IOException
public java.lang.String getNewAdjustmentAsString()
public boolean handleAddAdjustment(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
pRequest
- the Dynamo requestpResponse
- the Dynamo response
javax.servlet.ServletException
java.io.IOException
public boolean handleDeleteAdjustment(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse) throws javax.servlet.ServletException, java.io.IOException
javax.servlet.ServletException
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |