atg.commerce.csr.environment
Class CSREnvironmentTools

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.commerce.csr.environment.CSREnvironmentTools
All Implemented Interfaces:
atg.naming.AbsoluteNameable, atg.naming.NameContextBindingListener, atg.naming.NameContextElement, atg.naming.NameContextParentable, atg.naming.NameResolver, atg.nucleus.AdminableService, atg.nucleus.Configured, 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 CSREnvironmentTools
extends atg.nucleus.GenericService

This class provides util API for managing the CSR environment.

See Also:
CSREnvironmentConstants

Field Summary
static java.lang.String CATALOG_TREE_STATE_PATH
          The path to the environment's tree state component
static java.lang.String CLASS_VERSION
          Class version string
static java.lang.String CSR_APP_NAME
          Commerce Application name
static java.lang.String CSR_ENVIRONMENTTOOLS_PATH
          The path to the CSREnvironmentTools component
static java.lang.String EXCHANGE_PRICING_MODEL_PATH
          The path to the pricing model component used for pricing exchange orders
protected  atg.commerce.catalog.CatalogTools mCatalogTools
           
protected  atg.commerce.order.purchase.CommerceItemShippingInfoTools mCommerceItemShippingInfoTools
           
protected  CSRAgentTools mCSRAgentTools
           
protected  java.lang.String mCSRApplicationName
           
protected  CSRScheduledOrderTools mCSRScheduledOrderTools
           
protected  atg.svc.agent.environment.EnvironmentTools mEnvironmentTools
           
protected static CSREnvironmentTools mGlobalEnvironmentTools
           
protected  atg.web.messaging.MessageTools mMessageTools
           
protected  atg.commerce.pricing.priceLists.PriceListManager mPriceListManager
           
protected  atg.multisite.SiteGroupManager mSiteGroupManager
           
protected static java.lang.String MY_RESOURCES
          resource bundle used to generate user localized messages
protected static java.lang.String MY_SERVER_RESOURCES
          resource bundle used to generate server localized messages
static java.lang.String ORDER_HOLDER_PATH
          The path to the environment's order holder component
static java.lang.String PRICING_MODEL_PATH
          The path to the environment's pricing model component
static java.lang.String PROMOTION_WALLET_PRICING_MODEL_PATH
          The path to the environment's promotion wallet component
static java.lang.String PURCHASE_PROCESS_CONFIGURATION_PATH
          The path to the purchase process configuration component
static java.lang.String SUBMITTED_ORDER_PRICING_MODEL_PATH
          The path to the environment's submitted order pricing model component
