|
|||||||||
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.svc.agent.environment.EnvironmentMonitor
atg.commerce.csr.environment.CSREnvironmentMonitor
public class CSREnvironmentMonitor
This monitor handles changes to CSR environment objects.
It handles changes to the order, catalog and price list.
Field Summary | |
---|---|
static java.lang.String |
CLASS_VERSION
Class version string |
static java.lang.String |
CURRENT_CATALOG_HOLDER_PATH
The path to the environment's current catalog component |
static java.lang.String |
CURRENT_PRICELIST_HOLDER_PATH
The path to the environment's current price list component |
protected atg.commerce.profile.CommercePropertyManager |
mCommercePropertyManager
|
protected CSREnvironmentTools |
mCSREnvironmentTools
|
protected static java.lang.String |
MY_RESOURCES
|
protected java.util.ResourceBundle |
sBundle
|
Fields inherited from class atg.svc.agent.environment.EnvironmentMonitor |
---|
mEnvironmentTools |
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 | |
---|---|
CSREnvironmentMonitor()
|
Method Summary | |
---|---|
void |
applyActiveCustomerChangeDetail(atg.svc.agent.environment.EnvironmentChangeDetail pEnvironmentChangeDetail,
atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
Applies changes related to a current customer change. |
void |
applyCatalogChangeDetail(atg.svc.agent.environment.EnvironmentChangeDetail pEnvironmentChangeDetail,
atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
Changes the environment's current catalog based on the change detail. |
void |
applyChanges(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
This method applies changes that this monitor is responsible for. |
void |
applyOrderChangeDetail(atg.svc.agent.environment.EnvironmentChangeDetail pEnvironmentChangeDetail,
atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
Changes the current order based on the change detail. |
void |
applyPriceListChangeDetail(atg.svc.agent.environment.EnvironmentChangeDetail pEnvironmentChangeDetail,
atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
Changes the environment's current price list based on the change detail. |
void |
changeOrderOwner(atg.commerce.order.Order pOrder,
atg.repository.RepositoryItem pNewOwner)
Changes the order owner of the order. |
protected boolean |
compareCurrentCatalog(java.lang.String pCatalogId)
Compares the environment's current catalog to the catalog id provided. |
protected boolean |
compareCurrentPriceList(java.lang.String pPriceListId)
Compares the environment current price list to the price list id provided. |
void |
createWarningsForEnvironmentChange(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
Creates the warnings related to CSR environment changes |
protected void |
generateChangeDetailsForChangeKey(java.lang.String pChangeKey,
atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
This method is called to generate change details for the given change key. |
protected void |
generateDependentChangeDetails(atg.svc.agent.environment.EnvironmentChangeDetail pEnvironmentChangeDetail,
atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
This method is called to generate change details that are dependent on the given EnvironmentChangeDetail |
protected void |
generateDependentDetailsForActiveCustomerChange(atg.svc.agent.environment.EnvironmentChangeDetail pEnvironmentChangeDetail,
atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
Generates change details that result from a change of ative profile. |
protected void |
generateDependentDetailsForOrderChange(atg.svc.agent.environment.EnvironmentChangeDetail pEnvironmentChangeDetail,
atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState)
Generates change details that result from a change of order. |
atg.commerce.profile.CommercePropertyManager |
getCommercePropertyManager()
|
CSREnvironmentTools |
getCSREnvironmentTools()
|
atg.repository.RepositoryItem |
getCurrentCatalog()
Returns the environment's current catalog. |
atg.commerce.order.Order |
getCurrentOrder()
Returns the current order |
atg.repository.RepositoryItem |
getCurrentPriceList()
Returns the environment's current price list. |
java.lang.Object |
getEnvironmentObject(java.lang.String pEnvironmentObjectName)
returns the environment objects managed by the CSR application. |
protected atg.repository.RepositoryItem |
getUsersCatalog(atg.repository.RepositoryItem pProfile)
Returns a profile's assigned catalog. |
protected atg.repository.RepositoryItem |
getUsersPriceList(atg.repository.RepositoryItem pProfile)
Returns a profile's price list by calling the PriceListManager. |
void |
initializeDefaultsForProfile(atg.repository.MutableRepositoryItem pProfile)
|
void |
initializeNewOrderInCart()
Creates a new order and makes it current in the agent's window state order holder |
protected boolean |
isOwnerChangeable(atg.commerce.order.Order pOrder,
atg.repository.RepositoryItem pNewOwnerProfile)
Determines if an order may have the new owner assigned. |
void |
setCommercePropertyManager(atg.commerce.profile.CommercePropertyManager pCommercePropertyManager)
Sets the component that defines properties of the profile for Commerce |
void |
setCSREnvironmentTools(CSREnvironmentTools pCSREnvironmentTools)
Sets the property CSREnvironmentTools. |
void |
setCurrentCatalog(atg.repository.RepositoryItem pCatalog)
sets the current catalog in the environment |
void |
setCurrentOrder(atg.commerce.order.Order pOrder)
Sets the order as the the current working order in the Environment |
void |
setCurrentPriceList(atg.repository.RepositoryItem pPriceList)
sets the current price list in the environment |
Methods inherited from class atg.svc.agent.environment.EnvironmentMonitor |
---|
generateChangeDetails, getEnvironmentTools, postApplyChanges, preApplyChanges, setEnvironmentTools |
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
protected static final java.lang.String MY_RESOURCES
protected final java.util.ResourceBundle sBundle
public static final java.lang.String CURRENT_PRICELIST_HOLDER_PATH
public static final java.lang.String CURRENT_CATALOG_HOLDER_PATH
protected atg.commerce.profile.CommercePropertyManager mCommercePropertyManager
protected CSREnvironmentTools mCSREnvironmentTools
Constructor Detail |
---|
public CSREnvironmentMonitor()
Method Detail |
---|
public void setCommercePropertyManager(atg.commerce.profile.CommercePropertyManager pCommercePropertyManager)
pCommercePropertyManager
- the component that defines properties of the profile for Commercepublic atg.commerce.profile.CommercePropertyManager getCommercePropertyManager()
public void setCSREnvironmentTools(CSREnvironmentTools pCSREnvironmentTools)
public CSREnvironmentTools getCSREnvironmentTools()
public void initializeDefaultsForProfile(atg.repository.MutableRepositoryItem pProfile) throws atg.svc.agent.environment.EnvironmentException
initializeDefaultsForProfile
in class atg.svc.agent.environment.EnvironmentMonitor
atg.svc.agent.environment.EnvironmentException
protected void generateChangeDetailsForChangeKey(java.lang.String pChangeKey, atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState) throws atg.svc.agent.environment.EnvironmentChangeDetailConflict, atg.svc.agent.environment.EnvironmentException
This implementation adds details for the following change keys:
generateChangeDetailsForChangeKey
in class atg.svc.agent.environment.EnvironmentMonitor
pChangeKey
- pEnvironmentChangeState
-
atg.svc.agent.environment.EnvironmentChangeDetailConflict
atg.svc.agent.environment.EnvironmentException
ServiceEnvironmentConstants.ENV_CHG_START_NEW_CALL
,
ServiceEnvironmentConstants.ENV_INITIALIZE
,
CSREnvironmentConstants.ENV_CHG_ORDER
,
CSREnvironmentConstants.ENV_CHG_CREATE_NEW_ORDER
,
CSREnvironmentConstants.ENV_CHG_CATALOG_AND_PRICELIST
protected void generateDependentDetailsForOrderChange(atg.svc.agent.environment.EnvironmentChangeDetail pEnvironmentChangeDetail, atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState) throws atg.svc.agent.environment.EnvironmentChangeDetailConflict, atg.svc.agent.environment.EnvironmentException
pEnvironmentChangeDetail
- pEnvironmentChangeState
-
atg.svc.agent.environment.EnvironmentChangeDetailConflict
atg.svc.agent.environment.EnvironmentException
protected void generateDependentDetailsForActiveCustomerChange(atg.svc.agent.environment.EnvironmentChangeDetail pEnvironmentChangeDetail, atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState) throws atg.svc.agent.environment.EnvironmentChangeDetailConflict, atg.svc.agent.environment.EnvironmentException
pEnvironmentChangeDetail
- pEnvironmentChangeState
-
atg.svc.agent.environment.EnvironmentChangeDetailConflict
atg.svc.agent.environment.EnvironmentException
protected void generateDependentChangeDetails(atg.svc.agent.environment.EnvironmentChangeDetail pEnvironmentChangeDetail, atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState) throws atg.svc.agent.environment.EnvironmentChangeDetailConflict, atg.svc.agent.environment.EnvironmentException
generateDependentChangeDetails
in class atg.svc.agent.environment.EnvironmentMonitor
pEnvironmentChangeDetail
- pEnvironmentChangeState
-
atg.svc.agent.environment.EnvironmentChangeDetailConflict
atg.svc.agent.environment.EnvironmentException
generateDependentDetailsForOrderChange(EnvironmentChangeDetail, EnvironmentChangeState)
,
generateDependentDetailsForActiveCustomerChange(EnvironmentChangeDetail, EnvironmentChangeState)
public void createWarningsForEnvironmentChange(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState) throws atg.svc.agent.environment.EnvironmentException
createWarningsForEnvironmentChange
in class atg.svc.agent.environment.EnvironmentMonitor
atg.svc.agent.environment.EnvironmentException
CSREnvironmentTools.createWarningsForPriceListSwitch(EnvironmentChangeState)
,
CSREnvironmentTools.createWarningsForCatalogSwitch(EnvironmentChangeState)
,
CSREnvironmentTools.createWarningsForChangeOrder(EnvironmentChangeState)
public void applyChanges(atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState) throws atg.svc.agent.environment.EnvironmentException
applyChanges
in class atg.svc.agent.environment.EnvironmentMonitor
atg.svc.agent.environment.EnvironmentException
applyOrderChangeDetail(EnvironmentChangeDetail, EnvironmentChangeState)
,
applyCatalogChangeDetail(EnvironmentChangeDetail, EnvironmentChangeState)
,
applyPriceListChangeDetail(EnvironmentChangeDetail, EnvironmentChangeState)
public void applyActiveCustomerChangeDetail(atg.svc.agent.environment.EnvironmentChangeDetail pEnvironmentChangeDetail, atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState) throws atg.svc.agent.environment.EnvironmentException
Reinitializes the environment's pricing models.
Changes the current order's owner if there isn't a change order detail in the environment change state.
pEnvironmentChangeDetail
- pEnvironmentChangeState
-
atg.svc.agent.environment.EnvironmentException
public void applyOrderChangeDetail(atg.svc.agent.environment.EnvironmentChangeDetail pEnvironmentChangeDetail, atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState) throws atg.svc.agent.environment.EnvironmentException
pEnvironmentChangeDetail
- pEnvironmentChangeState
-
atg.svc.agent.environment.EnvironmentException
public void applyPriceListChangeDetail(atg.svc.agent.environment.EnvironmentChangeDetail pEnvironmentChangeDetail, atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState) throws atg.svc.agent.environment.EnvironmentException
Items in the current order that cannot be priced using the new price list are removed.
pEnvironmentChangeDetail
- pEnvironmentChangeState
-
atg.svc.agent.environment.EnvironmentException
public void applyCatalogChangeDetail(atg.svc.agent.environment.EnvironmentChangeDetail pEnvironmentChangeDetail, atg.svc.agent.environment.EnvironmentChangeState pEnvironmentChangeState) throws atg.svc.agent.environment.EnvironmentException
pEnvironmentChangeDetail
- pEnvironmentChangeState
-
atg.svc.agent.environment.EnvironmentException
protected boolean isOwnerChangeable(atg.commerce.order.Order pOrder, atg.repository.RepositoryItem pNewOwnerProfile)
True is returned if the order is incomplete.
pOrder
- the orderpNewOwnerProfile
- repository item representing the potential new owner of the order. This
can be null.
public void setCurrentOrder(atg.commerce.order.Order pOrder) throws atg.svc.agent.environment.EnvironmentException
pOrder
-
atg.svc.agent.environment.EnvironmentException
public atg.repository.RepositoryItem getCurrentPriceList() throws atg.svc.agent.environment.EnvironmentException
If it hasn't been set already, it is set to the price list manager's default price list.
atg.svc.agent.environment.EnvironmentException
PriceListManager.getDefaultPriceList()
public void setCurrentPriceList(atg.repository.RepositoryItem pPriceList) throws atg.svc.agent.environment.EnvironmentException
pPriceList
-
atg.svc.agent.environment.EnvironmentException
public atg.repository.RepositoryItem getCurrentCatalog() throws atg.svc.agent.environment.EnvironmentException
If it isn't set yet, it is set to the default catalog specified by
the CSRConfigurator
.
atg.svc.agent.environment.EnvironmentException
CSRConfigurator.getDefaultCatalogId()
public void setCurrentCatalog(atg.repository.RepositoryItem pCatalog) throws atg.svc.agent.environment.EnvironmentException
pPriceList
-
atg.svc.agent.environment.EnvironmentException
public atg.commerce.order.Order getCurrentOrder()
public void initializeNewOrderInCart() throws atg.svc.agent.environment.EnvironmentException
atg.svc.agent.environment.EnvironmentException
protected boolean compareCurrentCatalog(java.lang.String pCatalogId)
pCatalogId
-
protected boolean compareCurrentPriceList(java.lang.String pPriceListId)
pPriceListId
-
protected atg.repository.RepositoryItem getUsersCatalog(atg.repository.RepositoryItem pProfile)
pProfile
-
atg.commerce.pricing.priceLists.PriceListException
public void changeOrderOwner(atg.commerce.order.Order pOrder, atg.repository.RepositoryItem pNewOwner)
pOrder
- the order to changepNewOwner
- the new ownerprotected atg.repository.RepositoryItem getUsersPriceList(atg.repository.RepositoryItem pProfile) throws atg.commerce.pricing.priceLists.PriceListException
pProfile
-
atg.commerce.pricing.priceLists.PriceListException
PriceListManager.getPriceList(RepositoryItem, String)
public java.lang.Object getEnvironmentObject(java.lang.String pEnvironmentObjectName) throws atg.svc.agent.environment.EnvironmentException
getEnvironmentObject
in class atg.svc.agent.environment.EnvironmentMonitor
atg.svc.agent.environment.EnvironmentException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |