|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.elasticpath.domain.impl.ElasticPathImpl
public class ElasticPathImpl
This class provides elastic path configurations and context to others.
Method Summary | |
---|---|
void |
clearAllAttributeRanges()
Clears all attribute range information, including bottom level attribute ranges. |
void |
clearAllAttributeSimpleValues()
Clears all attribute simple value information. |
void |
clearAllPriceRanges()
Clears all price range information, including bottom level price ranges. |
java.lang.String |
get(java.lang.String name)
Return the value of a string property with the specified name from the dyanamic property map. |
java.lang.String |
get(java.lang.String name,
java.lang.String defaultValue)
Return the value of a string property with the specified name. |
float |
getAccuracy()
Returns the degree of similarity that a word must have to the original word in order to be suggested. |
java.util.Map |
getAll()
Return name and values of all properties as a map. |
java.util.Map |
getAllAttributeRanges()
Returns all defined attribute ranges as a Map . |
java.util.Map |
getAllAttributeSimpleValues()
Returns all defined attribute simple value filters as a Map . |
java.util.Map |
getAllAttributesMap()
This map contains all the attribute defined in the guided-navigation.xml. |
java.util.Map |
getAllCurrencies()
Return all supported currencies. |
java.util.Map |
getAllLocales()
Get a map of all supported locales. |
java.util.Map |
getAllPriceRanges()
Returns all defined price ranges as a Map . |
java.util.List |
getAllShipmentCarriers()
Return all supported shipment carrier. |
java.util.SortedMap |
getAttributeSimpleValuesMap(java.lang.String attributeCode)
Returns attribute ranges of the given attributeCode, which are defined at bottom level of the attribute-range-tree. |
java.lang.Object |
getBean(java.lang.String name)
Get the bean with the given id from spring ContextBeanFactory. |
java.util.Map |
getBoolMap()
Returns a map used by Spring/Velocity for checkboxes. |
java.util.SortedMap |
getBottomLevelAttributeRanges(java.lang.String attributeCode)
Returns attribute ranges of the given attributeCode, which are defined at bottom level of the attribute-range-tree. |
java.util.SortedMap |
getBottomLevelPriceRanges(java.util.Currency currency)
Returns price ranges of the given currency, which are defined at bottom level of the price-range-tree. |
java.lang.String |
getCatalogAssetPath()
Return the absolute asset directory path. |
int |
getCatalogViewPagination()
Return the catalog view pagination. |
CheckoutTransactionBehaviour |
getCheckoutTransactionBehaviour()
Return the CheckoutTransactionBehaviour object that defines how a checkout transaction is to be processed. |
java.lang.String |
getCmContextUrl()
Return the commerce manager context URL. |
java.lang.String |
getContentEncoding()
Returns the content encoding. |
Geography |
getCountries()
Return a Geography that provides geographical information. |
java.util.Map |
getCustomerProfileAttributes()
Returns a map of all customer profile attributes. |
java.sql.DatabaseMetaData |
getDatabaseMetaData()
Return database meta data. |
java.lang.String |
getDatabaseProductName()
Get the databse product name. |
java.lang.String |
getDataFileEncoding()
Returns the data file encoding. |
java.lang.String |
getDefaultCountry()
Returns the default country. |
java.util.Currency |
getDefaultCurrency()
Returns the default currency. |
java.text.SimpleDateFormat |
getDefaultDateFormat()
Returns the default date format. |
java.util.Locale |
getDefaultLocale()
Return the system default locale. |
PrototypeBeanFactory |
getDomainBeanFactory()
Returns PrototypeBeanFactory for domain objects. |
java.lang.String |
getEmailCmUrl()
Return the URL of the Commerce Manager to be used only in email messages. |
java.lang.String |
getEmailStoreUrl()
Return the URL of the store to be used only in email messages. |
java.lang.String |
getEpBuildNo()
Returns the Elastic Path build number. |
java.lang.String |
getEpVersion()
Returns the Elastic Path version number. |
java.lang.String |
getFileAssetPath()
Return the file asset directory path. |
java.lang.String |
getFileAssetSubFolder()
Return the file asset sub folder name. |
Geography |
getGeography()
Return a Geography that provides geographical information. |
java.lang.String |
getImageAssetSubFolder()
Return the image asset sub folder name. |
java.lang.String |
getImagePath()
Return the absolute images directory path. |
java.lang.String |
getImageUrl()
Return the image url. |
static ElasticPath |
getInstance()
Return the singleton ElasticPath . |
float |
getJPEGQuality()
Returns the jpeg quality to use when resizing a jpeg in the dynamic image resizing engine. |
java.util.Map |
getLocaleToLanguageMap()
Get a map of supported locales mapped to their language names. |
int |
getMaximumSuggestions()
Returns the maximum number of suggestions that will be returned with the search results. |
int |
getMaximumSuggestionsPerWord()
Returns the maximum number of suggestions per word that will be generated when generating search suggestions. |
int |
getMaxReturnNumber()
Returns the number of maximum results to return to the search client as the search result. |
java.lang.String |
getMessage(java.lang.String code,
java.lang.Object[] args,
java.lang.String defaultMessage,
java.util.Locale locale)
Gets the localized message. |
java.lang.String |
getMessageDefaultLocale(java.lang.String code,
java.lang.Object[] args,
java.lang.String defaultMessage)
Gets the localized message. |
int |
getMinimumResultsThreshold()
Returns the number of search results that, if not exceeded will trigger the generation of search suggestions. |
float |
getMinimumSimilarity()
Returns the minimum similarity fuzzy search setting, value should be between 0 and 1. |
java.lang.String |
getNoImage()
Returns the image to use when a catalog image does not exist. |
PaymentGateway |
getPaymentGateway(PaymentType paymentType)
Get the payment gateway for the given payment type (e.g. |
int |
getPowerReviewsMerchantId()
Returns the PowerReviews merchant id. |
int |
getPrefixLength()
Returns the fuzzy search setting for the length of common non-fuzzy prefix. |
java.util.Map |
getPropertiesWithNameStartsWith(java.lang.String prefix)
Return name and values of those properties starts with the given string. |
java.lang.String |
getSecureAssetPath()
Return the absolute secure asset (digital goods) directory path. |
java.lang.String |
getSecureAssetSubFolder()
Return the secure asset (digital goods) sub folder name. |
java.lang.String |
getSfContextUrl()
Return the store front context URL. |
int |
getTopSellerCount()
Returns the number of top seller products to display. |
java.lang.String |
getUnitsLength()
Returns the unit measurement of length. |
java.lang.String |
getUnitsWeight()
Returns the unit measurement of weight. |
int |
getUserIdMode()
Return the mode to generate user Id. |
int |
getUserMaintainMode()
Return the user maintenance mode. |
Utility |
getUtility()
Returns the Utility instance. |
org.springframework.web.context.WebApplicationContext |
getWebApplicationContext()
Return the web application context. |
java.lang.String |
getWebInfPath()
Return the absolute WEB-INF directory path. |
boolean |
isAttributeFilterEnabled()
check the attributeFilter is enabled. |
boolean |
isPowerReviewsEnabled()
Returns true if PowerReviews has been enabled, otherwise, false . |
boolean |
isSeoEnabled()
Returns true if SEO(Search Engine Optimization) has been enabled, otherwise, false . |
void |
setAccuracy(float accuracy)
Sets the degree of similarity that a word must have to the original word in order to be suggested. |
void |
setApplicationContext(org.springframework.context.ApplicationContext context)
Set the web application context. |
void |
setCheckoutTransactionBehaviour(CheckoutTransactionBehaviour behaviour)
Sets the checkoutTransactionBehaviour that defines how a checkout transaction is processed. |
void |
setCustomerProfileAttributes(java.util.Map customerProfileAttributes)
Sets the customer profile attribute map. |
void |
setDatabaseMetaData(java.sql.DatabaseMetaData databaseMetaData)
Called in EPContextListener to set the DatabaseMetaData at the start up time. |
void |
setDomainBeanFactory(PrototypeBeanFactory domainBeanFactory)
Sets PrototypeBeanFactory for domain objects. |
void |
setMaximumSuggestions(int suggestions)
Sets the maximum number of suggestions that will be returned with the search results. |
void |
setMaximumSuggestionsPerWord(int maximumSuggestionsPerWord)
Sets the maximum number of suggestions per word that will be generated when generating search suggestions. |
void |
setMaxReturnNumber(int number)
Sets the number of maximum results to return to the search client as the search result. |
void |
setMinimumResultsThreshold(int minimumResultsThreshold)
Sets the number of search results that, if not exceeded will trigger the generation of search suggestions. |
void |
setMinimumSimilarity(float minimumSimilarity)
Sets the minimum similarity fuzzy search setting, value should be between 0 and 1. |
void |
setPaymentGatewayMap(java.util.Map paymentGatewayMap)
Set the payment gateway map, keyed by the payment type (e.g. |
void |
setPrefixLength(int prefixLength)
Sets fuzzy search setting for the length of common non-fuzzy prefix. |
void |
setProperties(java.util.Map properties)
Set the properties. |
void |
setWebApplicationContext(org.springframework.web.context.WebApplicationContext context)
Set the web application context. |
void |
setWebInfPath(java.lang.String webInfPath)
Set the absolute path to the WEB-INF directory. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public void clearAllAttributeRanges()
clearAllAttributeRanges
in interface ElasticPath
public void clearAllAttributeSimpleValues()
clearAllAttributeSimpleValues
in interface ElasticPath
public void clearAllPriceRanges()
clearAllPriceRanges
in interface ElasticPath
public java.lang.String get(java.lang.String name)
get
in interface ElasticPath
name
- Name of the property whose value is to be retrieved
public java.lang.String get(java.lang.String name, java.lang.String defaultValue)
get
in interface ElasticPath
name
- the property name to retrievedefaultValue
- the default value to return if the given property is not defined
public float getAccuracy()
getAccuracy
in interface ElasticPath
public java.util.Map getAll()
getAll
in interface ElasticPath
public java.util.Map getAllAttributeRanges()
Map
.
The attribute code will be used as the map key .
And the value will be a AttributeRangeFilter
.
getAllAttributeRanges
in interface ElasticPath
Map
.public java.util.Map getAllAttributeSimpleValues()
Map
.
The filter id will be used as the map key .
And the value will be a AttributeFilter
.
getAllAttributeSimpleValues
in interface ElasticPath
Map
.public java.util.Map getAllAttributesMap()
Attribute
.
getAllAttributesMap
in interface ElasticPath
public java.util.Map getAllCurrencies()
getAllCurrencies
in interface ElasticPath
public java.util.Map getAllLocales()
getAllLocales
in interface ElasticPath
Locale
objectpublic java.util.Map getAllPriceRanges()
Map
.
The key will be like : "price-between-USD-90-and-100".
And the value will be a PriceFilter
.
getAllPriceRanges
in interface ElasticPath
Map
.public java.util.List getAllShipmentCarriers()
getAllShipmentCarriers
in interface ElasticPath
public java.util.SortedMap getAttributeSimpleValuesMap(java.lang.String attributeCode)
Product
to decide which attribute range it should belongs to.
The key and the value will be the same AttributeRangeFilter
.
getAttributeSimpleValuesMap
in interface ElasticPath
attributeCode
- the attributeCode
public java.lang.Object getBean(java.lang.String name)
getBean
in interface ElasticPath
name
- bean id
public java.util.Map getBoolMap()
getBoolMap
in interface ElasticPath
public java.util.SortedMap getBottomLevelAttributeRanges(java.lang.String attributeCode)
Product
to decide which attribute range it should belongs to.
The key and the value will be the same AttributeRangeFilter
.
getBottomLevelAttributeRanges
in interface ElasticPath
attributeCode
- the attributeCode
public java.util.SortedMap getBottomLevelPriceRanges(java.util.Currency currency)
Product
to decide which price range it should belongs to.
The key and the value will be the same PriceFilter
.
getBottomLevelPriceRanges
in interface ElasticPath
currency
- the currency
public java.lang.String getCatalogAssetPath()
getCatalogAssetPath
in interface ElasticPath
public int getCatalogViewPagination()
getCatalogViewPagination
in interface ElasticPath
public CheckoutTransactionBehaviour getCheckoutTransactionBehaviour()
CheckoutTransactionBehaviour
object that defines how a checkout transaction is to be processed.
getCheckoutTransactionBehaviour
in interface ElasticPath
CheckoutTransactionBehaviour
objectpublic java.lang.String getCmContextUrl()
getCmContextUrl
in interface ElasticPath
public java.lang.String getContentEncoding()
getContentEncoding
in interface ElasticPath
public Geography getCountries()
Geography
that provides geographical information.
getCountries
in interface ElasticPath
Geography
objectpublic java.util.Map getCustomerProfileAttributes()
getCustomerProfileAttributes
in interface ElasticPath
public java.sql.DatabaseMetaData getDatabaseMetaData()
getDatabaseMetaData
in interface ElasticPath
public java.lang.String getDatabaseProductName() throws EpSystemException
getDatabaseProductName
in interface ElasticPath
EpSystemException
- in case of errorpublic java.lang.String getDataFileEncoding()
getDataFileEncoding
in interface ElasticPath
public java.lang.String getDefaultCountry()
getDefaultCountry
in interface ElasticPath
public java.util.Currency getDefaultCurrency()
getDefaultCurrency
in interface ElasticPath
public java.text.SimpleDateFormat getDefaultDateFormat()
getDefaultDateFormat
in interface ElasticPath
public java.util.Locale getDefaultLocale()
getDefaultLocale
in interface ElasticPath
public PrototypeBeanFactory getDomainBeanFactory()
public java.lang.String getEmailCmUrl()
getEmailCmUrl
in interface ElasticPath
public java.lang.String getEmailStoreUrl()
getEmailStoreUrl
in interface ElasticPath
public java.lang.String getEpBuildNo()
getEpBuildNo
in interface ElasticPath
public java.lang.String getEpVersion()
getEpVersion
in interface ElasticPath
public java.lang.String getFileAssetPath()
getFileAssetPath
in interface ElasticPath
public java.lang.String getFileAssetSubFolder()
getFileAssetSubFolder
in interface ElasticPath
public Geography getGeography()
Geography
that provides geographical information.
getGeography
in interface ElasticPath
Geography
objectpublic java.lang.String getImageAssetSubFolder()
getImageAssetSubFolder
in interface ElasticPath
public java.lang.String getImagePath()
getImagePath
in interface ElasticPath
public java.lang.String getImageUrl()
getImageUrl
in interface ElasticPath
public static ElasticPath getInstance()
ElasticPath
. Create default EP if one hasn't been created already.
ElasticPath
public float getJPEGQuality()
getJPEGQuality
in interface ElasticPath
public java.util.Map getLocaleToLanguageMap()
getLocaleToLanguageMap
in interface ElasticPath
public int getMaximumSuggestions()
getMaximumSuggestions
in interface ElasticPath
public int getMaximumSuggestionsPerWord()
getMaximumSuggestionsPerWord
in interface ElasticPath
public int getMaxReturnNumber()
getMaxReturnNumber
in interface ElasticPath
public java.lang.String getMessage(java.lang.String code, java.lang.Object[] args, java.lang.String defaultMessage, java.util.Locale locale)
getMessage
in interface ElasticPath
code
- - the message key.args
- - the args for the message if needed.defaultMessage
- - the default message to display if the given message key does not exists.locale
- - the locale that message needs to be in.
public java.lang.String getMessageDefaultLocale(java.lang.String code, java.lang.Object[] args, java.lang.String defaultMessage)
getMessageDefaultLocale
in interface ElasticPath
code
- - the message key.args
- - the args for the message if needed.defaultMessage
- - the default message to display if the given message key does not exists.
public int getMinimumResultsThreshold()
getMinimumResultsThreshold
in interface ElasticPath
public float getMinimumSimilarity()
getMinimumSimilarity
in interface ElasticPath
public java.lang.String getNoImage()
getNoImage
in interface ElasticPath
public PaymentGateway getPaymentGateway(PaymentType paymentType)
getPaymentGateway
in interface ElasticPath
paymentType
- the payment type
public int getPowerReviewsMerchantId()
getPowerReviewsMerchantId
in interface ElasticPath
public int getPrefixLength()
getPrefixLength
in interface ElasticPath
public java.util.Map getPropertiesWithNameStartsWith(java.lang.String prefix)
getPropertiesWithNameStartsWith
in interface ElasticPath
prefix
- the prefix of the name
public java.lang.String getSecureAssetPath()
getSecureAssetPath
in interface ElasticPath
public java.lang.String getSecureAssetSubFolder()
getSecureAssetSubFolder
in interface ElasticPath
public java.lang.String getSfContextUrl()
getSfContextUrl
in interface ElasticPath
public int getTopSellerCount()
getTopSellerCount
in interface ElasticPath
public java.lang.String getUnitsLength()
getUnitsLength
in interface ElasticPath
public java.lang.String getUnitsWeight()
getUnitsWeight
in interface ElasticPath
public int getUserIdMode()
getUserIdMode
in interface ElasticPath
public int getUserMaintainMode()
getUserMaintainMode
in interface ElasticPath
public Utility getUtility()
Utility
instance.
getUtility
in interface ElasticPath
public org.springframework.web.context.WebApplicationContext getWebApplicationContext()
getWebApplicationContext
in interface ElasticPath
public java.lang.String getWebInfPath()
getWebInfPath
in interface ElasticPath
public boolean isAttributeFilterEnabled()
isAttributeFilterEnabled
in interface ElasticPath
public boolean isPowerReviewsEnabled()
true
if PowerReviews has been enabled, otherwise, false
.
isPowerReviewsEnabled
in interface ElasticPath
true
if PowerReviews has been enabled, otherwise, false
public boolean isSeoEnabled()
true
if SEO(Search Engine Optimization) has been enabled, otherwise, false
.
isSeoEnabled
in interface ElasticPath
true
if SEO(Search Engine Optimization) has been enabled, otherwise, false
public void setAccuracy(float accuracy)
setAccuracy
in interface ElasticPath
accuracy
- the similaritypublic void setApplicationContext(org.springframework.context.ApplicationContext context)
setApplicationContext
in interface org.springframework.context.ApplicationContextAware
context
- the web application context to set.
EpSystemException
- in case of errorpublic void setCheckoutTransactionBehaviour(CheckoutTransactionBehaviour behaviour)
checkoutTransactionBehaviour
that defines how a checkout transaction is processed.
setCheckoutTransactionBehaviour
in interface ElasticPath
behaviour
- the behaviour enum objectpublic void setCustomerProfileAttributes(java.util.Map customerProfileAttributes)
setCustomerProfileAttributes
in interface ElasticPath
customerProfileAttributes
- the customer profile attributes mappublic void setDatabaseMetaData(java.sql.DatabaseMetaData databaseMetaData) throws EpSystemException
EPContextListener
to set the DatabaseMetaData at the start up time.
setDatabaseMetaData
in interface ElasticPath
databaseMetaData
- Database metadata.
EpSystemException
- in case of errorpublic void setDomainBeanFactory(PrototypeBeanFactory domainBeanFactory)
domainBeanFactory
- PrototypeBeanFactory for domain objects.public void setMaximumSuggestions(int suggestions)
setMaximumSuggestions
in interface ElasticPath
suggestions
- the maximum number of suggestionspublic void setMaximumSuggestionsPerWord(int maximumSuggestionsPerWord)
setMaximumSuggestionsPerWord
in interface ElasticPath
maximumSuggestionsPerWord
- the maximum number of suggestions per wordpublic void setMaxReturnNumber(int number)
setMaxReturnNumber
in interface ElasticPath
number
- the number of maximum results to return, set it to 0 for no limit.public void setMinimumResultsThreshold(int minimumResultsThreshold)
setMinimumResultsThreshold
in interface ElasticPath
minimumResultsThreshold
- the minimum results thresholdpublic void setMinimumSimilarity(float minimumSimilarity)
setMinimumSimilarity
in interface ElasticPath
minimumSimilarity
- the minimum similarity fuzzy search settingpublic void setPaymentGatewayMap(java.util.Map paymentGatewayMap)
setPaymentGatewayMap
in interface ElasticPath
paymentGatewayMap
- the payment gateway map.public void setPrefixLength(int prefixLength)
setPrefixLength
in interface ElasticPath
prefixLength
- length of common non-fuzzy prefixpublic void setProperties(java.util.Map properties)
setProperties
in interface ElasticPath
properties
- the propertiespublic void setWebApplicationContext(org.springframework.web.context.WebApplicationContext context) throws EpSystemException
setWebApplicationContext
in interface ElasticPath
context
- the web application context to set.
EpSystemException
- in case of errorpublic void setWebInfPath(java.lang.String webInfPath)
setWebInfPath
in interface ElasticPath
webInfPath
- the absolute path
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |