atg.projects.store.order
Class StorePaymentGroupManager

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.commerce.order.PaymentGroupManager
              extended by atg.projects.store.order.StorePaymentGroupManager
All Implemented Interfaces:
atg.naming.NameContextBindingListener, atg.naming.NameContextElement, atg.naming.NameResolver, atg.nucleus.AdminableService, atg.nucleus.logging.ApplicationLogging, atg.nucleus.logging.ApplicationLoggingSender, atg.nucleus.logging.TraceApplicationLogging, atg.nucleus.logging.VariableArgumentApplicationLogging, atg.nucleus.naming.ComponentNameResolver, atg.nucleus.Service, atg.nucleus.ServiceListener, java.util.EventListener

public class StorePaymentGroupManager
extends atg.commerce.order.PaymentGroupManager

This class holds utility methods for manipulating PaymentGroups.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string.
 
Fields inherited from class atg.commerce.order.PaymentGroupManager
sResourceBundle
 
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
StorePaymentGroupManager()
           
 
Method Summary
 atg.commerce.claimable.ClaimableManager getClaimableManager()
           
 java.util.List getOnlineCredits(java.lang.String[] pOnlineCreditIds)
          This will return the online credits selected by the user.
 atg.commerce.order.OrderManager getOrderManager()
           
 java.lang.String getStoreCreditPaymentType()
           
 StoreOrderTools getStoreOrderTools()
           
 boolean initializePaymentMethods(atg.repository.RepositoryItem pProfile, atg.commerce.order.Order pOrder, java.lang.String[] pOnlineCreditIds)
          This method will take an array of store credit ids, and create payment groups and add them to the order.
 boolean isPaymentGroupUsed(atg.commerce.order.Order pOrder, atg.commerce.order.PaymentGroup pPaymentGroup)
           
 void removeStoreCreditPaymentGroups(atg.commerce.order.Order pOrder)
          Given an order, return all the store credit payment group ids.
 void setClaimableManager(atg.commerce.claimable.ClaimableManager pClaimableManager)
          Sets the claimable manager.
 void setOrderManager(atg.commerce.order.OrderManager pOrderManager)
          Sets the order manager.
 void setStoreCreditPaymentType(java.lang.String pStoreCreditPaymentType)
          Sets the storeCreditPaymentType.
 void setStoreOrderTools(StoreOrderTools pStoreOrderTools)
          Sets the StoreOrderTools property.
 
Methods inherited from class atg.commerce.order.PaymentGroupManager
addPaymentGroupToOrder, addPaymentGroupToOrder, createPaymentGroup, createPaymentGroup, getAllPaymentGroupRelationships, getNonModifiablePaymentGroups, getNonModifiablePaymentGroupStates, getOrderTools, getPaymentGroupCommerceItemRelationship, getPaymentGroupOrderRelationship, getPaymentGroupShippingGroupRelationship, initializeCreditCard, initializeGiftCertificate, initializeStoreCredit, isPaymentGroupInOrder, paymentGroupIsModifiable, recalculatePaymentGroupAmounts, removeAllPaymentGroupsFromOrder, removeAllPaymentGroupsFromOrder, removeAllRelationshipsFromPaymentGroup, removeAllRelationshipsFromPaymentGroup, removeEmptyPaymentGroups, removePaymentGroupFromOrder, setNonModifiablePaymentGroupStates, setOrderTools
 
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, reResolveThis, 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

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string.

Constructor Detail

StorePaymentGroupManager

public StorePaymentGroupManager()
Method Detail

getClaimableManager

public atg.commerce.claimable.ClaimableManager getClaimableManager()
Returns:
the claimable manager.

setClaimableManager

public void setClaimableManager(atg.commerce.claimable.ClaimableManager pClaimableManager)
Sets the claimable manager.

Parameters:
pClaimableManager - - claimable manager.

getOrderManager

public atg.commerce.order.OrderManager getOrderManager()
Returns:
the order manager.

setOrderManager

public void setOrderManager(atg.commerce.order.OrderManager pOrderManager)
Sets the order manager.

Parameters:
pOrderManager - - order manager

getStoreOrderTools

public StoreOrderTools getStoreOrderTools()
Returns:
the Store order tools.

setStoreOrderTools

public void setStoreOrderTools(StoreOrderTools pStoreOrderTools)
Sets the StoreOrderTools property.

Parameters:
pStoreOrderTools - - the Store order tools

getStoreCreditPaymentType

public java.lang.String getStoreCreditPaymentType()
Returns:
string representing the store credit payment type.

setStoreCreditPaymentType

public void setStoreCreditPaymentType(java.lang.String pStoreCreditPaymentType)
Sets the storeCreditPaymentType.

Parameters:
pStoreCreditPaymentType - - store credit payment type

removeStoreCreditPaymentGroups

public void removeStoreCreditPaymentGroups(atg.commerce.order.Order pOrder)
Given an order, return all the store credit payment group ids.

Parameters:
pOrder - - the order

initializePaymentMethods

public boolean initializePaymentMethods(atg.repository.RepositoryItem pProfile,
                                        atg.commerce.order.Order pOrder,
                                        java.lang.String[] pOnlineCreditIds)
                                 throws atg.commerce.CommerceException
This method will take an array of store credit ids, and create payment groups and add them to the order. This will only create enough store credit payment groups to cover the order costs. If more store credit ids are passed in than are needed to cover the order, they are not used. On the other hand, if not enough store credit ids are here to cover the order costs, then this will search for a credit card and add the remaining order amount to the credit card.

Parameters:
pProfile - - users profile
pOrder - - the order
pOnlineCreditIds - - online credit ids
Returns:
true
Throws:
atg.commerce.CommerceException - if an error occurs

getOnlineCredits

public java.util.List getOnlineCredits(java.lang.String[] pOnlineCreditIds)
This will return the online credits selected by the user.

Parameters:
pOnlineCreditIds - - online credit ids
Returns:
List of online credits

isPaymentGroupUsed

public boolean isPaymentGroupUsed(atg.commerce.order.Order pOrder,
                                  atg.commerce.order.PaymentGroup pPaymentGroup)
Overrides:
isPaymentGroupUsed in class atg.commerce.order.PaymentGroupManager