atg.commerce.csr.util
Class CSRConfigurator

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.commerce.csr.util.CSRConfigurator
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 CSRConfigurator
extends atg.nucleus.GenericService

This class is used to maintain global configuration values for the CSR application.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string
protected  CommerceTypeConfiguration[] mPaymentGroupTypeConfigurations
           
protected  java.util.Map mPaymentGroupTypeConfigurationsAsMap
           
protected  java.lang.String mPaymentGroupTypesToBeInitialized
           
protected  CommerceTypeConfiguration[] mShippingGroupTypeConfigurations
           
protected  java.util.Map mShippingGroupTypeConfigurationsAsMap
           
protected  java.lang.String mShippingGroupTypesToBeInitialized
           
protected  boolean mUsingScheduledOrders
           
 
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
CSRConfigurator()
           
 
Method Summary
protected  java.util.Map convertArraysToMapByType(CommerceTypeConfiguration[] pTypeConfigurations)
          This method converts an array into Map.
 atg.commerce.catalog.CatalogTools getCatalogTools()
          Returns The catalog tools
 java.lang.String getContextRoot()
          Returns the contextRoot
 java.lang.String getDefaultCatalogId()
          Returns the catalog that's assigned whenever a new anonymous user profile is created and custom catalog is enabled in the CSRConfigurator
 int getMaximumAlmostQualifiedForPromotionsInShortList()
           
 CommerceTypeConfiguration[] getPaymentGroupTypeConfigurations()
          Returns the paymentGroupTypeConfigurations This property is used to configure all payment group type configurations.
 java.util.Map getPaymentGroupTypeConfigurationsAsMap()
          Returns the paymentGroupTypeConfigurationsAsMap This method converts getPaymentGroupTypeConfigurations() into a map.
 java.lang.String getPaymentGroupTypesToBeInitialized()
          Returns the paymentGroupTypesToBeInitialized This property is used to provide list of payment group types to be initialized by the PaymentGroupDroplet.
 int getQuantityInputTagMaxlength()
          Item quantity input tag's 'maxlength' attribute
 int getQuantityInputTagSize()
          Item quantity input tag's 'size' attribute
 CommerceTypeConfiguration[] getShippingGroupTypeConfigurations()
          Returns the shippingGroupTypeConfigurations This property is used to configure all shipping group type configurations.
 java.util.Map getShippingGroupTypeConfigurationsAsMap()
          Returns the shippingGroupTypeConfigurationsAsMap This method converts getShippingGroupTypeConfigurations() into a map.
 java.lang.String getShippingGroupTypesToBeInitialized()
          Returns the shippingGroupTypesToBeInitialized This property is used to provide list of shipping group types to be initialized by the ShippingGroupDroplet.
 boolean isCustomCatalogs()
          Returns boolean indicating if custom catalogs are in use
 boolean isProcessReturnRequestImmediately()
          The default value is false.
 boolean isUsingPriceLists()
          Returns boolean indicating whether price lists are being used
 boolean isUsingSalePriceLists()
          Returns boolean indicating whether a sale price list is being used
 boolean isUsingScheduledOrders()
          This flag determines if scheduled order features show up in the UI.
 void setCatalogTools(atg.commerce.catalog.CatalogTools pCatalogTools)
          Sets catalogTools
 void setContextRoot(java.lang.String pContextRoot)
          Sets the contextRoot
 void setCustomCatalogs(boolean pCustomCatalogs)
          boolean indicating if custom catalogs are in use
 void setDefaultCatalogId(java.lang.String pDefaultCatalogId)
          This catalog is assigned whenever a new anonymous user profile is created and custom catalog is enabled in the CSRConfigurator.
 void setMaximumAlmostQualifiedForPromotionsInShortList(int pMax)
           
 void setPaymentGroupTypeConfigurations(CommerceTypeConfiguration[] pPaymentGroupTypeConfigurations)
          Sets the paymentGroupTypeConfigurations This property is used to configure all payment group type configurations.
 void setPaymentGroupTypesToBeInitialized(java.lang.String pPaymentGroupTypesToBeInitialized)
          Sets the paymentGroupTypesToBeInitialized This property is used to provide list of payment group types to be initialized by the PaymentGroupDroplet.
 void setProcessReturnRequestImmediately(boolean pProcessReturnRequestImmediately)
          The default value is false.
 void setQuantityInputTagMaxlength(int pMax)
          Item quantity input tag's 'maxlength' attribute
 void setQuantityInputTagSize(int pSize)
          Item quantity input tag's 'size' attribute
 void setShippingGroupTypeConfigurations(CommerceTypeConfiguration[] pShippingGroupTypeConfigurations)
          Sets the shippingGroupTypeConfigurations This property is used to configure all shipping group type configurations.
 void setShippingGroupTypesToBeInitialized(java.lang.String pShippingGroupTypesToBeInitialized)
          Sets the shippingGroupTypesToBeInitialized This property is used to provide list of shipping group types to be initialized by the ShippingGroupDroplet.
 void setUsingPriceLists(boolean pUsingPriceLists)
          Sets boolean indicating whether price lists are being used
 void setUsingSalePriceLists(boolean pUsingSalePriceLists)
          Sets boolean indicating whether a sale price list is being used
 void setUsingScheduledOrders(boolean pUsingScheduledOrders)
           
 
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