static java.lang.String VIEW_ORDER_HOLDER_PATH
          The path to the environment's view order holder component
 
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
CSREnvironmentTools()
           
 
Method Summary
protected  void addChangeCatalogDetail(atg.repository.RepositoryItem pCatalog, atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
          Adds a change detail for the given custom catalog.
 void addChangeCatalogDetail(java.lang.String pCatalogId, atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
          Adds a change detail for a change in catalog
 void addChangeOrderDetail(atg.commerce.order.Order pOrder, atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
          Adds a change order detail for loading an existing order.
 void addChangeOrderDetail(java.lang.String pOrderId, atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
          Adds a change order detail for loading an existing order.
 void addChangePriceListDetail(atg.repository.RepositoryItem pPriceList, atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
          Adds a change detail for the given price list.
 void addChangePriceListDetail(java.lang.String pPriceListId, atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
          Adds a change detail for the price list with the given id.
 void addChangeSalePriceListDetail(atg.repository.RepositoryItem pPriceList, atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
          Adds a change detail for the given sale price list.
 void addChangeSalePriceListDetail(java.lang.String pPriceListId, atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
          Adds a change detail for the sale price list with the given id.
 void addNewOrderDetail(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
          Adds a change environment detail for a new order.
 void changeOrder(java.lang.String pApplicationName, atg.commerce.order.Order pOrder, atg.svc.agent.environment.TicketDispositionOptions pTicketDispositionOptions)
          Changes the environment's current order to the given order
 void changeOrder(java.lang.String pApplicationName, java.lang.String pOrderId, atg.svc.agent.environment.TicketDispositionOptions pTicketDispositionOptions)
          Changes the environment's current order to the given order
 void changeViewOrder(java.lang.String pViewOrderId)
          This method will change the current view order to the given order.
 void cleanCatalogTreeState(atg.web.tree.TreeState treeState)
          Nulls properties of catalog navigation tree
 void cleanPaymentGroupContainerService()
          When the environment changes are applied, there could be stale data in the PaymentGroupMapContainer.
 void createNewOrder(java.lang.String pApplicationName)
          Creates a new order in the order holder.
 java.util.List createWarningsForCatalogSwitch(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
          Generates warnings for a change of catalog
 java.util.List createWarningsForChangeOrder(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
          Generates warnings for a change of order
protected  java.util.List createWarningsForCurrentOrder()
          Adds a warning for the current order if there are pending changes(to a submitted order) or if it's an unsaved new order with items in it.
protected  java.util.Collection createWarningsForItemRemoves(atg.commerce.order.Order pOrder, java.util.Collection pRemoveItems)
          Creates a warning message for each item in the pRemoveItems collection.
protected  java.util.List createWarningsForNewOrder(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
          Create warnings for the order that will be loaded for the change.
 java.util.List createWarningsForPriceListSwitch(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
          Generates warnings for a change of price list
 boolean deleteItemsWithoutPrice(atg.commerce.order.Order pOrder)
          Deletes item from the order that cannot be priced by either the current price list or sale price list.
 boolean doSitesShare(java.lang.String pSiteId1, java.lang.String pSiteId2)
          This is just a convenient method to compare two cart sharing sites.
 java.util.Collection findItemsNotInPriceList(java.util.Collection pCommerceItems, atg.repository.RepositoryItem pPriceList)
          Finds the commerce items in the collection that cannot be priced using the provided price list.
 java.util.Collection findItemsWithoutPrice(atg.commerce.order.Order pOrder, atg.repository.RepositoryItem pListPriceList, atg.repository.RepositoryItem pSalePriceList)
          Returns commerce items in the order that cannot be using the given list price list and sale price list.
 atg.svc.agent.environment.EnvironmentChangeDetail getCatalogDetail(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
          returns the catalog EnvironmentChangeDetail if there is one in the state already
 atg.repository.RepositoryItem getCatalogFromCallState(java.lang.String pSiteId)
          This method returns the site's catalog from the call state.
 atg.commerce.catalog.CatalogTools getCatalogTools()
           
 atg.web.tree.TreeState getCatalogTreeState()
          Returns the catalog tree state
 atg.commerce.order.purchase.CommerceItemShippingInfoTools getCommerceItemShippingInfoTools()
          Returns the commerceItemShippingInfoTools
 CSRAgentTools getCSRAgentTools()
           
 java.lang.String getCSRApplicationName()
           
 CSRScheduledOrderTools getCSRScheduledOrderTools()
          Returns a reference to the CSRScheduledOrderTools component
 atg.repository.RepositoryItem getCurrentCatalog()
          Returns the environment's current catalog.
 CurrentCatalogHolder getCurrentCatalogHolder()
          This method resolves the CurrentCatalogHolder component and returns the same.
 atg.commerce.order.Order getCurrentOrder()
          Returns the current order
 atg.commerce.pricing.PricingModelHolder getCurrentOrderPricingModelHolder()
          Returns the correct pricing model holder for the current order based on its state.
 atg.repository.RepositoryItem getCurrentPriceList()
          Returns the environment's current price list.
 ReturnRequest getCurrentReturnRequest()
          Returns the current ReturnRequest.
 atg.repository.RepositoryItem getCurrentSalePriceList()
          Returns the environment's current price list.
 atg.commerce.pricing.PricingModelHolder getCustomerPricingModels()
          Returns the customer pricing models
protected  atg.repository.RepositoryItem getDefaultCatalog()
          Returns the default catalog from configuration.
 atg.svc.agent.environment.EnvironmentTools getEnvironmentTools()
           
 atg.commerce.pricing.PricingModelHolder getExchangePricingModels()
          Returns the pricing model holder used for pricing the exchange order during a return.
static CSREnvironmentTools getInstance()
          Returns the global CSREnvironmentTools component by resolving it from the current request.
 atg.repository.RepositoryItem getListPriceListFromOrder(atg.commerce.order.Order pOrder)
          Returns the list price list from the order.
 atg.web.messaging.MessageTools getMessageTools()
          Returns the MessageTools component
 java.lang.String getOrderChangeId(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
          Convenience method for returning the order id of the order that will be loaded as part of the change.
 atg.svc.agent.environment.EnvironmentChangeDetail getOrderDetail(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
          returns the order EnvironmentChangeDetail if there is one in the state already
 CSROrderHolder getOrderHolder()
          Returns the current order holder
 atg.commerce.pricing.PricingModelHolder getOrderPricingModelHolder(atg.commerce.order.Order pOrder)
          Returns either the standard customer pricing model holder or the submitted order pricing model holder based on the state of the given order.
 atg.commerce.order.Order getOriginalOrder()
          This method returns the original order if the holder is in clone edit mode.
 atg.commerce.order.Order getOriginalOrder(atg.commerce.order.Order pOrder)
          If the given order is current in the cart and the cart is in clone edit mode, the original order is returned.
 atg.svc.agent.environment.EnvironmentChangeDetail getPriceListDetail(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
          returns the price list EnvironmentChangeDetail if there is one in the state already
 atg.repository.RepositoryItem getPriceListFromOrder(atg.commerce.order.Order pOrder)
          Returns the price list from the order.
 atg.commerce.pricing.priceLists.PriceListManager getPriceListManager()
           
 atg.commerce.pricing.PricingModelHolder getPromotionWalletPricingModels()
          Returns the promotion wallet pricing models
 atg.commerce.order.purchase.PurchaseProcessConfiguration getPurchaseProcessConfiguration()
          Returns the purchase process configuration
 atg.svc.agent.environment.EnvironmentChangeDetail getSalePriceListDetail(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
          returns the sale price list EnvironmentChangeDetail if there is one in the state already
 atg.repository.RepositoryItem getSalePriceListFromOrder(atg.commerce.order.Order pOrder)
          Returns the sale price list from the order.
 java.lang.String getServerResource(java.lang.String pKey, java.lang.Object[] pMsgArgs)
          Returns a resource from the server localized resource bundle
 atg.multisite.SiteGroupManager getSiteGroupManager()
          Returns the siteGroupManager
 SubmittedOrderPricingModelHolder getSubmittedOrderPricingModels()
          Returns the pricing model holder used for submitted orders
 java.util.Locale getUserLocale()
          This method gets the current Locale
 java.lang.String getUserResource(java.lang.String pKey, java.lang.Object[] pMsgArgs, java.util.Locale pLocale)
          Returns a resource from the user resource bundle
 atg.repository.RepositoryItem getUsersCatalog(atg.repository.RepositoryItem pProfile, atg.multisite.Site pSite)
          Returns a catalog.
 atg.commerce.order.Order getViewOrder()
          Returns the view current order
 ViewOrderHolder getViewOrderHolder()
          Returns the current view order holder
 void initializeCustomerPricingModels()
          Initializes the customer pricing models
 void initializeDefaultsForProfile(atg.repository.MutableRepositoryItem pProfile)
          Set the default values for a new profile.
protected  void initializeShippingGroupContainerService(atg.userprofiling.Profile pProfile, atg.commerce.order.Order pOrder)
          This method is used to initialize ShippingGroupMapContainerService.
 void invalidateViewOrder()
          This method will invalidate the order in the view order holder.
 boolean isActiveOrderOwnerChangeble()
          Determines if the active order may have a new owner assigned.
 boolean isActiveOrderUpdatedSinceLoad()
          Returns true if the orders last modification time is greater than the CSROrderHolder's loadTime.
 boolean isCatalogExplicitlySetForCall()
          This method gets the current site in the environment using EnvironmentTools.getCurrentSite() and calls isCatalogExplicitlySetForCall(Site).
 boolean isCatalogExplicitlySetForCall(atg.multisite.Site pSite)
          Determines if the catalog has been explicitly set by the agent for the current call.
 boolean isNewOrderDetail(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
          Determines if a EnvironmentChangeDetail exists for a new order change.
protected  boolean isOwnerChangeable(atg.commerce.order.Order pOrder, atg.repository.RepositoryItem pNewOwnerProfile)
          Determines if an order may have the new owner assigned.
 boolean isPriceListExplicitlySetForCall()
          Determines if the price list has been explicitly set by the agent for the current call.
 boolean isReturnExchange()
          Returns true is the agent is currently working on a return or exchange
 boolean isSalePriceListExplicitlySetForCall()
          Determines if the sale price list has been explicitly set by the agent for the current call.
 boolean isSiteValidForEnvironment(java.lang.String pSiteId)
          This method decides whether the site is valid for the environment or not.
 void loadViewOrderAndProfile(atg.commerce.order.Order pOrder)
          Loads the given order into the view order holder and the order's owner into the view profile holder.
 void setCatalogTools(atg.commerce.catalog.CatalogTools pCatalogTools)
          Sets the catalog tools component
 void setCommerceItemShippingInfoTools(atg.commerce.order.purchase.CommerceItemShippingInfoTools pCommerceItemShippingInfoTools)
          Sets the commerceItemShippingInfoTools
 void setCSRAgentTools(CSRAgentTools pCSRAgentTools)
          Sets the property CSRAgentTools.
 void setCSRApplicationName(java.lang.String pCSRApplicationName)
           
 void setCSRScheduledOrderTools(CSRScheduledOrderTools pCSRScheduledOrderTools)
           
 void setCurrentCatalog(atg.repository.RepositoryItem pCatalog)
          Sets the current catalog in global context by issuing an environment change request.
 void setCurrentPriceList(atg.repository.RepositoryItem pPriceList)
          Sets the current price list in global context by issuing an environment change request.
 void setCurrentSalePriceList(atg.repository.RepositoryItem pPriceList)
          Sets the current sale price list in global context by issuing an environment change request.
 void setEnvironmentTools(atg.svc.agent.environment.EnvironmentTools pEnvironmentTools)
          Sets the EnvironmentTools
 void setMessageTools(atg.web.messaging.MessageTools pMessageTools)
           
 void setPriceListManager(atg.commerce.pricing.priceLists.PriceListManager pPriceListManager)
          Sets the Price List Manager
 void setSiteGroupManager(atg.multisite.SiteGroupManager pSiteGroupManager)
          Sets the siteGroupManager
 void setViewOrder(atg.commerce.order.Order pViewOrder)
          Sets the view order as the the current view order in the Environment
protected  boolean shouldInitializePricingModelHolder(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
          This method decides whether the pricing model holder needs to be initialized based on the changes being made to the environment.
 
Methods inherited from class atg.nucleus.GenericService
addLogListener, createAdminServlet, doStartService, 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
 
Methods inherited from class atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
vlogDebug, vlogDebug, vlogDebug, vlogDebug, vlogDebugTrace, 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


CSR_APP_NAME

public static final java.lang.String CSR_APP_NAME
Commerce Application name

See Also:
Constant Field Values

CSR_ENVIRONMENTTOOLS_PATH

public static final java.lang.String CSR_ENVIRONMENTTOOLS_PATH
The path to the CSREnvironmentTools component

See Also:
Constant Field Values

ORDER_HOLDER_PATH

public static final java.lang.String ORDER_HOLDER_PATH
The path to the environment's order holder component

See Also:
Constant Field Values

VIEW_ORDER_HOLDER_PATH

public static final java.lang.String VIEW_ORDER_HOLDER_PATH
The path to the environment's view order holder component

See Also:
Constant Field Values

PRICING_MODEL_PATH

public static final java.lang.String PRICING_MODEL_PATH
The path to the environment's pricing model component

See Also:
Constant Field Values

SUBMITTED_ORDER_PRICING_MODEL_PATH

public static final java.lang.String SUBMITTED_ORDER_PRICING_MODEL_PATH
The path to the environment's submitted order pricing model component

See Also:
Constant Field Values

CATALOG_TREE_STATE_PATH

public static final java.lang.String CATALOG_TREE_STATE_PATH
The path to the environment's tree state component

See Also:
Constant Field Values

EXCHANGE_PRICING_MODEL_PATH

public static final java.lang.String EXCHANGE_PRICING_MODEL_PATH
The path to the pricing model component used for pricing exchange orders

See Also:
Constant Field Values

PROMOTION_WALLET_PRICING_MODEL_PATH

public static final java.lang.String PROMOTION_WALLET_PRICING_MODEL_PATH
The path to the environment's promotion wallet component

See Also:
Constant Field Values

PURCHASE_PROCESS_CONFIGURATION_PATH

public static final java.lang.String PURCHASE_PROCESS_CONFIGURATION_PATH
The path to the purchase process configuration component

See Also:
Constant Field Values

MY_RESOURCES

protected static final java.lang.String MY_RESOURCES
resource bundle used to generate user localized messages

See Also:
Constant Field Values

MY_SERVER_RESOURCES

protected static final java.lang.String MY_SERVER_RESOURCES
resource bundle used to generate server localized messages

See Also:
Constant Field Values

mGlobalEnvironmentTools

protected static CSREnvironmentTools mGlobalEnvironmentTools

mCSRApplicationName

protected java.lang.String mCSRApplicationName

mEnvironmentTools

protected atg.svc.agent.environment.EnvironmentTools mEnvironmentTools

mPriceListManager

protected atg.commerce.pricing.priceLists.PriceListManager mPriceListManager

mCatalogTools

protected atg.commerce.catalog.CatalogTools mCatalogTools

mCSRAgentTools

protected CSRAgentTools mCSRAgentTools

mCSRScheduledOrderTools

protected CSRScheduledOrderTools mCSRScheduledOrderTools

mSiteGroupManager

protected atg.multisite.SiteGroupManager mSiteGroupManager

mCommerceItemShippingInfoTools

protected atg.commerce.order.purchase.CommerceItemShippingInfoTools mCommerceItemShippingInfoTools

mMessageTools

protected atg.web.messaging.MessageTools mMessageTools
Constructor Detail

CSREnvironmentTools

public CSREnvironmentTools()
Method Detail

getUserLocale

public java.util.Locale getUserLocale()
This method gets the current Locale

Returns:
the current Locale
See Also:
EnvironmentTools.getUserLocale()

getInstance

public static CSREnvironmentTools getInstance()
Returns the global CSREnvironmentTools component by resolving it from the current request.

Returns:
CSREnvironmentTools

getCSRApplicationName

public java.lang.String getCSRApplicationName()
Returns:
the name of the CSR application

setCSRApplicationName

public void setCSRApplicationName(java.lang.String pCSRApplicationName)

setEnvironmentTools

public void setEnvironmentTools(atg.svc.agent.environment.EnvironmentTools pEnvironmentTools)
Sets the EnvironmentTools

Parameters:
pEnvironmentTools - the EnvironmentTools in Service

getEnvironmentTools

public atg.svc.agent.environment.EnvironmentTools getEnvironmentTools()
Returns:
the EnvironmentTools in Service

setPriceListManager

public void setPriceListManager(atg.commerce.pricing.priceLists.PriceListManager pPriceListManager)
Sets the Price List Manager

Parameters:
pPriceListManager - the Price List Manager

getPriceListManager

public atg.commerce.pricing.priceLists.PriceListManager getPriceListManager()
Returns:
the Price List Manager

setCatalogTools

public void setCatalogTools(atg.commerce.catalog.CatalogTools pCatalogTools)
Sets the catalog tools component

Parameters:
pCatalogTools - the catalog tools component

getCatalogTools

public atg.commerce.catalog.CatalogTools getCatalogTools()
Returns:
the catalog tools component

setCSRAgentTools

public void setCSRAgentTools(CSRAgentTools pCSRAgentTools)
Sets the property CSRAgentTools.


getCSRAgentTools

public CSRAgentTools getCSRAgentTools()
Returns:
The value of the property CSRAgentTools.

getCSRScheduledOrderTools

public CSRScheduledOrderTools getCSRScheduledOrderTools()
Returns a reference to the CSRScheduledOrderTools component


setCSRScheduledOrderTools

public void setCSRScheduledOrderTools(CSRScheduledOrderTools pCSRScheduledOrderTools)

getSiteGroupManager

public atg.multisite.SiteGroupManager getSiteGroupManager()
Returns the siteGroupManager

Returns:
the siteGroupManager

setSiteGroupManager

public void setSiteGroupManager(atg.multisite.SiteGroupManager pSiteGroupManager)
Sets the siteGroupManager

Parameters:
pSiteGroupManager - the siteGroupManager to set

getCommerceItemShippingInfoTools

public atg.commerce.order.purchase.CommerceItemShippingInfoTools getCommerceItemShippingInfoTools()
Returns the commerceItemShippingInfoTools

Returns:
the commerceItemShippingInfoTools

setCommerceItemShippingInfoTools

public void setCommerceItemShippingInfoTools(atg.commerce.order.purchase.CommerceItemShippingInfoTools pCommerceItemShippingInfoTools)
Sets the commerceItemShippingInfoTools

Parameters:
pCommerceItemShippingInfoTools - the commerceItemShippingInfoTools to set

getMessageTools

public atg.web.messaging.MessageTools getMessageTools()
Returns the MessageTools component

Returns:
MessageTools

setMessageTools

public void setMessageTools(atg.web.messaging.MessageTools pMessageTools)

isActiveOrderUpdatedSinceLoad

public boolean isActiveOrderUpdatedSinceLoad()
Returns true if the orders last modification time is greater than the CSROrderHolder's loadTime.

Returns:
boolean

isNewOrderDetail

public boolean isNewOrderDetail(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
Determines if a EnvironmentChangeDetail exists for a new order change.

Parameters:
pEnvironmentChangeState -
Returns:
boolean

isOwnerChangeable

protected boolean isOwnerChangeable(atg.commerce.order.Order pOrder,
                                    atg.repository.RepositoryItem pNewOwnerProfile)
Determines if an order may have the new owner assigned.

True is returned if the order is considered incomplete and not in a pending approval state.

Parameters:
pOrder - the order
pNewOwnerProfile - repository item representing the potential new owner of the order. This can be null.
Returns:
boolean indicating if the order may have the new owner assigned to it

isActiveOrderOwnerChangeble

public boolean isActiveOrderOwnerChangeble()
Determines if the active order may have a new owner assigned.

True is returned if the active order is incomplete and return process is not started.

Returns:
boolean indicating if the active order may have a new owner assigned to it

getOrderDetail

public atg.svc.agent.environment.EnvironmentChangeDetail getOrderDetail(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
returns the order EnvironmentChangeDetail if there is one in the state already

Parameters:
pEnvironmentChangeState -
Returns:
EnvironmentChangeDetail

getPriceListDetail

public atg.svc.agent.environment.EnvironmentChangeDetail getPriceListDetail(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
returns the price list EnvironmentChangeDetail if there is one in the state already

Parameters:
pEnvironmentChangeState -
Returns:
EnvironmentChangeDetail

getSalePriceListDetail

public atg.svc.agent.environment.EnvironmentChangeDetail getSalePriceListDetail(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
returns the sale price list EnvironmentChangeDetail if there is one in the state already

Parameters:
pEnvironmentChangeState -
Returns:
EnvironmentChangeDetail

getCatalogDetail

public atg.svc.agent.environment.EnvironmentChangeDetail getCatalogDetail(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
returns the catalog EnvironmentChangeDetail if there is one in the state already

Parameters:
pEnvironmentChangeState -
Returns:
EnvironmentChangeDetail

getOrderChangeId

public java.lang.String getOrderChangeId(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
Convenience method for returning the order id of the order that will be loaded as part of the change.

Returns:
order id of the order that will be loaded as part of the change.

addNewOrderDetail

public void addNewOrderDetail(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
                       throws atg.svc.agent.environment.EnvironmentChangeDetailConflict,
                              atg.svc.agent.environment.EnvironmentException
Adds a change environment detail for a new order.

Parameters:
pEnvironmentChangeState -
Throws:
atg.svc.agent.environment.EnvironmentChangeDetailConflict
atg.svc.agent.environment.EnvironmentException

addChangeOrderDetail

public void addChangeOrderDetail(java.lang.String pOrderId,
                                 atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
                          throws atg.svc.agent.environment.EnvironmentChangeDetailConflict,
                                 atg.svc.agent.environment.EnvironmentException
Adds a change order detail for loading an existing order.

Parameters:
pOrderId -
pEnvironmentChangeState -
Throws:
atg.svc.agent.environment.EnvironmentChangeDetailConflict
atg.svc.agent.environment.EnvironmentException

addChangeOrderDetail

public void addChangeOrderDetail(atg.commerce.order.Order pOrder,
                                 atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
                          throws atg.svc.agent.environment.EnvironmentChangeDetailConflict,
                                 atg.svc.agent.environment.EnvironmentException
Adds a change order detail for loading an existing order.

Parameters:
pOrder -
pEnvironmentChangeState -
Throws:
atg.svc.agent.environment.EnvironmentChangeDetailConflict
atg.svc.agent.environment.EnvironmentException

addChangeCatalogDetail

public void addChangeCatalogDetail(java.lang.String pCatalogId,
                                   atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
                            throws atg.svc.agent.environment.EnvironmentChangeDetailConflict,
                                   atg.svc.agent.environment.EnvironmentException
Adds a change detail for a change in catalog

Parameters:
pCatalogId -
pEnvironmentChangeState -
Throws:
atg.svc.agent.environment.EnvironmentChangeDetailConflict
atg.svc.agent.environment.EnvironmentException

addChangePriceListDetail

public void addChangePriceListDetail(java.lang.String pPriceListId,
                                     atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
                              throws atg.svc.agent.environment.EnvironmentChangeDetailConflict,
                                     atg.svc.agent.environment.EnvironmentException
Adds a change detail for the price list with the given id.

Parameters:
pPriceListId -
pEnvironmentChangeState -
Throws:
atg.svc.agent.environment.EnvironmentChangeDetailConflict
atg.svc.agent.environment.EnvironmentException

addChangePriceListDetail

public void addChangePriceListDetail(atg.repository.RepositoryItem pPriceList,
                                     atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
                              throws atg.svc.agent.environment.EnvironmentChangeDetailConflict,
                                     atg.svc.agent.environment.EnvironmentException
Adds a change detail for the given price list.

Parameters:
pPriceList -
pEnvironmentChangeState -
Throws:
atg.svc.agent.environment.EnvironmentChangeDetailConflict
atg.svc.agent.environment.EnvironmentException

addChangeCatalogDetail

protected void addChangeCatalogDetail(atg.repository.RepositoryItem pCatalog,
                                      atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
                               throws atg.svc.agent.environment.EnvironmentChangeDetailConflict,
                                      atg.svc.agent.environment.EnvironmentException
Adds a change detail for the given custom catalog.

Parameters:
pCatalog -
pEnvironmentChangeState -
Throws:
atg.svc.agent.environment.EnvironmentChangeDetailConflict
atg.svc.agent.environment.EnvironmentException

addChangeSalePriceListDetail

public void addChangeSalePriceListDetail(java.lang.String pPriceListId,
                                         atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
                                  throws atg.svc.agent.environment.EnvironmentChangeDetailConflict,
                                         atg.svc.agent.environment.EnvironmentException
Adds a change detail for the sale price list with the given id.

Parameters:
pPriceListId -
pEnvironmentChangeState -
Throws:
atg.svc.agent.environment.EnvironmentChangeDetailConflict
atg.svc.agent.environment.EnvironmentException

addChangeSalePriceListDetail

public void addChangeSalePriceListDetail(atg.repository.RepositoryItem pPriceList,
                                         atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
                                  throws atg.svc.agent.environment.EnvironmentChangeDetailConflict,
                                         atg.svc.agent.environment.EnvironmentException
Adds a change detail for the given sale price list.

Parameters:
pPriceList -
pEnvironmentChangeState -
Throws:
atg.svc.agent.environment.EnvironmentChangeDetailConflict
atg.svc.agent.environment.EnvironmentException

getOrderHolder

public CSROrderHolder getOrderHolder()
Returns the current order holder

Returns:
OrderHolder

getCurrentOrder

public atg.commerce.order.Order getCurrentOrder()
Returns the current order

Returns:
Order

getCurrentReturnRequest

public ReturnRequest getCurrentReturnRequest()
Returns the current ReturnRequest.

Returns:
ReturnRequest

getViewOrderHolder

public ViewOrderHolder getViewOrderHolder()
Returns the current view order holder

Returns:
ViewOrderHolder

getViewOrder

public atg.commerce.order.Order getViewOrder()
Returns the view current order

Returns:
view order

setViewOrder

public void setViewOrder(atg.commerce.order.Order pViewOrder)
                  throws atg.svc.agent.environment.EnvironmentException
Sets the view order as the the current view order in the Environment

Parameters:
pViewOrder -
Throws:
atg.svc.agent.environment.EnvironmentException

invalidateViewOrder

public void invalidateViewOrder()
This method will invalidate the order in the view order holder.

This method can be used in cases where the same order was updated and you want to reflect the updates in the view.


getOriginalOrder

public atg.commerce.order.Order getOriginalOrder()
This method returns the original order if the holder is in clone edit mode. Otherwise is returns the current order.

Returns:
the current working order.

getCustomerPricingModels

public atg.commerce.pricing.PricingModelHolder getCustomerPricingModels()
Returns the customer pricing models

Returns:
PricingModelHolder

getPromotionWalletPricingModels

public atg.commerce.pricing.PricingModelHolder getPromotionWalletPricingModels()
Returns the promotion wallet pricing models

Returns:
PricingModelHolder

getSubmittedOrderPricingModels

public SubmittedOrderPricingModelHolder getSubmittedOrderPricingModels()
Returns the pricing model holder used for submitted orders

Returns:
SubmittedOrderPricingModelHolder

getExchangePricingModels

public atg.commerce.pricing.PricingModelHolder getExchangePricingModels()
Returns the pricing model holder used for pricing the exchange order during a return.

Returns:
PricingModelHolder

getCatalogTreeState

public atg.web.tree.TreeState getCatalogTreeState()
Returns the catalog tree state

Returns:
OrderHolder

getPurchaseProcessConfiguration

public atg.commerce.order.purchase.PurchaseProcessConfiguration getPurchaseProcessConfiguration()
Returns the purchase process configuration

Returns:
PurchaseProcessConfiguration

getCurrentOrderPricingModelHolder

public atg.commerce.pricing.PricingModelHolder getCurrentOrderPricingModelHolder()
Returns the correct pricing model holder for the current order based on its state.

If the current order is incomplete the standard customer pricing model holder is returned. Otherwise, the submitted order pricing model holder is returned.

Returns:
PricingModelHolder

getOrderPricingModelHolder

public atg.commerce.pricing.PricingModelHolder getOrderPricingModelHolder(atg.commerce.order.Order pOrder)
Returns either the standard customer pricing model holder or the submitted order pricing model holder based on the state of the given order.

Parameters:
pOrder -
Returns:
PricingModelHolder

getCurrentPriceList

public atg.repository.RepositoryItem getCurrentPriceList()
Returns the environment's current price list.

Returns:
the current active price list

setCurrentPriceList

public void setCurrentPriceList(atg.repository.RepositoryItem pPriceList)
Sets the current price list in global context by issuing an environment change request.

Parameters:
pPriceList - the new price list to be set in global context

getCurrentSalePriceList

public atg.repository.RepositoryItem getCurrentSalePriceList()
Returns the environment's current price list.

Returns:
the current active price list

setCurrentSalePriceList

public void setCurrentSalePriceList(atg.repository.RepositoryItem pPriceList)
Sets the current sale price list in global context by issuing an environment change request.

Parameters:
pPriceList - the new sale price list to be set in global context

getDefaultCatalog

protected atg.repository.RepositoryItem getDefaultCatalog()
                                                   throws atg.svc.agent.environment.EnvironmentException
Returns the default catalog from configuration.

Returns:
RepositoryItem
Throws:
atg.svc.agent.environment.EnvironmentException
See Also:
CSRConfigurator.getDefaultCatalogId()

getCurrentCatalog

public atg.repository.RepositoryItem getCurrentCatalog()
Returns the environment's current catalog.

Returns:
the current active catalog


setCurrentCatalog

public void setCurrentCatalog(atg.repository.RepositoryItem pCatalog)
Sets the current catalog in global context by issuing an environment change request.

Parameters:
pCatalog - the new catalog to be set in global context

initializeDefaultsForProfile

public void initializeDefaultsForProfile(atg.repository.MutableRepositoryItem pProfile)
                                  throws atg.svc.agent.environment.EnvironmentException
Set the default values for a new profile.

Sends an initialization jms event to the application can apply their business rules to the process.

The caller is responsible for transaction demarcation and calling updateItem on the profile.

Parameters:
pProfile - the profile item to initialize
Throws:
atg.svc.agent.environment.EnvironmentException

getPriceListFromOrder

public atg.repository.RepositoryItem getPriceListFromOrder(atg.commerce.order.Order pOrder)
Returns the price list from the order.

The price list from the first commerce item in the order is returned.

Parameters:
pOrder -
Returns:
price list item

getListPriceListFromOrder

public atg.repository.RepositoryItem getListPriceListFromOrder(atg.commerce.order.Order pOrder)
Returns the list price list from the order.

The price list is found by looking for a commerce item that is not on sale with a price list associated.

Parameters:
pOrder -
Returns:
price list item
See Also:
PricingTools.getListPriceListFromOrder(Order)

getSalePriceListFromOrder

public atg.repository.RepositoryItem getSalePriceListFromOrder(atg.commerce.order.Order pOrder)
Returns the sale price list from the order.

The price list from the first on sale commerce item in the order is returned. with a price list associated.

Parameters:
pOrder -
Returns:
price list item
See Also:
PricingTools.getSalePriceListFromOrder(Order)

createWarningsForCatalogSwitch

public java.util.List createWarningsForCatalogSwitch(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
Generates warnings for a change of catalog

Returns:
List of string warnings

createWarningsForPriceListSwitch

public java.util.List createWarningsForPriceListSwitch(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
Generates warnings for a change of price list

Returns:
Collection of string warnings

createWarningsForItemRemoves

protected java.util.Collection createWarningsForItemRemoves(atg.commerce.order.Order pOrder,
                                                            java.util.Collection pRemoveItems)
Creates a warning message for each item in the pRemoveItems collection.

Parameters:
pOrder -
pRemoveItems -
Returns:
collecton of warning messages

findItemsNotInPriceList

public java.util.Collection findItemsNotInPriceList(java.util.Collection pCommerceItems,
                                                    atg.repository.RepositoryItem pPriceList)
Finds the commerce items in the collection that cannot be priced using the provided price list.

Parameters:
pCommerceItems -
pPriceList -
Returns:
Collection of commerce items that couldn't be priced using the price list.

findItemsWithoutPrice

public java.util.Collection findItemsWithoutPrice(atg.commerce.order.Order pOrder,
                                                  atg.repository.RepositoryItem pListPriceList,
                                                  atg.repository.RepositoryItem pSalePriceList)
Returns commerce items in the order that cannot be using the given list price list and sale price list.

Parameters:
pOrder -
pListPriceList - the list price list
pSalePriceList - Optional sale price list
Returns:
items for which pricing failed

deleteItemsWithoutPrice

public boolean deleteItemsWithoutPrice(atg.commerce.order.Order pOrder)
                                throws atg.svc.agent.environment.EnvironmentException
Deletes item from the order that cannot be priced by either the current price list or sale price list.

The caller is responsible for transaction demarcation and calling updateOrder.

Parameters:
pOrder -
Returns:
true if items were deleted
Throws:
atg.svc.agent.environment.EnvironmentException

createWarningsForChangeOrder

public java.util.List createWarningsForChangeOrder(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
Generates warnings for a change of order

Parameters:
pEnvironmentChangeState -

createWarningsForCurrentOrder

protected java.util.List createWarningsForCurrentOrder()
Adds a warning for the current order if there are pending changes(to a submitted order) or if it's an unsaved new order with items in it.

Returns:
List of warnings

createWarningsForNewOrder

protected java.util.List createWarningsForNewOrder(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
Create warnings for the order that will be loaded for the change.

If price lists are in use and there's no price list changes included, the incoming order is checked to make sure all items in the order can be priced by the current price lists.

Parameters:
pEnvironmentChangeState -
Returns:
warnings

getOriginalOrder

public atg.commerce.order.Order getOriginalOrder(atg.commerce.order.Order pOrder)
If the given order is current in the cart and the cart is in clone edit mode, the original order is returned. Otherwise null.

Parameters:
pOrder -
Returns:
the original order is the given order is the current working clone.

initializeCustomerPricingModels

public void initializeCustomerPricingModels()
                                     throws atg.svc.agent.environment.EnvironmentException
Initializes the customer pricing models

Throws:
atg.svc.agent.environment.EnvironmentException

createNewOrder

public void createNewOrder(java.lang.String pApplicationName)
                    throws atg.svc.agent.environment.EnvironmentException
Creates a new order in the order holder.

Parameters:
pApplicationName - the application creating the new order in the environment
Throws:
atg.svc.agent.environment.EnvironmentException

changeOrder

public void changeOrder(java.lang.String pApplicationName,
                        java.lang.String pOrderId,
                        atg.svc.agent.environment.TicketDispositionOptions pTicketDispositionOptions)
                 throws atg.svc.agent.environment.EnvironmentException
Changes the environment's current order to the given order

Parameters:
pApplicationName -
pOrderId - id of the order to be loaded into the environment.
pTicketDispositionOptions - the options used to modify the disposition the currently active ticket if it needs to change when the order changes. This can be null to use the default handling behavior.
Throws:
atg.svc.agent.environment.EnvironmentException

changeOrder

public void changeOrder(java.lang.String pApplicationName,
                        atg.commerce.order.Order pOrder,
                        atg.svc.agent.environment.TicketDispositionOptions pTicketDispositionOptions)
                 throws atg.svc.agent.environment.EnvironmentException
Changes the environment's current order to the given order

Parameters:
pApplicationName -
pOrder - the order to be loaded into the environment.
pTicketDispositionOptions - the options used to modify the disposition the currently active ticket if it needs to change when the order changes. This can be null to use the default handling behavior.
Throws:
atg.svc.agent.environment.EnvironmentException

isCatalogExplicitlySetForCall

public boolean isCatalogExplicitlySetForCall()
This method gets the current site in the environment using EnvironmentTools.getCurrentSite() and calls isCatalogExplicitlySetForCall(Site).

Returns:
true if the catalog has been explicitly set by the agent for the current call.
See Also:
isCatalogExplicitlySetForCall(Site), EnvironmentTools.getCurrentSite()

isCatalogExplicitlySetForCall

public boolean isCatalogExplicitlySetForCall(atg.multisite.Site pSite)
Determines if the catalog has been explicitly set by the agent for the current call.

If the current call is active the explicit settings are saved in CallState.getStateDataMap(). The following keys are used to look up catalog entry based on multi site support.

If the CSRAgentTools.isMultiSiteEnabled() returns true, the explicit catalog settings are saved in CSREnvironmentConstants.CSR_CURRENT_CALL_EXPLICIT_SITE_ID_TO_CATALOG map. This method looks for the catalog entry in the map. If there is an entry for the pSite, then this method returns true. False otherwise.

If the CSRAgentTools.isMultiSiteEnabled() returns false, it is saved in the CSREnvironmentConstants.CSR_CURRENT_CALL_EXPLICIT_CATALOG. This method looks for a catalog value in the above key and if a catalog entry exists, then this method returns true. False otherwise.

Parameters:
pSite -
Returns:
true if the catalog has been explicitly set by the agent for the current call.

isPriceListExplicitlySetForCall

public boolean isPriceListExplicitlySetForCall()
Determines if the price list has been explicitly set by the agent for the current call.

Returns:
true if the price list has been explicitly set by the agent for the current call.

isSalePriceListExplicitlySetForCall

public boolean isSalePriceListExplicitlySetForCall()
Determines if the sale price list has been explicitly set by the agent for the current call.

Returns:
true if the sale price list has been explicitly set by the agent for the current call.

cleanCatalogTreeState

public void cleanCatalogTreeState(atg.web.tree.TreeState treeState)
Nulls properties of catalog navigation tree

Parameters:
treeState - tree state object

cleanPaymentGroupContainerService

public void cleanPaymentGroupContainerService()
When the environment changes are applied, there could be stale data in the PaymentGroupMapContainer. This method cleans any stale data. This method sets PaymentGroupMapContainer.setDefaultPaymentGroupName(String) to null.

Also this method removes all payment groups from the PaymentGroupMapContainer and cipi's from the CommerceIdentifierPaymentInfoContainer


changeViewOrder

public void changeViewOrder(java.lang.String pViewOrderId)
                     throws atg.svc.agent.environment.EnvironmentException
This method will change the current view order to the given order. The view profile is also changed to be the order's owner.

Parameters:
pViewOrderId -
Throws:
atg.svc.agent.environment.EnvironmentException

loadViewOrderAndProfile

public void loadViewOrderAndProfile(atg.commerce.order.Order pOrder)
                             throws atg.svc.agent.environment.EnvironmentException
Loads the given order into the view order holder and the order's owner into the view profile holder.

Parameters:
pOrder -
Throws:
atg.svc.agent.environment.EnvironmentException

getUserResource

public java.lang.String getUserResource(java.lang.String pKey,
                                        java.lang.Object[] pMsgArgs,
                                        java.util.Locale pLocale)
Returns a resource from the user resource bundle

Parameters:
pKey -
pMsgArgs - msg arguments
pLocale - the locale
Returns:
String

getServerResource

public java.lang.String getServerResource(java.lang.String pKey,
                                          java.lang.Object[] pMsgArgs)
Returns a resource from the server localized resource bundle

Parameters:
pKey -
pMsgArgs -
Returns:

isReturnExchange

public boolean isReturnExchange()
Returns true is the agent is currently working on a return or exchange


doSitesShare

public boolean doSitesShare(java.lang.String pSiteId1,
                            java.lang.String pSiteId2)
                     throws atg.svc.agent.environment.EnvironmentException
This is just a convenient method to compare two cart sharing sites.

This method calls SiteGroupManager.doSitesShare(String, String, String) to compare two given sites. If the two given sites share the same cart, this method true. Otherwise false.

Parameters:
pSiteId1 - The id of the first site to compare
pSiteId2 - The id of the second site to compare
Returns:
Throws:
atg.svc.agent.environment.EnvironmentException
See Also:
SiteGroupManager.doSitesShare(String, String, String), CSC supports only cart sharable type

getCurrentCatalogHolder

public CurrentCatalogHolder getCurrentCatalogHolder()
                                             throws atg.svc.agent.environment.EnvironmentException
This method resolves the CurrentCatalogHolder component and returns the same.

Returns:
Throws:
atg.svc.agent.environment.EnvironmentException

getUsersCatalog

public atg.repository.RepositoryItem getUsersCatalog(atg.repository.RepositoryItem pProfile,
                                                     atg.multisite.Site pSite)
                                              throws atg.svc.agent.environment.EnvironmentException
Returns a catalog.

The CustomCatalogTools.determineCatalog(RepositoryItem, RepositoryItem) is called to get the catalog. If the above method does not return any catalog, then the getDefaultCatalog() is used to return the application default catalog.

Parameters:
pProfile -
pSite -
Returns:
price list item
Throws:
atg.commerce.pricing.priceLists.PriceListException
atg.svc.agent.environment.EnvironmentException
See Also:
CustomCatalogTools.determineCatalog(RepositoryItem, RepositoryItem), getDefaultCatalog()

isSiteValidForEnvironment

public boolean isSiteValidForEnvironment(java.lang.String pSiteId)
                                  throws atg.svc.agent.environment.EnvironmentException
This method decides whether the site is valid for the environment or not.

If any of the following conditions is met, the site is invalid and this method returns false.

Parameters:
pSiteId -
Returns:
if site is valid returns true. Otherwise false.
Throws:
atg.multisite.SiteContextException
atg.svc.agent.environment.EnvironmentException
See Also:
SiteManager#isSiteActive(RepositoryItem)}, SiteContextManager.getSite(String)

getCatalogFromCallState

public atg.repository.RepositoryItem getCatalogFromCallState(java.lang.String pSiteId)
                                                      throws atg.svc.agent.environment.EnvironmentException
This method returns the site's catalog from the call state.

This method looks in the site to catalog map state data to find out if there is an explicit catalog selection for a site. if there is an explicit catalog selection for the site, then that catalog is returned.

Parameters:
pSiteId -
Returns:
Throws:
atg.svc.agent.environment.EnvironmentException

initializeShippingGroupContainerService

protected void initializeShippingGroupContainerService(atg.userprofiling.Profile pProfile,
                                                       atg.commerce.order.Order pOrder)
                                                throws atg.svc.agent.environment.EnvironmentException
This method is used to initialize ShippingGroupMapContainerService.

Parameters:
pProfile - if the profile is not null, then shipping groups are initialized from the profile
pOrder - if the order is not null, then shipping groups are initialized from the profile
Throws:
atg.svc.agent.environment.EnvironmentException
See Also:
CommerceItemShippingInfoTools#clearShippingGroups(CommerceItemShippingInfoContainer, ShippingGroupMapContainer)}, CommerceItemShippingInfoTools.clearCommerceItemShippingInfos(CommerceItemShippingInfoContainer, ShippingGroupMapContainer), CommerceItemShippingInfoTools.initializeUserShippingMethods(ShippingGroupMapContainer, Profile, String[], Map), CommerceItemShippingInfoTools.initializeBasedOnOrder(Order, CommerceItemShippingInfoContainer, ShippingGroupMapContainer, Collection, boolean), CommerceItemShippingInfoTools.removeDeletedShippingGroups(ShippingGroupMapContainer)

shouldInitializePricingModelHolder

protected boolean shouldInitializePricingModelHolder(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
                                              throws atg.svc.agent.environment.EnvironmentException
This method decides whether the pricing model holder needs to be initialized based on the changes being made to the environment.

This method returns true if either the order or user is being changed in the environment.

Parameters:
pEnvironmentChangeState -
Returns:
if the pricing model holder should be initialized, returns true. Otherwise false.
Throws:
atg.svc.agent.environment.EnvironmentException