public class KKAppEng
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
class |
KKAppEng.EngineData
Used to store engine information in the hash map
|
class |
KKAppEng.SessionCheckData
Used to store information related to checking the validity of the KonaKart session
|
Modifier and Type | Field and Description |
---|---|
java.lang.Object |
checkoutConfirmationSubmitMutex
local mutex
|
java.lang.Object |
checkoutMutex
local mutex
|
static int |
IMAGE_BIG
Image size
|
static int |
IMAGE_MEDIUM
Image size
|
static int |
IMAGE_SMALL
Image size
|
static int |
IMAGE_TINY
Image size
|
static java.lang.String |
KONAKART_KEY
Key used to store the KonaKart object within the session.
|
protected org.apache.commons.logging.Log |
log
log
|
Constructor and Description |
---|
KKAppEng(com.konakart.appif.EngineConfigIf engConf)
Constructor called by a servlet that creates an AppEng instance on startup.
|
KKAppEng(javax.servlet.http.HttpSession session)
Constructor for engine created when a user creates a new session.
|
KKAppEng(StoreInfo storeInfo,
javax.servlet.http.HttpSession session)
Constructor for engine created when a user creates a new session.
|
Modifier and Type | Method and Description |
---|---|
java.math.BigDecimal |
convertPrice(java.math.BigDecimal numberToConvert)
Converts the input using the conversion rate of the user currency.
|
boolean |
displayPriceWithTax()
Called by the UI to determine whether to display prices with tax.
|
protected void |
firstTimeRefresh()
Refresh the caches only if they haven't been refreshed yet
|
java.lang.String |
formatPrice(java.math.BigDecimal number)
Used to create a string in order to visualize a price.
|
java.lang.String |
formatPrice(java.math.BigDecimal numberToFormat,
java.lang.String currencyCode)
Used to create a string in order to visualise a price.
|
int |
getActiveCustId()
Get the active customer Id.
|
com.konakartadmin.appif.KKAdminIf |
getAdminEng() |
com.konakart.appif.CustomerIf |
getAdminUser()
The administrator who has logged for the customer
|
java.lang.String |
getAffiliateId()
The Id of an affiliate partner
|
com.konakart.appif.CountryIf[] |
getAllCountries()
Return All Countries with the names set from the message catalog.
|
com.konakartadmin.appif.KKAdminIf |
getAnAdminEngineInstance()
Get an instance of the Admin engine
|
java.lang.String |
getAnalyticsCode()
Get the Analytics Code from the message catalog if Analytics are enabled
|
java.lang.String |
getBase()
Base URL set by JSP.
|
BasketMgr |
getBasketMgr()
Used to get an instance of the BasketMgr.
|
CategoryMgr |
getCategoryMgr()
Used to get an instance of the CategoryMgr.
|
int |
getCityMinLength()
Form Validation: Minimum length of value for city
|
int |
getCompanyMinLength()
Form Validation: Minimum length of value for company
|
java.lang.String |
getConfig(java.lang.String key)
Returns the configuration value for the key passed in as a parameter.
|
java.lang.String |
getConfig(java.lang.String key,
boolean tryEngIfNotInCache)
Returns the configuration value for the key passed in as a parameter.
|
java.lang.String |
getConfig(java.lang.String key,
boolean tryEngIfNotInCache,
boolean warnIfMissing)
Returns the configuration value for the key passed in as a parameter.
|
boolean |
getConfigAsBoolean(java.lang.String key,
boolean def)
Returns the configuration value as a boolean for the key passed in as a parameter.
|
boolean |
getConfigAsBoolean(java.lang.String key,
boolean def,
boolean tryEngIfNotInCache)
Returns the configuration value as a boolean for the key passed in as a parameter.
|
boolean |
getConfigAsBoolean(java.lang.String key,
boolean def,
boolean tryEngIfNotInCache,
boolean warnIfMissing)
Returns the configuration value as a boolean for the key passed in as a parameter.
|
int |
getConfigAsInt(java.lang.String key)
Returns the configuration value as an integer for the key passed in as a parameter.
|
int |
getConfigAsInt(java.lang.String key,
int def)
Returns the configuration value as an integer for the key passed in as a parameter.
|
java.lang.String |
getContentClass() |
java.lang.String |
getContentImagesDir() |
ContentMgr |
getContentMgr()
Used to get an instance of the ContentMgr.
|
com.konakart.appif.CountryIf |
getCountry(int countryId)
Returns the country referenced by the id for the current locale.
|
com.konakart.appif.CurrencyIf[] |
getCurrencies()
Returns the available currencies in the system
|
com.konakart.appif.CurrencyIf |
getCurrency(java.lang.String currencyCode)
Returns the currency object for the currency code.
|
java.lang.String |
getCustom1()
Can be used for any custom logic
|
java.lang.String |
getCustom2()
Can be used for any custom logic
|
java.lang.String |
getCustom3()
Can be used for any custom logic
|
java.lang.String |
getCustom4()
Can be used for any custom logic
|
java.lang.String |
getCustom5()
Can be used for any custom logic
|
java.lang.String |
getCustomConfig(java.lang.String key)
Get a Custom config value from the Custom Map on the session
|
java.lang.String |
getCustomConfig(java.lang.String key,
boolean remove)
Get a Custom config value from the Custom Map on the session
|
boolean |
getCustomConfigAsBool(java.lang.String key,
boolean def)
Get a Custom config value as a boolean from the Custom Map on the session
|
CustomerMgr |
getCustomerMgr()
Used to get an instance of the CustomerMgr.
|
CustomerTagMgr |
getCustomerTagMgr() |
java.util.Map<java.lang.String,java.lang.String> |
getCustomMap() |
java.lang.Object |
getCustomObj()
A custom object that can be attached to the KonaKart client engine to store custom data.
|
java.lang.String |
getCustomTemp1()
Custom variables used to hold data temporarily for passing to included JSPs
|
java.lang.String |
getDateAsString(java.util.Calendar date)
The date template defined in the message catalog (date.format) is used to format the date.
|
java.lang.String |
getDateAsString(java.util.Date date)
The date template defined in the message catalog (date.format) is used to format the date.
|
java.lang.String |
getDateTimeAsString(java.util.Calendar date)
The date time template defined in the message catalog (date.time.format) is used to format
the date.
|
java.lang.String |
getDdbasePath() |
com.konakart.appif.CurrencyIf |
getDefaultCurrency()
Returns the default currency
|
com.konakart.appif.KKEngIf |
getEng()
Returns an instance of the KonaKart server engine so that methods may be called directly on
it.
|
static com.konakart.appif.EngineConfigIf |
getEngConf() |
com.konakart.appif.FetchProductOptionsIf |
getFetchProdOptions()
An options object that could for example point this customer to a special catalog
|
com.konakart.appif.FetchProductOptionsIf |
getFetchProdOptionsDefault() |
com.konakart.appif.FetchProductOptionsIf |
getFetchProdOptionsNoImages()
An options object that could for example point this customer to a special catalog.
|
int |
getFirstNameMinLength()
Form Validation: Minimum length of value for first name
|
java.lang.String |
getForwardAfterLogin()
The forwardAfterLogin is stored for the cases where the user wants to perform some action
such as writing a review, which requires him to be logged in.
|
java.lang.String |
getImageBase()
The ImageBase is set by a configuration parameter.
|
java.lang.String |
getKkVersion() |
int |
getLangId()
Get the current language Id.
|
int |
getLastNameMinLength()
Form Validation: Minimum length of value for last name
|
SingleSignOnIf |
getLiferaySSO() |
java.lang.String |
getLocale()
Get the current locale in String format (lowerCaseCode_upperCaseCode).
|
java.util.Locale |
getLocaleObj()
Get the current locale as a locale object
|
java.lang.String |
getLoginType()
Valid values are null, CustomerMgr.FACEBOOK, CustomerMgr.PAYPAL and CustomerMgr.GOOGLESIGNIN
|
int |
getMaxAddressBookEntries()
The maximum number of address book entries allowed
|
java.lang.String |
getMetaDescription()
Used by the JSPs to set the content of the meta description tag.
|
java.lang.String |
getMetaKeywords()
Used by the JSPs to set the content of the meta keywords tag.
|
java.util.ArrayList<java.lang.String> |
getMetaList() |
java.lang.String |
getMsg(java.lang.String key)
Get a message from the message catalog for the current locale.
|
java.lang.String |
getMsg(java.lang.String key,
java.lang.String arg0)
Get a message from the message catalog for the current locale.
|
java.lang.String |
getMsg(java.lang.String key,
java.lang.String[] args)
Get a message from the message catalog for the current locale.
|
java.lang.String |
getMsg(java.lang.String key,
java.lang.String arg0,
java.lang.String arg1)
Get a message from the message catalog for the current locale.
|
java.lang.String |
getMsg(java.lang.String key,
java.lang.String arg0,
java.lang.String arg1,
java.lang.String arg2)
Get a message from the message catalog for the current locale.
|
java.lang.String |
getMsgWithDefault(java.lang.String key,
java.lang.String def)
Get a message from the message catalog for the current locale.
|
java.text.Collator |
getMyCollator() |
CurrentNavigation |
getNav()
Used to keep track of where we are.
|
java.lang.String |
getNowAsString()
The date template defined in the message catalog (date.format) is used to get the current
date and time.
|
java.util.HashMap<java.lang.String,java.lang.Object> |
getObjMap()
Hash map used to store objects on KKAppEng
|
OrderMgr |
getOrderMgr()
Used to get an instance of the OrderMgr.
|
java.lang.String |
getPageTitle()
Used by the JSPs to set the content of the title tag.
|
int |
getPasswordMinLength()
Form Validation: Minimum length of value for password
|
java.lang.String |
getPortletContextPath() |
int |
getPostCodeMinLength()
Form Validation: Minimum length of value for post code
|
java.lang.String |
getProdImage(com.konakart.appif.ProductIf prod,
int size)
Returns the product image based on a size parameter passed in
|
java.lang.String |
getProdImage(com.konakart.appif.ProductIf prod,
com.konakart.appif.OptionIf[] opts,
int size)
Returns the product image based on a size parameter passed in and the selected options
|
java.lang.String |
getProdImageBase(com.konakart.appif.ProductIf prod)
Returns the product image base
|
java.lang.String |
getProdImageExtension(com.konakart.appif.ProductIf prod)
Returns the product image extension
|
ProductMgr |
getProductMgr()
Used to get an instance of the ProductMgr.
|
java.lang.String |
getProperty(java.lang.String key)
Returns the value of a property from the konakart_app.properties file.
|
boolean |
getPropertyAsBoolean(java.lang.String key,
boolean def)
Returns the value of a property from the konakart_app.properties file.
|
int |
getPropertyAsInt(java.lang.String key,
int def)
Returns the value of a property from the konakart_app.properties file.
|
PunchOut |
getPunchoutDetails()
Information required for performing punch out.
|
QuotaMgr |
getQuotaMgr()
Used to get an instance of the QuotaMgr.
|
ReviewMgr |
getReviewMgr()
Used to get an instance of the ReviewMgr.
|
RewardPointMgr |
getRewardPointMgr() |
java.lang.String |
getScriptBase()
The ScriptBase is set by a configuration parameter.
|
int |
getSEARCH_ALL()
This is a constant used for searching all products.
|
int |
getSearchParentCategoryId() |
javax.servlet.http.HttpSession |
getSession() |
KKAppEng.SessionCheckData |
getSessionCheckData()
Used to store information related to checking the validity of the KonaKart session
|
java.lang.String |
getSessionId()
Returns the session id of the currently logged in customer.
|
java.lang.String |
getSslBaseUrl()
The default condition is that the sslBaseUrl isn't used unless the SSL_BASE_URL configuration
variable is set.
|
java.lang.String |
getSslPort()
The standard port "443" is used unless it is overridden by the SSL_PORT_NUMBER configuration
variable.
|
java.lang.String |
getStandardPort()
The standard port "80" is used unless it is overridden by the STANDARD_PORT_NUMBER
configuration.
|
int |
getStateMinLength()
Form Validation: Minimum length of value for state
|
int |
getStockWarnLevel()
Warn when the stock level of a product gets below this value.
|
java.lang.String |
getStoreBase()
The StoreBase is set by a configuration parameter.
|
KKAppEng.EngineData |
getStoreEng(java.lang.String storeId)
Returns an engine instance for a store id.
|
java.lang.String |
getStoreId()
Return the storeId
|
java.lang.String |
getStoreId(java.lang.String defaultStoreId)
Return the storeId.
|
int |
getStreetAddr1MinLength()
Form Validation: Minimum length of value for street address 1
|
int |
getStreetAddrMinLength()
Form Validation: Minimum length of value for street address
|
java.lang.String |
getStyleBase()
The StyleBase is set by a configuration parameter.
|
int |
getTelephoneMinLength()
Form Validation: Minimum length of value for telephone
|
static java.util.List<ConfigCacheUpdater> |
getUpdateThreadList()
Returns the updateThreadList.
|
com.konakart.appif.CurrencyIf |
getUserCurrency()
Returns the user's currency which may be different to the default currency
|
java.text.DecimalFormat |
getUserCurrencyFormatter()
Returns the user's currency formatter which may be different to the default currency
formatter
|
int |
getVersionInt() |
java.lang.String |
getVersionStr() |
WishListMgr |
getWishListMgr()
Returns the wishListMgr.
|
java.lang.String |
getXMLOverHTTPResp()
XMLOverHTTPResp is used to temporary store an XML response.
|
java.lang.String |
getXsrfToken() |
boolean |
isAgreedCookies()
Set to true when the customer agrees to accept cookies
|
boolean |
isBusiness()
Returns true if the Business version of KonaKart is being used
|
boolean |
isDdAsAttachment()
The value is read from the DD_DOWNLOAD_AS_ATTACHMENT configuration variable.
|
boolean |
isDiscountModule(java.lang.String module)
Helper method that returns true if a module provides a discount.
|
boolean |
isEnableSSL()
Whether SSL is enabled or not is determined by the ENABLE_SSL configuration variable.
|
boolean |
isEnhancedVariantHandlingModeEnabled()
Check in the static data if enhanced variant handling mode is enabled.
|
boolean |
isEnterprise()
Returns true if the Enterprise version of KonaKart is being used
|
boolean |
isForceLogin()
Returns true if a customer is required to login in order to use the storefront application
|
boolean |
isGetSpellingSuggestions()
Returns true if KonaKart is configured to retrieve spelling suggestions
|
boolean |
isKkCookieEnabled()
Determines whether The KonaKart Cookie functionality is installed.
|
boolean |
isMultiVendor()
Returns true if the store is in multi-vendor mode
|
boolean |
isMultiVendorStoreLinks()
Determines whether the storefront application should display links to a store details page
|
boolean |
isPortlet()
Set to true when running as a portlet
|
boolean |
isTaxModule(java.lang.String className)
Returns true if the module referenced by the class name is a tax module
|
boolean |
isUseSolr()
Returns true if KonaKart is configured to use Solr
|
boolean |
isWishListEnabled()
Returns true if wish list functionality is enabled
|
boolean |
isWond() |
void |
logout()
Log-off and reset some variables.
|
void |
refreshCachedData()
Refresh the cached data.
|
java.lang.String |
removeCData(java.lang.String stringIn)
Returns the string passed in as stringIn without the CData information.
|
java.lang.String |
removeCData(java.lang.String stringIn,
boolean escapeOutput)
Returns the string passed in as stringIn without the CData information.
|
protected void |
removeFromUpdateThreadList(java.lang.String storeId)
Removes the update thread from the static list for the storeId passed in as a parameter
|
java.lang.String |
removeSingleQuotes(java.lang.String in)
Removes single quotes from the string by substituting them with double quotes.
|
void |
reset()
Puts the Konakart object back into it's original state with no categories or products
selected.
|
void |
setAdminEng(com.konakartadmin.appif.KKAdminIf adminEng) |
void |
setAdminUser(com.konakart.appif.CustomerIf adminUser)
The administrator who has logged for the customer
|
void |
setAffiliateId(java.lang.String affiliateId)
The Id of an affiliate partne
|
void |
setAgreedCookies(boolean agreedCookies)
Set to true when the customer agrees to accept cookies
|
void |
setBase(java.lang.String base)
Base URL set by JSP.
|
void |
setContentClass(java.lang.String contentClass) |
void |
setCustom1(java.lang.String custom1)
Can be used for any custom logic
|
void |
setCustom2(java.lang.String custom2)
Can be used for any custom logic
|
void |
setCustom3(java.lang.String custom3)
Can be used for any custom logic
|
void |
setCustom4(java.lang.String custom4)
Can be used for any custom logic
|
void |
setCustom5(java.lang.String custom5)
Can be used for any custom logic
|
void |
setCustomConfig(java.lang.String key,
java.lang.String value)
Set a Custom config in the Custom Map on the session
|
void |
setCustomObj(java.lang.Object customObj)
A custom object that can be attached to the KonaKart client engine to store custom data.
|
void |
setCustomTemp1(java.lang.String customTemp1)
Custom variables used to hold data temporarily for passing to included JSPs
|
void |
setDdAsAttachment(boolean ddAsAttachment)
The value is read from the DD_DOWNLOAD_AS_ATTACHMENT configuration variable.
|
void |
setDdbasePath(java.lang.String ddbasePath)
The value of the Digital Download base path is read from the DD_BASE_PATH configuration
variable.
|
void |
setEnableSSL(boolean enableSSL)
Whether SSL is enabled or not is determined by the ENABLE_SSL configuration variable.
|
void |
setFetchProdOptions(com.konakart.appif.FetchProductOptionsIf fetchProdOptions)
An options object that could for example point this customer to a special catalog
|
void |
setFetchProdOptionsDefault(com.konakart.appif.FetchProductOptionsIf fetchProdOptionsDefault) |
void |
setFetchProdOptionsNoImages(com.konakart.appif.FetchProductOptionsIf fetchProdOptionsNoImages)
An options object that could for example point this customer to a special catalog.
|
void |
setForwardAfterLogin(java.lang.String forwardAfterLogin)
The forwardAfterLogin is stored for the cases where the user wants to perform some action
such as writing a review, which requires him to be logged in.
|
void |
setLangId(int langId)
Set the languageId with the id passed in as a parameter.
|
void |
setLocale(java.lang.String locale)
Splits the locale string at the underscore and calls
public void setLocale(String lowerCaseCode, String upperCaseCode) |
void |
setLocale(java.lang.String lowerCaseCode,
java.lang.String upperCaseCode)
Used to change the locale of the application from the default locale.
|
void |
setLoginType(java.lang.String loginType)
Valid values are null, CustomerMgr.FACEBOOK, CustomerMgr.PAYPAL and CustomerMgr.GOOGLESIGNIN
|
void |
setMetaDescription(java.lang.String metaDescription)
Used by the JSPs to set the content of the meta description tag.
|
void |
setMetaKeywords(java.lang.String metaKeywords)
Used by the JSPs to set the content of the meta keywords tag.
|
void |
setMetaList(java.util.ArrayList<java.lang.String> metaList) |
void |
setMyCollator(java.text.Collator myCollator) |
void |
setNav(CurrentNavigation nav)
Used to keep track of where we are.
|
void |
setObjMap(java.util.HashMap<java.lang.String,java.lang.Object> objMap)
Hash map used to store objects on KKAppEng
|
void |
setPageTitle(java.lang.String pageTitle)
Used by the JSPs to set the content of the title tag.
|
void |
setPortlet(boolean portlet)
Set to true when running as a portlet
|
void |
setPortletContextPath(java.lang.String portletContextPath) |
void |
setPunchoutDetails(PunchOut punchoutDetails)
Information required for performing punch out.
|
void |
setSearchParentCategoryId(int searchParentCategoryId) |
void |
setSession(javax.servlet.http.HttpSession session) |
void |
setSessionCheckData(KKAppEng.SessionCheckData sessionCheckData)
Used to store information related to checking the validity of the KonaKart session
|
void |
setSessionId(java.lang.String sessionId)
Set the sessionId with the string passed in as a parameter.
|
void |
setSslPort(java.lang.String sslPort)
The standard port "443" is used unless it is overridden by the SSL_PORT_NUMBER configuration
variable.
|
void |
setStandardPort(java.lang.String standardPort)
The standard port "80" is used unless it is overridden by the STANDARD_PORT_NUMBER
configuration.
|
void |
setUserCurrency(java.lang.String currencyCode)
Used to set the user's currency.
|
void |
setXMLOverHTTPResp(java.lang.String overHTTPResp)
XMLOverHTTPResp is used to temporary store an XML response.
|
void |
setXsrfToken(java.lang.String xsrfToken) |
protected org.apache.commons.logging.Log log
public static final java.lang.String KONAKART_KEY
public static final int IMAGE_BIG
public static final int IMAGE_MEDIUM
public static final int IMAGE_SMALL
public static final int IMAGE_TINY
public java.lang.Object checkoutConfirmationSubmitMutex
public java.lang.Object checkoutMutex
public KKAppEng(com.konakart.appif.EngineConfigIf engConf) throws com.konakart.app.KKException, KKAppException, java.lang.IllegalArgumentException, java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException
engConf
- An EngineConfigIf object containing information to configure the engine at
startup.com.konakart.app.KKException
- an unexpected KKException exceptionKKAppException
- an unexpected KKAppException exceptionjava.lang.reflect.InvocationTargetException
- an unexpected InvocationTargetException exceptionjava.lang.IllegalAccessException
- an unexpected IllegalAccessException exceptionjava.lang.InstantiationException
- an unexpected InstantiationException exceptionjava.lang.ClassNotFoundException
- an unexpected ClassNotFoundException exceptionjava.lang.IllegalArgumentException
- an unexpected IllegalArgumentException exceptionpublic KKAppEng(javax.servlet.http.HttpSession session) throws KKAppException
session
- HttpSessionKKAppException
- an unexpected KKAppException exceptionpublic KKAppEng(StoreInfo storeInfo, javax.servlet.http.HttpSession session) throws KKAppException
storeInfo
- An object containing information about the store being accessedsession
- HttpSessionKKAppException
- an unexpected KKAppException exceptionprotected void removeFromUpdateThreadList(java.lang.String storeId)
storeId
- the storeIdpublic com.konakartadmin.appif.KKAdminIf getAnAdminEngineInstance() throws java.lang.ClassNotFoundException, java.lang.IllegalArgumentException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, KKAppException
java.lang.ClassNotFoundException
- an unexpected ClassNotFoundException exceptionjava.lang.reflect.InvocationTargetException
- an unexpected InvocationTargetException exceptionjava.lang.IllegalAccessException
- an unexpected IllegalAccessException exceptionjava.lang.InstantiationException
- an unexpected InstantiationException exceptionjava.lang.IllegalArgumentException
- an unexpected IllegalArgumentException exceptionKKAppException
- an unexpected KKAppException exceptionpublic void refreshCachedData() throws com.konakart.app.KKException, KKAppException
KKAppException
- an unexpected KKAppException exceptioncom.konakart.app.KKException
- an unexpected KKException exceptionprotected void firstTimeRefresh() throws com.konakart.app.KKException, KKAppException
com.konakart.app.KKException
- an unexpected KKException exceptionKKAppException
- an unexpected KKAppException exceptionpublic void reset() throws com.konakart.app.KKException
com.konakart.app.KKException
- an unexpected KKException exceptionpublic void setLocale(java.lang.String locale) throws com.konakart.app.KKException, KKAppException
public void setLocale(String lowerCaseCode, String upperCaseCode)
locale
- Locale which should be in the format en_GBcom.konakart.app.KKException
- an unexpected KKException exceptionKKAppException
- an unexpected KKAppException exceptionpublic void setLocale(java.lang.String lowerCaseCode, java.lang.String upperCaseCode) throws com.konakart.app.KKException, KKAppException
lowerCaseCode
- This is the two letter country code in lower case characters (i.e. it, en etc.)upperCaseCode
- This is the two letter country code in upper case characters (i.e. IT, GB etc.)com.konakart.app.KKException
- an unexpected KKException exceptionKKAppException
- an unexpected KKAppException exceptionpublic java.lang.String getLocale()
public java.util.Locale getLocaleObj()
public java.lang.String getConfig(java.lang.String key)
key
- the keypublic java.lang.String getConfig(java.lang.String key, boolean tryEngIfNotInCache)
key
- the keytryEngIfNotInCache
- Call the Engine if can't find the variable in the cachepublic java.lang.String getConfig(java.lang.String key, boolean tryEngIfNotInCache, boolean warnIfMissing)
key
- the keytryEngIfNotInCache
- Call the Engine if can't find the variable in the cachewarnIfMissing
- if true a warning message is logged if the configuration key isn't foundpublic boolean getConfigAsBoolean(java.lang.String key, boolean def)
key
- the configuration key to look updef
- the default value which is returned if the key is null or the key isn't foundpublic boolean getConfigAsBoolean(java.lang.String key, boolean def, boolean tryEngIfNotInCache)
key
- the configuration key to look updef
- the default value which is returned if the key is null or the key isn't foundtryEngIfNotInCache
- Call the Engine if can't find the variable in the cachepublic boolean getConfigAsBoolean(java.lang.String key, boolean def, boolean tryEngIfNotInCache, boolean warnIfMissing)
key
- the configuration key to look updef
- the default value which is returned if the key is null or the key isn't foundtryEngIfNotInCache
- Call the Engine if can't find the variable in the cachewarnIfMissing
- if true a warning message is logged if the configuration key isn't foundpublic int getConfigAsInt(java.lang.String key, int def) throws com.konakart.app.KKException
key
- the configuration key to look updef
- the default valuecom.konakart.app.KKException
- if there is a problem converting the configuration value into an integerpublic int getConfigAsInt(java.lang.String key) throws com.konakart.app.KKException
key
- the configuration key to look upcom.konakart.app.KKException
- if there is a problem converting the configuration value into an integerpublic java.lang.String getProperty(java.lang.String key)
key
- the keypublic boolean getPropertyAsBoolean(java.lang.String key, boolean def)
key
- the keydef
- The default valuepublic int getPropertyAsInt(java.lang.String key, int def)
key
- the keydef
- The default valuepublic java.lang.String getVersionStr()
public int getVersionInt()
public java.lang.String formatPrice(java.math.BigDecimal number) throws KKAppException
number
- to be formattedKKAppException
- an unexpected KKAppException exceptionpublic java.lang.String formatPrice(java.math.BigDecimal numberToFormat, java.lang.String currencyCode) throws KKAppException
numberToFormat
- number to be formattedcurrencyCode
- Three letter currency code (USD, GBP, EUR etc.)KKAppException
- an unexpected KKAppException exceptionpublic java.math.BigDecimal convertPrice(java.math.BigDecimal numberToConvert) throws KKAppException
numberToConvert
- number to be convertedKKAppException
- an unexpected KKAppException exceptionpublic CategoryMgr getCategoryMgr()
public ProductMgr getProductMgr()
public QuotaMgr getQuotaMgr()
public java.lang.String getAnalyticsCode()
public java.lang.String getMsg(java.lang.String key)
key
- the keypublic java.lang.String getMsgWithDefault(java.lang.String key, java.lang.String def)
key
- the keydef
- the defpublic java.lang.String getMsg(java.lang.String key, java.lang.String arg0)
key
- the keyarg0
- Parameter to replace place holder {0}public java.lang.String getMsg(java.lang.String key, java.lang.String arg0, java.lang.String arg1)
key
- the keyarg0
- Parameter to replace place holder {0}arg1
- Parameter to replace place holder {1}public java.lang.String getMsg(java.lang.String key, java.lang.String arg0, java.lang.String arg1, java.lang.String arg2)
key
- the keyarg0
- Parameter to replace place holder {0}arg1
- Parameter to replace place holder {1}arg2
- Parameter to replace place holder {2}public java.lang.String getMsg(java.lang.String key, java.lang.String[] args)
key
- the keyargs
- Array of parameters to add to message in place holders {0}, {1} etcpublic int getLangId()
public void setLangId(int langId)
langId
- The langId to set.public ReviewMgr getReviewMgr()
public int getSEARCH_ALL()
public java.lang.String getSessionId()
public java.lang.String getForwardAfterLogin()
public void setForwardAfterLogin(java.lang.String forwardAfterLogin)
forwardAfterLogin
- The forwardAfterLogin to set.public com.konakart.appif.KKEngIf getEng()
public java.lang.String getDateAsString(java.util.Calendar date)
date
- the datepublic java.lang.String getDateAsString(java.util.Date date)
date
- the datepublic java.lang.String getDateTimeAsString(java.util.Calendar date)
date
- the datepublic java.lang.String getNowAsString()
public java.lang.String removeCData(java.lang.String stringIn)
The output is escaped by default.
stringIn
- the stringInpublic java.lang.String removeCData(java.lang.String stringIn, boolean escapeOutput)
stringIn
- the stringInescapeOutput
- if true the output is escapedpublic void logout() throws com.konakart.app.KKException
com.konakart.app.KKException
- an unexpected KKException exceptionpublic OrderMgr getOrderMgr()
public int getCityMinLength()
public int getCompanyMinLength()
public int getFirstNameMinLength()
public int getLastNameMinLength()
public int getPasswordMinLength()
public int getPostCodeMinLength()
public int getStateMinLength()
public int getStreetAddrMinLength()
public int getStreetAddr1MinLength()
public int getTelephoneMinLength()
public int getMaxAddressBookEntries()
public java.lang.String getStoreBase()
public java.lang.String getImageBase()
public java.lang.String getProdImageBase(com.konakart.appif.ProductIf prod)
prod
- Product objectpublic java.lang.String getProdImageExtension(com.konakart.appif.ProductIf prod)
prod
- Product objectpublic java.lang.String getProdImage(com.konakart.appif.ProductIf prod, com.konakart.appif.OptionIf[] opts, int size)
prod
- the prodopts
- the optssize
- the sizepublic java.lang.String getProdImage(com.konakart.appif.ProductIf prod, int size)
prod
- the prodsize
- the sizepublic java.lang.String getScriptBase()
public java.lang.String getStyleBase()
public int getStockWarnLevel()
public boolean isWishListEnabled()
public com.konakart.appif.CurrencyIf[] getCurrencies()
public com.konakart.appif.CurrencyIf getCurrency(java.lang.String currencyCode) throws com.konakart.app.KKException
currencyCode
- the currencyCodecom.konakart.app.KKException
- an unexpected KKException exceptionpublic boolean displayPriceWithTax()
public BasketMgr getBasketMgr()
public CustomerMgr getCustomerMgr()
public ContentMgr getContentMgr()
public void setSessionId(java.lang.String sessionId)
sessionId
- The sessionId to set.public java.lang.String getXMLOverHTTPResp()
public void setXMLOverHTTPResp(java.lang.String overHTTPResp)
overHTTPResp
- The xMLOverHTTPResp to set.public boolean isEnableSSL()
public void setEnableSSL(boolean enableSSL)
enableSSL
- The enableSSL to set.public java.lang.String getSslPort()
public void setSslPort(java.lang.String sslPort)
sslPort
- The sslPort to set.public java.lang.String getStandardPort()
public void setStandardPort(java.lang.String standardPort)
standardPort
- The standardPort to set.public java.lang.String getPageTitle()
public void setPageTitle(java.lang.String pageTitle)
pageTitle
- The pageTitle to set.public java.lang.String getMetaDescription()
public void setMetaDescription(java.lang.String metaDescription)
metaDescription
- The metaDescription to set.public java.lang.String getMetaKeywords()
public void setMetaKeywords(java.lang.String metaKeywords)
metaKeywords
- The metaKeywords to set.public boolean isUseSolr()
public boolean isGetSpellingSuggestions()
public java.lang.String getSslBaseUrl()
public java.lang.String getDdbasePath()
public void setDdbasePath(java.lang.String ddbasePath)
ddbasePath
- The ddbasePath to set.public boolean isDdAsAttachment()
public void setDdAsAttachment(boolean ddAsAttachment)
ddAsAttachment
- The ddAsAttachment to set.public java.lang.String getCustom1()
public void setCustom1(java.lang.String custom1)
custom1
- The custom1 to set.public java.lang.String getCustom2()
public void setCustom2(java.lang.String custom2)
custom2
- The custom2 to set.public java.lang.String getCustom3()
public void setCustom3(java.lang.String custom3)
custom3
- The custom3 to set.public java.lang.String getCustom4()
public void setCustom4(java.lang.String custom4)
custom4
- The custom4 to set.public java.lang.String getCustom5()
public void setCustom5(java.lang.String custom5)
custom5
- The custom5 to set.public java.lang.String getCustomTemp1()
public void setCustomTemp1(java.lang.String customTemp1)
customTemp1
- the customTemp1 to setpublic static com.konakart.appif.EngineConfigIf getEngConf()
public java.lang.String getStoreId(java.lang.String defaultStoreId)
defaultStoreId
- default storeIdpublic java.lang.String getStoreId()
public static java.util.List<ConfigCacheUpdater> getUpdateThreadList()
public WishListMgr getWishListMgr()
public java.lang.Object getCustomObj()
public void setCustomObj(java.lang.Object customObj)
customObj
- the customObj to setpublic com.konakart.appif.CurrencyIf getUserCurrency()
public com.konakart.appif.CurrencyIf getDefaultCurrency()
public java.text.DecimalFormat getUserCurrencyFormatter()
public void setUserCurrency(java.lang.String currencyCode) throws com.konakart.app.KKException
currencyCode
- The 3 letter currency code (i.e. USD, EUR ..)com.konakart.app.KKException
- an unexpected KKException exceptionpublic com.konakart.appif.CountryIf[] getAllCountries() throws com.konakart.app.KKException
com.konakart.app.KKException
- an unexpected KKException exceptionpublic com.konakart.appif.CountryIf getCountry(int countryId) throws com.konakart.app.KKException
countryId
- Numeric id of countrycom.konakart.app.KKException
- an unexpected KKException exceptionpublic int getActiveCustId()
public java.util.Map<java.lang.String,java.lang.String> getCustomMap()
public void setCustomConfig(java.lang.String key, java.lang.String value)
key
- the keyvalue
- the valuepublic java.lang.String getCustomConfig(java.lang.String key)
key
- key of the Custom config valuepublic java.lang.String getCustomConfig(java.lang.String key, boolean remove)
key
- key of the Custom config valueremove
- if true the key is removed from the Custom Config map after being retrievedpublic boolean getCustomConfigAsBool(java.lang.String key, boolean def)
key
- key of the Custom config valuedef
- the default value if the key isn't presentpublic boolean isKkCookieEnabled()
public com.konakart.appif.FetchProductOptionsIf getFetchProdOptions()
public void setFetchProdOptions(com.konakart.appif.FetchProductOptionsIf fetchProdOptions)
fetchProdOptions
- the fetchProdOptions to setpublic CustomerTagMgr getCustomerTagMgr()
public RewardPointMgr getRewardPointMgr()
public java.text.Collator getMyCollator()
public void setMyCollator(java.text.Collator myCollator)
myCollator
- the myCollator to setpublic com.konakart.appif.CustomerIf getAdminUser()
public void setAdminUser(com.konakart.appif.CustomerIf adminUser)
adminUser
- the adminUser to setpublic boolean isPortlet()
public void setPortlet(boolean portlet)
portlet
- the portlet to setpublic java.lang.String getKkVersion()
public java.lang.String getAffiliateId()
public void setAffiliateId(java.lang.String affiliateId)
affiliateId
- the affiliateId to setpublic PunchOut getPunchoutDetails()
public void setPunchoutDetails(PunchOut punchoutDetails)
punchoutDetails
- the punchoutDetails to setpublic javax.servlet.http.HttpSession getSession()
public void setSession(javax.servlet.http.HttpSession session)
session
- the session to setpublic CurrentNavigation getNav()
public void setNav(CurrentNavigation nav)
nav
- the nav to setpublic java.lang.String getContentClass()
public void setContentClass(java.lang.String contentClass)
contentClass
- the contentClass to setpublic java.lang.String getPortletContextPath()
public void setPortletContextPath(java.lang.String portletContextPath)
portletContextPath
- the portletContextPath to setpublic java.util.HashMap<java.lang.String,java.lang.Object> getObjMap()
public void setObjMap(java.util.HashMap<java.lang.String,java.lang.Object> objMap)
objMap
- the objMap to setpublic boolean isMultiVendor()
public boolean isMultiVendorStoreLinks()
public boolean isEnterprise()
public boolean isBusiness()
public boolean isForceLogin()
public KKAppEng.EngineData getStoreEng(java.lang.String storeId) throws java.lang.IllegalArgumentException, KKAppException, java.lang.ClassNotFoundException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, com.konakart.app.KKException
storeId
- the storeIdjava.lang.IllegalArgumentException
- an unexpected IllegalArgumentException exceptionKKAppException
- an unexpected KKAppException exceptionjava.lang.ClassNotFoundException
- an unexpected ClassNotFoundException exceptionjava.lang.InstantiationException
- an unexpected InstantiationException exceptionjava.lang.IllegalAccessException
- an unexpected IllegalAccessException exceptionjava.lang.reflect.InvocationTargetException
- an unexpected InvocationTargetException exceptioncom.konakart.app.KKException
- an unexpected KKException exceptionpublic boolean isTaxModule(java.lang.String className)
className
- the classNamepublic boolean isDiscountModule(java.lang.String module)
module
- the modulepublic java.lang.String getBase()
public void setBase(java.lang.String base)
base
- the base to setpublic boolean isAgreedCookies()
public void setAgreedCookies(boolean agreedCookies)
agreedCookies
- the agreedCookies to setpublic java.lang.String getXsrfToken()
public void setXsrfToken(java.lang.String xsrfToken)
xsrfToken
- the xsrfToken to setpublic KKAppEng.SessionCheckData getSessionCheckData()
public void setSessionCheckData(KKAppEng.SessionCheckData sessionCheckData)
sessionCheckData
- the sessionCheckData to setpublic java.lang.String getContentImagesDir()
public com.konakart.appif.FetchProductOptionsIf getFetchProdOptionsNoImages()
public void setFetchProdOptionsNoImages(com.konakart.appif.FetchProductOptionsIf fetchProdOptionsNoImages)
fetchProdOptionsNoImages
- the fetchProdOptionsNoImages to setpublic java.lang.String getLoginType()
public void setLoginType(java.lang.String loginType)
loginType
- the loginType to setpublic com.konakart.appif.FetchProductOptionsIf getFetchProdOptionsDefault()
public void setFetchProdOptionsDefault(com.konakart.appif.FetchProductOptionsIf fetchProdOptionsDefault)
fetchProdOptionsDefault
- the fetchProdOptionsDefault to setpublic SingleSignOnIf getLiferaySSO()
public java.util.ArrayList<java.lang.String> getMetaList()
public void setMetaList(java.util.ArrayList<java.lang.String> metaList)
metaList
- the metaList to setpublic int getSearchParentCategoryId()
public void setSearchParentCategoryId(int searchParentCategoryId)
searchParentCategoryId
- the searchParentCategoryId to setpublic java.lang.String removeSingleQuotes(java.lang.String in)
in
- the inpublic com.konakartadmin.appif.KKAdminIf getAdminEng() throws java.lang.Exception
java.lang.Exception
- an unexpected exceptionpublic void setAdminEng(com.konakartadmin.appif.KKAdminIf adminEng)
adminEng
- the adminEng to setpublic boolean isWond()
public boolean isEnhancedVariantHandlingModeEnabled()
Copyright © 2018 DS Data Systems UK Ltd.