CLASS_VERSION

public static java.lang.String CLASS_VERSION
Class version string


mUsingScheduledOrders

protected boolean mUsingScheduledOrders

mShippingGroupTypesToBeInitialized

protected java.lang.String mShippingGroupTypesToBeInitialized

mShippingGroupTypeConfigurations

protected CommerceTypeConfiguration[] mShippingGroupTypeConfigurations

mShippingGroupTypeConfigurationsAsMap

protected java.util.Map mShippingGroupTypeConfigurationsAsMap

mPaymentGroupTypesToBeInitialized

protected java.lang.String mPaymentGroupTypesToBeInitialized

mPaymentGroupTypeConfigurations

protected CommerceTypeConfiguration[] mPaymentGroupTypeConfigurations

mPaymentGroupTypeConfigurationsAsMap

protected java.util.Map mPaymentGroupTypeConfigurationsAsMap
Constructor Detail

CSRConfigurator

public CSRConfigurator()
Method Detail

isUsingScheduledOrders

public boolean isUsingScheduledOrders()
This flag determines if scheduled order features show up in the UI.

Returns:
boolean

setUsingScheduledOrders

public void setUsingScheduledOrders(boolean pUsingScheduledOrders)

isProcessReturnRequestImmediately

public boolean isProcessReturnRequestImmediately()
The default value is false. This falg is used to process the return request immediately or wait for the full return. Returns the processReturnRequestImmediately.

Returns:
processReturnRequestImmediately

setProcessReturnRequestImmediately

public void setProcessReturnRequestImmediately(boolean pProcessReturnRequestImmediately)
The default value is false. This falg is used to process the return request immediately or wait for the full return. Sets the processReturnRequestImmediately.

Parameters:
pProcessReturnRequestImmediately -

setCatalogTools

public void setCatalogTools(atg.commerce.catalog.CatalogTools pCatalogTools)
Sets catalogTools

Parameters:
pCatalogTools - the catalog tools

getCatalogTools

public atg.commerce.catalog.CatalogTools getCatalogTools()
Returns The catalog tools


setCustomCatalogs

public void setCustomCatalogs(boolean pCustomCatalogs)
boolean indicating if custom catalogs are in use

Parameters:
pCustomCatalogs - boolean indicating if custom catalogs are in use

isCustomCatalogs

public boolean isCustomCatalogs()
Returns boolean indicating if custom catalogs are in use


setUsingPriceLists

public void setUsingPriceLists(boolean pUsingPriceLists)
Sets boolean indicating whether price lists are being used

Parameters:
pUsingPriceLists - boolean indicating whether price lists are being used

isUsingPriceLists

public boolean isUsingPriceLists()
Returns boolean indicating whether price lists are being used


setUsingSalePriceLists

public void setUsingSalePriceLists(boolean pUsingSalePriceLists)
Sets boolean indicating whether a sale price list is being used

Parameters:
pUsingSalePriceLists - boolean indicating whether a sale price list is being used

isUsingSalePriceLists

public boolean isUsingSalePriceLists()
Returns boolean indicating whether a sale price list is being used


setContextRoot

public void setContextRoot(java.lang.String pContextRoot)
Sets the contextRoot

Parameters:
pContextRoot - the context root

getContextRoot

public java.lang.String getContextRoot()
Returns the contextRoot


setDefaultCatalogId

public void setDefaultCatalogId(java.lang.String pDefaultCatalogId)
This catalog is assigned whenever a new anonymous user profile is created and custom catalog is enabled in the CSRConfigurator.

Parameters:
pDefaultCatalogId - the custom catalog id

getDefaultCatalogId

public java.lang.String getDefaultCatalogId()
Returns the catalog that's assigned whenever a new anonymous user profile is created and custom catalog is enabled in the CSRConfigurator


getMaximumAlmostQualifiedForPromotionsInShortList

public int getMaximumAlmostQualifiedForPromotionsInShortList()
Returns:
The maximum number of nearly qualified for promotions to display in a short list

setMaximumAlmostQualifiedForPromotionsInShortList

public void setMaximumAlmostQualifiedForPromotionsInShortList(int pMax)
Parameters:
pMax - The maximum number of nearly qualified for promotions to display in a short list

getQuantityInputTagSize

public int getQuantityInputTagSize()
Item quantity input tag's 'size' attribute


setQuantityInputTagSize

public void setQuantityInputTagSize(int pSize)
Item quantity input tag's 'size' attribute


getQuantityInputTagMaxlength

public int getQuantityInputTagMaxlength()
Item quantity input tag's 'maxlength' attribute


setQuantityInputTagMaxlength

public void setQuantityInputTagMaxlength(int pMax)
Item quantity input tag's 'maxlength' attribute


getShippingGroupTypesToBeInitialized

public java.lang.String getShippingGroupTypesToBeInitialized()
Returns the shippingGroupTypesToBeInitialized This property is used to provide list of shipping group types to be initialized by the ShippingGroupDroplet. Out of box the HardgoodShippingGroup and ElectroniShippingGroup are initialized. If you want to include or exclude any shipping groups, you need to modify this property. This property is only used with ShippingGroupDroplet

Returns:
the shippingGroupTypesToBeInitialized
See Also:
ShippingGroupDroplet.getShippingGroupTypes()

setShippingGroupTypesToBeInitialized

public void setShippingGroupTypesToBeInitialized(java.lang.String pShippingGroupTypesToBeInitialized)
Sets the shippingGroupTypesToBeInitialized This property is used to provide list of shipping group types to be initialized by the ShippingGroupDroplet. Out of box the HardgoodShippingGroup and ElectroniShippingGroup are initialized. If you want to include or exclude any shipping groups, you need to modify this property. This property is only used with ShippingGroupDroplet

Parameters:
pShippingGroupTypesToBeInitialized - the shippingGroupTypesToBeInitialized to set
See Also:
ShippingGroupDroplet.getShippingGroupTypes()

getPaymentGroupTypesToBeInitialized

public java.lang.String getPaymentGroupTypesToBeInitialized()
Returns the paymentGroupTypesToBeInitialized This property is used to provide list of payment group types to be initialized by the PaymentGroupDroplet. Out of box the CreditCard and StoreCredit are initialized. If you want to include or exclude any payment groups, you need to modify this property. This property is only used with PaymentGroupDroplet

Returns:
the paymentGroupTypesToBeInitialized
See Also:
PaymentGroupDroplet.getPaymentGroupTypes()

setPaymentGroupTypesToBeInitialized

public void setPaymentGroupTypesToBeInitialized(java.lang.String pPaymentGroupTypesToBeInitialized)
Sets the paymentGroupTypesToBeInitialized This property is used to provide list of payment group types to be initialized by the PaymentGroupDroplet. Out of box the CreditCard and StoreCredit are initialized. If you want to include or exclude any payment groups, you need to modify this property. This property is only used with PaymentGroupDroplet

Parameters:
pPaymentGroupTypesToBeInitialized - the paymentGroupTypesToBeInitialized to set
See Also:
PaymentGroupDroplet.getPaymentGroupTypes()

getShippingGroupTypeConfigurations

public CommerceTypeConfiguration[] getShippingGroupTypeConfigurations()
Returns the shippingGroupTypeConfigurations This property is used to configure all shipping group type configurations.

Returns:
the shippingGroupTypeConfigurations

setShippingGroupTypeConfigurations

public void setShippingGroupTypeConfigurations(CommerceTypeConfiguration[] pShippingGroupTypeConfigurations)
Sets the shippingGroupTypeConfigurations This property is used to configure all shipping group type configurations.

Parameters:
pShippingGroupTypeConfigurations - the shippingGroupTypeConfigurations to set

getShippingGroupTypeConfigurationsAsMap

public java.util.Map getShippingGroupTypeConfigurationsAsMap()
Returns the shippingGroupTypeConfigurationsAsMap This method converts getShippingGroupTypeConfigurations() into a map.

Returns:
the shippingGroupTypeConfigurationsAsMap
See Also:
convertArraysToMapByType(CommerceTypeConfiguration[])

getPaymentGroupTypeConfigurations

public CommerceTypeConfiguration[] getPaymentGroupTypeConfigurations()
Returns the paymentGroupTypeConfigurations This property is used to configure all payment group type configurations.

Returns:
the paymentGroupTypeConfigurations

setPaymentGroupTypeConfigurations

public void setPaymentGroupTypeConfigurations(CommerceTypeConfiguration[] pPaymentGroupTypeConfigurations)
Sets the paymentGroupTypeConfigurations This property is used to configure all payment group type configurations.

Parameters:
pPaymentGroupTypeConfigurations - the paymentGroupByTypeConfigurations to set

getPaymentGroupTypeConfigurationsAsMap

public java.util.Map getPaymentGroupTypeConfigurationsAsMap()
Returns the paymentGroupTypeConfigurationsAsMap This method converts getPaymentGroupTypeConfigurations() into a map.

Returns:
the paymentGroupTypeConfigurationsAsMap
See Also:
convertArraysToMapByType(CommerceTypeConfiguration[])

convertArraysToMapByType

protected java.util.Map convertArraysToMapByType(CommerceTypeConfiguration[] pTypeConfigurations)
This method converts an array into Map. This method walks through pTypeConfigurations array and uses the CommerceTypeConfiguration.getType() as the key and the TypeConfiguration as value and generates a map.

Parameters:
pTypeConfigurations - The array that needs to be converted to a map
Returns:
Returns the map with the CommerceTypeConfiguration.getType() as the key and TypeConfiguration as the value.