public class ManualAdjustmentsFormHandler
extends atg.commerce.order.purchase.PurchaseProcessFormHandler
OrderTools
Modifier and Type | Class and Description |
---|---|
protected class |
ManualAdjustmentsFormHandler.Handler
Instances of this abstract class are passed to the protected
handleRequest() method.
|
protected static class |
ManualAdjustmentsFormHandler.Operation |
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
ADJUSTMENT |
static java.lang.String |
ADJUSTMENT_AMOUNT |
static java.lang.String |
ADJUSTMENT_AMOUNT_INVALID_FORMAT |
static java.lang.String |
ADJUSTMENT_ID |
static java.lang.String |
ADJUSTMENT_TYPE |
static java.lang.String |
CLASS_VERSION |
protected java.lang.String |
mAdjustmentAmountAsString |
static java.lang.String |
MANUAL_PRICING_ADJUSTMENT |
protected atg.repository.servlet.PossibleValues |
mPossibleValues
Component that provides the possible values for a repository
property value.
|
static java.lang.String |
MSG_ERROR_ADDING_MANUAL_ADJUSTMENT |
static java.lang.String |
MSG_ERROR_ADJUSTMENT_AMT_INVALID_FORMAT |
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_ID_SPECIFIED |
static java.lang.String |
MSG_ERROR_NO_ADJUSTMENT_TYPE_SPECIFIED |
static java.lang.String |
MSG_ERROR_REPRICING_ORDER |
static java.lang.String |
REASON_CODE |
protected static java.lang.String |
RESOURCE_NAME |
protected static java.util.ResourceBundle |
sResources |
LOCK_NAME_ATTRIBUTE_NAME, PARAM_TRANSACTION_CREATED, PARAM_VALUE_TRUE
PARAM_DEFER_FORWARD_OR_REDIRECT, PARAM_USE_FORWARDS
Constructor and Description |
---|
ManualAdjustmentsFormHandler() |
Modifier and Type | Method and Description |
---|---|
protected atg.repository.RepositoryItem |
addAdjustment(ManualAdjustmentsFormHandler.Handler pHandler)
Add a new manual order adjustment.
|
protected java.util.Map |
createRepriceParameterMap()
Creates the extra parameter map for pricing the order after
form handler modifications.
|
protected boolean |
deleteAdjustment(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 |
getAdjustmentAmountAsString()
Returns the adjustmentAmountAsString.
|
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() |
java.util.List |
getManualAdjustmentReasonCodes()
Get the list of possible values for the 'manualAdjustments'
property in the 'manualPricingAdjustment' item descriptor
|
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.util.List |
getPossibleReasonCodes(atg.repository.Repository pRepository,
java.lang.String pItemDescriptorName,
java.lang.String pPropertyName,
boolean pUseCodeForValue,
atg.repository.SortDirectives pSortDirectives)
Retrieves the list of possible adjustment reason codes used while
creating manual adjustments.
|
atg.repository.servlet.PossibleValues |
getPossibleValues()
Get the activity reason manager, which helps maps strings and IDs
representing reason code to the corresponding repository item.
|
java.lang.String |
getPricingOp()
Get the pricing operation to use for the order reprice that is
executed after adding or deleting a manual adjustment.
|
atg.commerce.pricing.PricingModelHolder |
getUserPricingModels()
Returns the
PricingModelHolder that should be
used for the current order. |
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,
ManualAdjustmentsFormHandler.Handler pHandler)
Boilerplate request handler, all specialization occurs in the
Handler implementation.
|
protected void |
postAddAdjustment(ManualAdjustmentsFormHandler.Handler pHandler)
Post process opportunity for the add adjustment action.
|
protected void |
postDeleteAdjustment(ManualAdjustmentsFormHandler.Handler pHandler)
Post process opportunity for the delete adjustment action.
|
protected void |
postProcessAddAdjustment(ManualAdjustmentsFormHandler.Handler pHandler)
Do things that need to be done after a manual order adjustment
has been added.
|
protected void |
postProcessDeleteAdjustment(ManualAdjustmentsFormHandler.Handler pHandler)
Do things that need to be done after a manual order adjustment
has been removed.
|
protected void |
preAddAdjustment(ManualAdjustmentsFormHandler.Handler pHandler)
Pre process opportunity for the add adjustment action.
|
protected void |
preDeleteAdjustment(ManualAdjustmentsFormHandler.Handler pHandler)
Pre process opportunity for the delete adjustment action.
|
protected void |
sendEvents(ManualAdjustmentsFormHandler.Operation pOp,
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 |
setAdjustmentAmountAsString(java.lang.String pAdjustmentAmountAsString)
Sets the adjustmentAmountAsString
|
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 |
setPossibleValues(atg.repository.servlet.PossibleValues pPossibleValues)
Set the activity reason manager, which helps maps strings and IDs
representing reason codes to the corresponding repository item.
|
void |
setPricingOp(java.lang.String pPricingOp)
Set 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,
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() |
acquireTransactionLock, acquireTransactionLock, afterSet, beforeSet, checkFormRedirect, commitTransaction, copyConfiguration, 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, getResourceBundle, getResourceBundleName, getSessionExpirationURL, getShippingGroupManager, getShippingGroupMapContainer, getShoppingCart, getTransactionManager, getUserLocale, getUserLocale, handlePipelineError, isConcurrentUpdate, 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
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
addLogListener, createAdminServlet, 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
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, vlogError, vlogError, vlogError, vlogError, vlogInfo, vlogInfo, vlogInfo, vlogInfo, vlogTrace, vlogTrace, vlogTrace, vlogTrace, vlogWarning, vlogWarning, vlogWarning, vlogWarning
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 ADJUSTMENT_AMOUNT_INVALID_FORMAT
public static final java.lang.String MANUAL_PRICING_ADJUSTMENT
public static final java.lang.String REASON_CODE
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_ID_SPECIFIED
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
public static final java.lang.String MSG_ERROR_ADJUSTMENT_AMT_INVALID_FORMAT
protected java.lang.String mAdjustmentAmountAsString
protected atg.repository.servlet.PossibleValues mPossibleValues
public java.lang.String getAdjustmentAmountAsString()
This property is used enter the adjustment amount as string. The adjustment amount may contain currency symbols and amount values.
public void setAdjustmentAmountAsString(java.lang.String pAdjustmentAmountAsString)
This property is used enter the adjustment amount as string. The adjustment amount may contain currency symbols and amount values.
The adjustment amount is parsed and set in setAdjustmentAmount(double)
.
pAdjustmentAmountAsString
- the adjustmentAmountAsString to setCSRAgentTools.parseAmount(String, String)
,
setAdjustmentAmount(double)
public void setMaximumAdjustmentAmount(double pMax)
public double getMaximumAdjustmentAmount()
public void setMinimumAdjustmentAmount(double pMax)
public double getMinimumAdjustmentAmount()
public java.lang.String getPricingOp()
public void setPricingOp(java.lang.String pPricingOp)
PricingConstants
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()
public void setPossibleValues(atg.repository.servlet.PossibleValues pPossibleValues)
pPossibleValues
- the PossibleValues componentpublic atg.repository.servlet.PossibleValues getPossibleValues()
public java.util.List getManualAdjustmentReasonCodes()
public java.util.List getPossibleReasonCodes(atg.repository.Repository pRepository, java.lang.String pItemDescriptorName, java.lang.String pPropertyName, boolean pUseCodeForValue, atg.repository.SortDirectives pSortDirectives)
pRepository
- the repository to usepItemDescriptorName
- the name of the item descriptorpPropertyName
- the property namepUseCodeForValue
- true to return numeric values instead of stringspSortDirectives
- the sort directives, or null to use the default
sort directive, which is ascendingprotected 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 getprotected boolean handleRequest(atg.servlet.DynamoHttpServletRequest pRequest, atg.servlet.DynamoHttpServletResponse pResponse, ManualAdjustmentsFormHandler.Handler pHandler) throws javax.servlet.ServletException, java.io.IOException
pRequest
- pResponse
- pHandler
- javax.servlet.ServletException
java.io.IOException
protected void preAddAdjustment(ManualAdjustmentsFormHandler.Handler pHandler) throws javax.servlet.ServletException, java.io.IOException
pHandler
- the handler objectjavax.servlet.ServletException
java.io.IOException
protected void postAddAdjustment(ManualAdjustmentsFormHandler.Handler pHandler) throws javax.servlet.ServletException, java.io.IOException
pHandler
- the handler objectjavax.servlet.ServletException
java.io.IOException
protected atg.repository.RepositoryItem addAdjustment(ManualAdjustmentsFormHandler.Handler pHandler) throws javax.servlet.ServletException, java.io.IOException
pHandler
- the handler objectjavax.servlet.ServletException
java.io.IOException
protected void postProcessAddAdjustment(ManualAdjustmentsFormHandler.Handler pHandler) throws javax.servlet.ServletException, java.io.IOException
pHandler
- the handlerjavax.servlet.ServletException
java.io.IOException
protected void preDeleteAdjustment(ManualAdjustmentsFormHandler.Handler pHandler) throws javax.servlet.ServletException, java.io.IOException
pHandler
- the handler instancejavax.servlet.ServletException
java.io.IOException
protected void postDeleteAdjustment(ManualAdjustmentsFormHandler.Handler pHandler) throws javax.servlet.ServletException, java.io.IOException
pHandler
- the handler instancejavax.servlet.ServletException
java.io.IOException
protected boolean deleteAdjustment(ManualAdjustmentsFormHandler.Handler pHandler) throws javax.servlet.ServletException, java.io.IOException
pHandler
- the handler instancejavax.servlet.ServletException
java.io.IOException
protected void postProcessDeleteAdjustment(ManualAdjustmentsFormHandler.Handler pHandler) throws javax.servlet.ServletException, java.io.IOException
pHandler
- the handlerjavax.servlet.ServletException
java.io.IOException
protected void sendEvents(ManualAdjustmentsFormHandler.Operation pOp, ManualAdjustmentsFormHandler.Handler pHandler)
pHandler
- the handler in usepOp
- the type of operation just performedprotected void updateOrderAfterAdjustment(ManualAdjustmentsFormHandler.Operation pOp, ManualAdjustmentsFormHandler.Handler pHandler) throws javax.servlet.ServletException, java.io.IOException
pOp
- type of operation (ADD, DELETE) that has occurredpHandler
- the request handlerjavax.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 responsejavax.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
protected java.util.Map createRepriceParameterMap()
createRepriceParameterMap
in class atg.commerce.order.purchase.PurchaseProcessFormHandler
CSRAgentTools.addCurrentOrderPricingParameters(Map)
public atg.commerce.pricing.PricingModelHolder getUserPricingModels()
PricingModelHolder
that should be
used for the current order.getUserPricingModels
in class atg.commerce.order.purchase.PurchaseProcessFormHandler
PricingModelHolder
valueCSREnvironmentTools.getOrderPricingModelHolder(Order)