|
|||||||||
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.csr.environment.CSREnvironmentTools
public class CSREnvironmentTools
This class provides util API for managing the CSR environment.
It publicly defines the names used for CSR environment objects and the environment change keys handled by the CSR application.
Field Summary | |
---|---|
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 |
protected atg.commerce.catalog.CatalogTools |
mCatalogTools
|
protected CSRAgentTools |
mCSRAgentTools
|
protected java.lang.String |
mCSRApplicationName
|
protected atg.svc.agent.environment.EnvironmentTools |
mEnvironmentTools
|
protected atg.commerce.pricing.priceLists.PriceListManager |
mPriceListManager
|
protected static java.lang.String |
MY_RESOURCES
|
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 |
protected java.util.ResourceBundle |
sBundle
|
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(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. |
protected void |
addChangePriceListDetail(atg.repository.RepositoryItem pPriceList,
atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
Adds a change detail for the given price list. |
protected 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 |
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 |
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. |
java.util.List |
createWarningsForPriceListSwitch(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
Generates warnings for a change of price list |
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. |
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.commerce.catalog.CatalogTools |
getCatalogTools()
|
CSRAgentTools |
getCSRAgentTools()
|
java.lang.String |
getCSRApplicationName()
|
atg.repository.RepositoryItem |
getCurrentCatalog()
Returns the environment's current catalog. |
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. |
atg.commerce.pricing.PricingModelHolder |
getCustomerPricingModels()
Returns the customer pricing models |
atg.svc.agent.environment.EnvironmentTools |
getEnvironmentTools()
|
static CSREnvironmentTools |
getInstance()
Returns the global CSREnvironmentTools component by resolving it from the current request. |
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.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()
|
SubmittedOrderPricingModelHolder |
getSubmittedOrderPricingModels()
Returns the pricing model holder used for submitted orders |
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. |
boolean |
isCatalogExplicitlySetForCall()
Determines if the catalog has been explicity 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. |
boolean |
isPriceListExplicitlySetForCall()
Determines if the price list has been explicity set by the agent for the current call. |
void |
setCatalogTools(atg.commerce.catalog.CatalogTools pCatalogTools)
Sets the catalog tools component |
void |
setCSRAgentTools(CSRAgentTools pCSRAgentTools)
Sets the property CSRAgentTools. |
void |
setCSRApplicationName(java.lang.String pCSRApplicationName)
|
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 |
setEnvironmentTools(atg.svc.agent.environment.EnvironmentTools pEnvironmentTools)
Sets the EnvironmentTools |
void |
setPriceListManager(atg.commerce.pricing.priceLists.PriceListManager pPriceListManager)
Sets the Price List Manager |
void |
setTestCatalog()
|
void |
setViewOrder(atg.commerce.order.Order pViewOrder)
Sets the view order as the the current view order in the Environment |
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 java.lang.String CLASS_VERSION
public static final java.lang.String CSR_APP_NAME
public static final java.lang.String CSR_ENVIRONMENTTOOLS_PATH
public static final java.lang.String ORDER_HOLDER_PATH
public static final java.lang.String VIEW_ORDER_HOLDER_PATH
public static final java.lang.String PRICING_MODEL_PATH
public static final java.lang.String SUBMITTED_ORDER_PRICING_MODEL_PATH
protected static final java.lang.String MY_RESOURCES
protected final java.util.ResourceBundle sBundle
protected java.lang.String mCSRApplicationName
protected atg.svc.agent.environment.EnvironmentTools mEnvironmentTools
protected atg.commerce.pricing.priceLists.PriceListManager mPriceListManager
protected atg.commerce.catalog.CatalogTools mCatalogTools
protected CSRAgentTools mCSRAgentTools
Constructor Detail |
---|
public CSREnvironmentTools()
Method Detail |
---|
public static CSREnvironmentTools getInstance()
public java.lang.String getCSRApplicationName()
public void setCSRApplicationName(java.lang.String pCSRApplicationName)
public void setEnvironmentTools(atg.svc.agent.environment.EnvironmentTools pEnvironmentTools)
pEnvironmentTools
- the EnvironmentTools in Servicepublic atg.svc.agent.environment.EnvironmentTools getEnvironmentTools()
public void setPriceListManager(atg.commerce.pricing.priceLists.PriceListManager pPriceListManager)
pPriceListManager
- the Price List Managerpublic atg.commerce.pricing.priceLists.PriceListManager getPriceListManager()
public void setCatalogTools(atg.commerce.catalog.CatalogTools pCatalogTools)
pCatalogTools
- the catalog tools componentpublic atg.commerce.catalog.CatalogTools getCatalogTools()
public void setCSRAgentTools(CSRAgentTools pCSRAgentTools)
public CSRAgentTools getCSRAgentTools()
public boolean isNewOrderDetail(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
pEnvironmentChangeState
-
public atg.svc.agent.environment.EnvironmentChangeDetail getOrderDetail(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
pEnvironmentChangeState
-
public atg.svc.agent.environment.EnvironmentChangeDetail getPriceListDetail(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
pEnvironmentChangeState
-
public atg.svc.agent.environment.EnvironmentChangeDetail getCatalogDetail(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
pEnvironmentChangeState
-
public java.lang.String getOrderChangeId(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
public void addNewOrderDetail(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState) throws atg.svc.agent.environment.EnvironmentChangeDetailConflict, atg.svc.agent.environment.EnvironmentException
pEnvironmentChangeState
-
atg.svc.agent.environment.EnvironmentChangeDetailConflict
atg.svc.agent.environment.EnvironmentException
public void addChangeOrderDetail(java.lang.String pOrderId, atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState) throws atg.svc.agent.environment.EnvironmentChangeDetailConflict, atg.svc.agent.environment.EnvironmentException
pOrderId
- pEnvironmentChangeState
-
atg.svc.agent.environment.EnvironmentChangeDetailConflict
atg.svc.agent.environment.EnvironmentException
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
pOrder
- pEnvironmentChangeState
-
atg.svc.agent.environment.EnvironmentChangeDetailConflict
atg.svc.agent.environment.EnvironmentException
protected void addChangeCatalogDetail(java.lang.String pCatalogId, atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState) throws atg.svc.agent.environment.EnvironmentChangeDetailConflict, atg.svc.agent.environment.EnvironmentException
pCatalogId
- pEnvironmentChangeState
-
atg.svc.agent.environment.EnvironmentChangeDetailConflict
atg.svc.agent.environment.EnvironmentException
protected void addChangePriceListDetail(java.lang.String pPriceListId, atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState) throws atg.svc.agent.environment.EnvironmentChangeDetailConflict, atg.svc.agent.environment.EnvironmentException
pPriceListId
- pEnvironmentChangeState
-
atg.svc.agent.environment.EnvironmentChangeDetailConflict
atg.svc.agent.environment.EnvironmentException
protected void addChangePriceListDetail(atg.repository.RepositoryItem pPriceList, atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState) throws atg.svc.agent.environment.EnvironmentChangeDetailConflict, atg.svc.agent.environment.EnvironmentException
pPriceList
- pEnvironmentChangeState
-
atg.svc.agent.environment.EnvironmentChangeDetailConflict
atg.svc.agent.environment.EnvironmentException
public CSROrderHolder getOrderHolder()
public atg.commerce.order.Order getCurrentOrder()
public ViewOrderHolder getViewOrderHolder()
public atg.commerce.order.Order getViewOrder()
public void setViewOrder(atg.commerce.order.Order pViewOrder) throws atg.svc.agent.environment.EnvironmentException
pViewOrder
-
atg.svc.agent.environment.EnvironmentException
public atg.commerce.order.Order getOriginalOrder()
public atg.commerce.pricing.PricingModelHolder getCustomerPricingModels()
public SubmittedOrderPricingModelHolder getSubmittedOrderPricingModels()
public atg.commerce.pricing.PricingModelHolder getCurrentOrderPricingModelHolder()
If the current order is incomplete the standard customer pricing model holder is returned. Otherwise, the submitted order pricing model holder is returned.
public atg.repository.RepositoryItem getCurrentPriceList()
public void setCurrentPriceList(atg.repository.RepositoryItem pPriceList)
pPriceList
- the new price list to be set in global contextpublic atg.repository.RepositoryItem getCurrentCatalog()
public void setCurrentCatalog(atg.repository.RepositoryItem pCatalog)
pCatalog
- the new catalog to be set in global contextpublic void initializeDefaultsForProfile(atg.repository.MutableRepositoryItem pProfile) throws atg.svc.agent.environment.EnvironmentException
Sends an initialization jms event to the application can apply their business rules to the process.
Sets the default catalog and price list, if those features are enabled in the CSRConfigurator and they haven't already been set.
The caller is responsible for transaction demarcation and calling updateItem on the profile.
pProfile
- the profile item to initialize
atg.svc.agent.environment.EnvironmentException
public atg.repository.RepositoryItem getPriceListFromOrder(atg.commerce.order.Order pOrder)
The price list from the first commerce item in the order is returned.
pOrder
-
public java.util.List createWarningsForCatalogSwitch(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
public java.util.List createWarningsForPriceListSwitch(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
public java.util.Collection findItemsNotInPriceList(java.util.Collection pCommerceItems, atg.repository.RepositoryItem pPriceList)
pCommerceItems
- pPriceList
-
public java.util.List createWarningsForChangeOrder(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
pEnvironmentChangeState
- protected java.util.List createWarningsForCurrentOrder()
public atg.commerce.order.Order getOriginalOrder(atg.commerce.order.Order pOrder)
pOrder
-
public void initializeCustomerPricingModels() throws atg.svc.agent.environment.EnvironmentException
atg.svc.agent.environment.EnvironmentException
public void createNewOrder(java.lang.String pApplicationName) throws atg.svc.agent.environment.EnvironmentException
pApplicationName
- the application creating the new order in the environment
atg.svc.agent.environment.EnvironmentException
public void changeOrder(java.lang.String pApplicationName, java.lang.String pOrderId, atg.svc.agent.environment.TicketDispositionOptions pTicketDispositionOptions) throws atg.svc.agent.environment.EnvironmentException
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.
atg.svc.agent.environment.EnvironmentException
public void changeOrder(java.lang.String pApplicationName, atg.commerce.order.Order pOrder, atg.svc.agent.environment.TicketDispositionOptions pTicketDispositionOptions) throws atg.svc.agent.environment.EnvironmentException
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.
atg.svc.agent.environment.EnvironmentException
public boolean isCatalogExplicitlySetForCall()
public boolean isPriceListExplicitlySetForCall()
public void setTestCatalog()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |