|
|||||||||
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.commerce.order.edit.CloneEditHandler
atg.commerce.order.edit.CollectionEditHandler
atg.commerce.order.edit.ListEditHandler
atg.commerce.order.edit.PaymentGroupEditHandler
public class PaymentGroupEditHandler
This handler updates payment groups between the clone and original order.
ListEditHandler
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
|
protected atg.commerce.order.PaymentGroupManager |
mPaymentGroupManager
|
protected atg.commerce.payment.PaymentManager |
mPaymentManager
|
Fields inherited from class atg.commerce.order.edit.CollectionEditHandler |
---|
mCollectionPropertyName, mSortPropertyName, mThrowExceptionsForCollectionChanges, STATE_CLONETOORIGINAL_MAP, STATE_ORIGINALTOCLONE_MAP |
Fields inherited from class atg.commerce.order.edit.CloneEditHandler |
---|
mFulfillmentMessageSender, mKeyPropertyName, mOrderFulfillmentTools, mPropertiesToCopyOnUpdate, STATE_ADD_ITEMS, STATE_DELETE_ITEMS, STATE_UPDATE_ITEMS |
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 | |
---|---|
PaymentGroupEditHandler()
|
Method Summary | |
---|---|
protected void |
addItem(CloneEditState pCloneEditState,
AddItem pAddItem)
Overrides add item to use the payment group container interfaces to add the new item. |
atg.commerce.fulfillment.Modification |
createPaymentGroupAddedModification(atg.commerce.order.PaymentGroup pPaymentGroup,
atg.commerce.order.Order pOrder)
Creates a Modification object that represents a payment group add. |
atg.commerce.fulfillment.Modification |
createPaymentGroupUpdateModification(java.lang.String pId)
Creates a Modification object that represents a payment group update. |
protected void |
deleteItem(CloneEditState pCloneEditState,
DeleteItem pDeleteItem)
Overrides delete item to use the payment group container interfaces to remove the item |
protected void |
detectChangesToCollection(CloneEditState pCloneEditState,
java.lang.Object pOriginalCollectionContainer,
java.lang.Object pCloneCollectionContainer)
After applying changes, this method resets all the the payment groups that were flagged as auto recovered in the AddItem object. |
java.util.List |
generateModifications(CloneEditState pCloneEditState)
Generates the list of Modification objects for payment groups using the AddItem and
UpdateItem objects |
atg.commerce.order.PaymentGroupManager |
getPaymentGroupManager()
Gets the PaymentGroupManager component. |
atg.commerce.payment.PaymentManager |
getPaymentManager()
|
void |
processAuthorizations(CloneEditState pCloneEditState)
Performs payment group authorizations for updated and added payment groups. |
void |
processAuthorizationsForAddedPaymentGroups(CloneEditState pCloneEditState)
Performs payment group authorizations for added payment groups. |
void |
processAuthorizationsForDeletedPaymentGroups(CloneEditState pCloneEditState)
Decreases the authorization for the original amount of the deleted payment group. |
void |
processAuthorizationsForUpdatedPaymentGroups(CloneEditState pCloneEditState)
Performs payment group authorizations for updated payment groups. |
void |
setPaymentGroupManager(atg.commerce.order.PaymentGroupManager pPaymentGroupManager)
Sets the PaymentGroupManager component. |
void |
setPaymentManager(atg.commerce.payment.PaymentManager pPaymentManager)
|
Methods inherited from class atg.nucleus.GenericService |
---|
addLogListener, createAdminServlet, doStartService, 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 atg.commerce.payment.PaymentManager mPaymentManager
protected atg.commerce.order.PaymentGroupManager mPaymentGroupManager
Constructor Detail |
---|
public PaymentGroupEditHandler()
Method Detail |
---|
public atg.commerce.payment.PaymentManager getPaymentManager()
public void setPaymentManager(atg.commerce.payment.PaymentManager pPaymentManager)
public void setPaymentGroupManager(atg.commerce.order.PaymentGroupManager pPaymentGroupManager)
public atg.commerce.order.PaymentGroupManager getPaymentGroupManager()
protected void detectChangesToCollection(CloneEditState pCloneEditState, java.lang.Object pOriginalCollectionContainer, java.lang.Object pCloneCollectionContainer) throws atg.commerce.CommerceException
AddItem
object.
The amountAuhtorized, amountCredited, amountDebited are reset back to zero.
detectChangesToCollection
in class CollectionEditHandler
pCloneEditState
- the CloneEditState that was created at the beginning of the clone process.
atg.commerce.CommerceException
protected void addItem(CloneEditState pCloneEditState, AddItem pAddItem) throws atg.commerce.CommerceException
addItem
in class ListEditHandler
pCloneEditState
- pAddItem
-
atg.commerce.CommerceException
PaymentGroupContainer.addPaymentGroup(PaymentGroup, int)
protected void deleteItem(CloneEditState pCloneEditState, DeleteItem pDeleteItem) throws atg.commerce.CommerceException
deleteItem
in class CollectionEditHandler
pCloneEditState
- pDeleteItem
- the DeleteItem object
atg.commerce.CommerceException
PaymentGroupManager.removePaymentGroupFromOrder(Order, String)
,
PaymentGroupContainer.removePaymentGroup(String)
public void processAuthorizations(CloneEditState pCloneEditState) throws atg.commerce.CommerceException
pCloneEditState
-
atg.commerce.CommerceException
processAuthorizationsForUpdatedPaymentGroups(CloneEditState)
,
processAuthorizationsForAddedPaymentGroups(CloneEditState)
,
processAuthorizationsForAddedPaymentGroups(CloneEditState)
public void processAuthorizationsForUpdatedPaymentGroups(CloneEditState pCloneEditState) throws atg.commerce.CommerceException
Each one is authorized for the difference between the pg.amount and pg.amountAuthorized
pCloneEditState
-
atg.commerce.CommerceException
CloneEditState#getUpdatedPaymentGroups()
,
PaymentManager.authorize(Order, PaymentGroup, double)
public void processAuthorizationsForAddedPaymentGroups(CloneEditState pCloneEditState) throws atg.commerce.CommerceException
Added payment groups are either brand new or a recovery of a pg that was removed from the original after cloning it.
Each one is authorized for the difference between the pg.amount and pg.amountAuthorized
pCloneEditState
-
atg.commerce.CommerceException
CloneEditState#getAddedPaymentGroups()
,
PaymentManager.authorize(Order, PaymentGroup, double)
public void processAuthorizationsForDeletedPaymentGroups(CloneEditState pCloneEditState) throws atg.commerce.CommerceException
pCloneEditState
-
atg.commerce.CommerceException
public java.util.List generateModifications(CloneEditState pCloneEditState)
AddItem
and
UpdateItem
objects
generateModifications
in class CloneEditHandler
pCloneEditState
-
public atg.commerce.fulfillment.Modification createPaymentGroupAddedModification(atg.commerce.order.PaymentGroup pPaymentGroup, atg.commerce.order.Order pOrder)
pShippingGroupId
-
public atg.commerce.fulfillment.Modification createPaymentGroupUpdateModification(java.lang.String pId)
pShippingGroupId
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |