atg.projects.store
Class StoreConfiguration

java.lang.Object
  extended by atg.nucleus.logging.VariableArgumentApplicationLoggingImpl
      extended by atg.nucleus.GenericService
          extended by atg.projects.store.StoreConfiguration
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 StoreConfiguration
extends atg.nucleus.GenericService

Stores configuration information that is specific to Commerce Reference Store.


Field Summary
static java.lang.String CLASS_VERSION
          Class version string.
protected  boolean mAtgSearchInstalled
          Boolean indicating if ATG Search is available.
protected  boolean mDojoDebug
          Is Dojo debug turned on.
protected  java.util.List<java.lang.String> mMandatoryStateCountryList
          The list of countries for which state is a required address field.
protected  boolean mRequireCreditCardVerification
          Indicates whether orders paid by credit card must include the credit card verification code.
protected  boolean mUseSearchForSubcategoryProductList
          Boolean indicating if an ATG Search request should be used to obtain the list of products in a subcategory.
 
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
StoreConfiguration()
           
 
Method Summary
 java.lang.String getDefaultCssFile()
          Gets the location of the default css file(s).
 java.lang.String getDefaultResourceBundle()
          Returns the location of the default resource bundle.
 java.lang.String getEpochDate()
          Returns the store epoch date represented as a String object.
 java.util.Date getEpochDateAsDate()
          Returns the epochDate property represented as a Date object.
 java.lang.String getEpochDatePattern()
          Returns the date pattern defining the date format for the epochDate property.
 java.util.List<java.lang.String> getMandatoryStateCountryList()
          Returns the list of configured country codes that are mandatory.
 java.lang.String getSiteHttpServerName()
          Returns the name of the HTTP server.
 int getSiteHttpServerPort()
          Returns the port number of the HTTP server.
 boolean isAtgSearchInstalled()
           
 boolean isDojoDebug()
          Determines whether debug logging has been configured to be enabled.
 boolean isRequireCreditCardVerification()
          This property determines if credit card verification numbers are required by the application.
 boolean isUseSearchForSubcategoryProductList()
          Returns flag indicating if an ATG Search request should be used to obtain the list of products in a subcategory.
 void setAtgSearchInstalled(boolean pAtgSearchInstalled)
          Sets a property indicating whether ATG Search is installed or not.
 void setDefaultCssFile(java.lang.String pDefaultCssFile)
          Sets the location of the default css file(s).
 void setDefaultResourceBundle(java.lang.String pDefaultResourceBundle)
          Sets the location of the default resource bundle.
 void setDojoDebug(boolean pDojoDebug)
          Sets a property stating that debug logging should be enable in the Dojo Toolkit.
 void setEpochDate(java.lang.String pEpochDate)
          Sets the store epoch date.
 void setEpochDatePattern(java.lang.String pEpochDatePattern)
          Sets the date pattern defining the date format for the epochDate property.
 void setMandatoryStateCountryList(java.util.List<java.lang.String> pMandatoryStateCountryList)
          Sets the list of configured country codes that are mandatory.
 void setRequireCreditCardVerification(boolean pRequireCreditCardVerification)
          Set a property indicating whther that the credit card verification is required.
 void setSiteHttpServerName(java.lang.String pSiteHttpServerName)
          Sets the name of the HTTP server.When running of an internal facing instance this should be configured to the production instance.
 void setSiteHttpServerPort(int pSiteHttpServerPort)
          Sets the port number of the HTTP server.
 void setUseSearchForSubcategoryProductList(boolean pUseSearchForSubcategoryProductList)
          Sets a flag indicating whether ATG Search should be used to obtain the list of products in a subcategory.
 
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 final java.lang.String CLASS_VERSION
Class version string.

See Also:
Constant Field Values

mAtgSearchInstalled

protected boolean mAtgSearchInstalled
Boolean indicating if ATG Search is available. This property is false by default, but is set to true if the application includes the Store.Search module. Used on JSP pages to determine the search forms to use and to decide whether to render facets.


mUseSearchForSubcategoryProductList

protected boolean mUseSearchForSubcategoryProductList
Boolean indicating if an ATG Search request should be used to obtain the list of products in a subcategory. Default is false, which means standard catalog navigation is used to obtain the list. Using ATG Search enables the use of Search Merchandising rules or Search sort options to control ordering. Using standard catalog navigation gives better performance and allows merchandisers to control ordering through the category fixedChildProducts list.


mRequireCreditCardVerification

protected boolean mRequireCreditCardVerification
Indicates whether orders paid by credit card must include the credit card verification code. Verification codes are required by default.


mDojoDebug

protected boolean mDojoDebug
Is Dojo debug turned on. Debugging is disabled by default.


mMandatoryStateCountryList

protected java.util.List<java.lang.String> mMandatoryStateCountryList
The list of countries for which state is a required address field.

Constructor Detail

StoreConfiguration

public StoreConfiguration()
Method Detail

isAtgSearchInstalled

public boolean isAtgSearchInstalled()
Returns:
true if ATG search is installed, false otherwise.

setAtgSearchInstalled

public void setAtgSearchInstalled(boolean pAtgSearchInstalled)
Sets a property indicating whether ATG Search is installed or not.

Parameters:
pAtgSearchInstalled - true if ATG search is installed, false otherwise.

isUseSearchForSubcategoryProductList

public boolean isUseSearchForSubcategoryProductList()
Returns flag indicating if an ATG Search request should be used to obtain the list of products in a subcategory.

Returns:
true if search should be used, false otherwise.

setUseSearchForSubcategoryProductList

public void setUseSearchForSubcategoryProductList(boolean pUseSearchForSubcategoryProductList)
Sets a flag indicating whether ATG Search should be used to obtain the list of products in a subcategory.

Parameters:
pUseSearchForSubcategoryProductList - - true if ATG Search should be used to obtain the list of products in a subcategory.

isRequireCreditCardVerification

public boolean isRequireCreditCardVerification()
This property determines if credit card verification numbers are required by the application.

Many credit cards have a card verification number printed, not embossed, on the card. This number is never transferred during card swipes and should be known only by the cardholder. Each card association has its own name for this number. Visa calls it the Card Verification Value (CVV2), and MasterCard calls it the Card Validation Code (CVC2). Visa and MasterCard print the number on the back of the card. American Express and Discover call it the Card Identification Digits (CID).

Returns:
true if credit card verification is required, otherwise false.

setRequireCreditCardVerification

public void setRequireCreditCardVerification(boolean pRequireCreditCardVerification)
Set a property indicating whther that the credit card verification is required. This is used in the store during checkout.

Parameters:
pRequireCreditCardVerification - - true if credit card verification is required

isDojoDebug

public boolean isDojoDebug()
Determines whether debug logging has been configured to be enabled.

Returns:
Flag indicating whether dojo debugging should be enabled.

setDojoDebug

public void setDojoDebug(boolean pDojoDebug)
Sets a property stating that debug logging should be enable in the Dojo Toolkit.

Parameters:
pDojoDebug - - true if Dojo debug is to be enabled.

getMandatoryStateCountryList

public java.util.List<java.lang.String> getMandatoryStateCountryList()
Returns the list of configured country codes that are mandatory. Used when shopper creates billing and shipping addresses. These indicate when the state property of the address is a mandatory field.

Returns:
the list of country codes of mandatory countries.

setMandatoryStateCountryList

public void setMandatoryStateCountryList(java.util.List<java.lang.String> pMandatoryStateCountryList)
Sets the list of configured country codes that are mandatory. Used when shopper creates billing and shipping addresses. These indicate when the state property of the address is a mandatory field.

Parameters:
pMandatoryStateCountryList - - the List of code of mandatory countries.

setSiteHttpServerName

public void setSiteHttpServerName(java.lang.String pSiteHttpServerName)
Sets the name of the HTTP server.When running of an internal facing instance this should be configured to the production instance. It's used for the generation of external links e.g. those that are sent out in email.

Parameters:
pSiteHttpServerName - The server name.

getSiteHttpServerName

public java.lang.String getSiteHttpServerName()
Returns the name of the HTTP server. When running of an internal facing instance this should be configured to the production instance. It's used for the generation of external links e.g. those that are sent out in email.

Returns:
The name of the HTTP server.

setSiteHttpServerPort

public void setSiteHttpServerPort(int pSiteHttpServerPort)
Sets the port number of the HTTP server. When running of an internal facing instance this should be configured to the production instance. It's used for the generation of external links e.g. those that are sent out in email. Sets the port of the HTTP server.

Parameters:
pSiteHttpServerPort - The port number to set

getSiteHttpServerPort

public int getSiteHttpServerPort()
Returns the port number of the HTTP server. When running of an internal facing instance this should be configured to the production instance. It's used for the generation of external links e.g. those that are sent out in email.

Returns:
The port number of the HTTP server.

setDefaultResourceBundle

public void setDefaultResourceBundle(java.lang.String pDefaultResourceBundle)
Sets the location of the default resource bundle. This is used if no resource bundle is defined in the site configuration repository item.

Parameters:
pDefaultResourceBundle - The default resource bundle.

getDefaultResourceBundle

public java.lang.String getDefaultResourceBundle()
Returns the location of the default resource bundle. This is used if no resource bundle is defined in the site configuration repository item.

Returns:
The location of the default resource bundle.

setDefaultCssFile

public void setDefaultCssFile(java.lang.String pDefaultCssFile)
Sets the location of the default css file(s). This is used if no CSS location is defined in the site configuration repository item

Parameters:
pDefaultCssFile - The default CSS file location.

getDefaultCssFile

public java.lang.String getDefaultCssFile()
Gets the location of the default css file(s). This is used if no CSS location is defined in the site configuration repository item

Returns:
The location of the default css file.

setEpochDate

public void setEpochDate(java.lang.String pEpochDate)
Sets the store epoch date. The epochDate property must follow the epochDatePattern property format.

Parameters:
pEpochDate - The date to use as the epoch date.

getEpochDate

public java.lang.String getEpochDate()
Returns the store epoch date represented as a String object.

Returns:
The store epoch date.

setEpochDatePattern

public void setEpochDatePattern(java.lang.String pEpochDatePattern)
Sets the date pattern defining the date format for the epochDate property. The epochDate property must follow the epochDatePattern property format.

Parameters:
pEpochDatePattern - The epoch date pattern.

getEpochDatePattern

public java.lang.String getEpochDatePattern()
Returns the date pattern defining the date format for the epochDate property. The epochDate property must follow the epochDatePattern property format.

Returns:
The store epoch date pattern.

getEpochDateAsDate

public java.util.Date getEpochDateAsDate()
Returns the epochDate property represented as a Date object.

Returns:
The store epoch date property represented as a Date object.