com.elasticpath.domain
Interface ElasticPath

All Known Implementing Classes:
ElasticPathImpl

public interface ElasticPath

ElasticPath provides configuration and context information to a number of clients across the system.


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 given property name.
 java.lang.String get(java.lang.String name, java.lang.String defaultValue)
          Return the value of a given property 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 values of the given attributeCode, which are defined at the attribute section.
 java.lang.Object getBean(java.lang.String name)
          Get the bean with the given id from spring application context.
 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()
          Return the database product name in use.
 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()
          Returns the system default locale.
 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.
 float getJPEGQuality()
          Returns the jpeg quality.
 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 default image.
 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 that start 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 weigth.
 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 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 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.
 

Method Detail

clearAllAttributeRanges

void clearAllAttributeRanges()
Clears all attribute range information, including bottom level attribute ranges.


clearAllAttributeSimpleValues

void clearAllAttributeSimpleValues()
Clears all attribute simple value information.


clearAllPriceRanges

void clearAllPriceRanges()
Clears all price range information, including bottom level price ranges.


get

java.lang.String get(java.lang.String name)
Return the value of a given property name.

Parameters:
name - the property name to retrieve
Returns:
the value of the given property if it is defined, or null if it is not defined.

get

java.lang.String get(java.lang.String name,
                     java.lang.String defaultValue)
Return the value of a given property name.

Parameters:
name - the property name to retrieve
defaultValue - the default value to return if the given property is not defined
Returns:
the value of the given property if it is defined, or the given default value it is not defined.

getAccuracy

float getAccuracy()
Returns the degree of similarity that a word must have to the original word in order to be suggested.

Returns:
the similarity

getAll

java.util.Map getAll()
Return name and values of all properties as a map.

Returns:
a map contains all properties

getAllAttributeRanges

java.util.Map getAllAttributeRanges()
Returns all defined attribute ranges as a Map.

The attribute code will be used as the map key .

And the value will be a AttributeRangeFilter.

Returns:
all defined attribute ranges as a Map.

getAllAttributeSimpleValues

java.util.Map getAllAttributeSimpleValues()
Returns all defined attribute simple value filters as a Map.

The filter id will be used as the map key .

And the value will be a AttributeFilter.

Returns:
all defined attribute filters as a Map.

getAllAttributesMap

java.util.Map getAllAttributesMap()
This map contains all the attribute defined in the guided-navigation.xml. The key will be the attribute code, and the value will be the Attribute.

Returns:
All the attributes.

getAllCurrencies

java.util.Map getAllCurrencies()
Return all supported currencies.

Returns:
all supported currencies

getAllLocales

java.util.Map getAllLocales()
Get a map of all supported locales.

Returns:
all supported locales as a map of locale code Strings to Locale object

getAllPriceRanges

java.util.Map getAllPriceRanges()
Returns all defined price ranges as a Map.

The key will be like : "price-between-USD-90-and-100".

And the value will be a PriceFilter.

Returns:
all defined price ranges as a Map.

getAllShipmentCarriers

java.util.List getAllShipmentCarriers()
Return all supported shipment carrier.

Returns:
all supported shipment carrier.

getAttributeSimpleValuesMap

java.util.SortedMap getAttributeSimpleValuesMap(java.lang.String attributeCode)
Returns attribute values of the given attributeCode, which are defined at the attribute section. The key will be the attribute value and the value will be the AttributeValueFilter.

Parameters:
attributeCode - the attributeCode
Returns:
attribute ranges of the given attribute code, which are defined at bottom level

getBean

java.lang.Object getBean(java.lang.String name)
Get the bean with the given id from spring application context.

Parameters:
name - bean id
Returns:
instance of the bean with the given id.

getBoolMap

java.util.Map getBoolMap()
Returns a map used by Spring/Velocity for checkboxes.

Returns:
a map containing {Boolean.TRUE -> ""}

getBottomLevelAttributeRanges

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. This is a lookup map for a Product to decide which attribute range it should belongs to.

The key and the value will be the same AttributeRangeFilter.

Parameters:
attributeCode - the attributeCode
Returns:
attribute ranges of the given attribute code, which are defined at bottom level

getBottomLevelPriceRanges

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. This is a lookup map for a Product to decide which price range it should belongs to.

The key and the value will be the same PriceFilter.

Parameters:
currency - the currency
Returns:
price ranges of the given currency, which are defined at bottom level

getCatalogAssetPath

java.lang.String getCatalogAssetPath()
Return the absolute asset directory path.

Returns:
the absolute asset directory path

getCatalogViewPagination

int getCatalogViewPagination()
Return the catalog view pagination.

Returns:
the catalog view pagination

getCheckoutTransactionBehaviour

CheckoutTransactionBehaviour getCheckoutTransactionBehaviour()
Return the CheckoutTransactionBehaviour object that defines how a checkout transaction is to be processed.

Returns:
the CheckoutTransactionBehaviour object

getCmContextUrl

java.lang.String getCmContextUrl()
Return the commerce manager context URL.

Returns:
the commerce manager context URL

getContentEncoding

java.lang.String getContentEncoding()
Returns the content encoding.

Returns:
the content encoding

getCountries

Geography getCountries()
Return a Geography that provides geographical information.

Returns:
the Geography object

getCustomerProfileAttributes

java.util.Map getCustomerProfileAttributes()
Returns a map of all customer profile attributes.

Returns:
a map of all customer profile attributes

getDatabaseMetaData

java.sql.DatabaseMetaData getDatabaseMetaData()
Return database meta data.

Returns:
database meta data

getDatabaseProductName

java.lang.String getDatabaseProductName()
Return the database product name in use.

Returns:
database product name.

getDataFileEncoding

java.lang.String getDataFileEncoding()
Returns the data file encoding.

Returns:
the data file encoding

getDefaultCountry

java.lang.String getDefaultCountry()
Returns the default country.

Returns:
the country

getDefaultCurrency

java.util.Currency getDefaultCurrency()
Returns the default currency.

Returns:
the currency

getDefaultDateFormat

java.text.SimpleDateFormat getDefaultDateFormat()
Returns the default date format.

Returns:
the default date format.

getDefaultLocale

java.util.Locale getDefaultLocale()
Returns the system default locale.

Returns:
the system default locale

getEmailCmUrl

java.lang.String getEmailCmUrl()
Return the URL of the Commerce Manager to be used only in email messages.

Returns:
the cm URL

getEmailStoreUrl

java.lang.String getEmailStoreUrl()
Return the URL of the store to be used only in email messages.

Returns:
the store URL

getEpBuildNo

java.lang.String getEpBuildNo()
Returns the Elastic Path build number.

Returns:
the Elastic Path build number

getEpVersion

java.lang.String getEpVersion()
Returns the Elastic Path version number.

Returns:
the Elastic Path version number

getFileAssetPath

java.lang.String getFileAssetPath()
Return the file asset directory path.

Returns:
the file asset directory path

getFileAssetSubFolder

java.lang.String getFileAssetSubFolder()
Return the file asset sub folder name.

Returns:
the file asset sub folder name.

getGeography

Geography getGeography()
Return a Geography that provides geographical information.

Returns:
the Geography object

getImageAssetSubFolder

java.lang.String getImageAssetSubFolder()
Return the image asset sub folder name.

Returns:
the image asset sub folder name.

getImagePath

java.lang.String getImagePath()
Return the absolute images directory path.

Returns:
the absolute images directory path

getImageUrl

java.lang.String getImageUrl()
Return the image URL.

Returns:
the image URL

getJPEGQuality

float getJPEGQuality()
Returns the jpeg quality.

Returns:
the jpeg quality

getLocaleToLanguageMap

java.util.Map getLocaleToLanguageMap()
Get a map of supported locales mapped to their language names. E.g. "en_US" --> "English"

Returns:
the locale -> Language map

getMaximumSuggestions

int getMaximumSuggestions()
Returns the maximum number of suggestions that will be returned with the search results.

Returns:
the maximum number of suggestions

getMaximumSuggestionsPerWord

int getMaximumSuggestionsPerWord()
Returns the maximum number of suggestions per word that will be generated when generating search suggestions.

Returns:
the maximum number of suggestion per word

getMaxReturnNumber

int getMaxReturnNumber()
Returns the number of maximum results to return to the search client as the search result.

Returns:
the number of maximumu results to return to the search client as the search result

getMessage

java.lang.String getMessage(java.lang.String code,
                            java.lang.Object[] args,
                            java.lang.String defaultMessage,
                            java.util.Locale locale)
Gets the localized message.

Parameters:
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 exist.
locale - - the locale that message needs to be in.
Returns:
localized message string.

getMessageDefaultLocale

java.lang.String getMessageDefaultLocale(java.lang.String code,
                                         java.lang.Object[] args,
                                         java.lang.String defaultMessage)
Gets the localized message.

Parameters:
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.
Returns:
localized message string.

getMinimumResultsThreshold

int getMinimumResultsThreshold()
Returns the number of search results that, if not exceeded will trigger the generation of search suggestions.

Returns:
the minimum results threshold

getMinimumSimilarity

float getMinimumSimilarity()
Returns the minimum similarity fuzzy search setting, value should be between 0 and 1.

Returns:
the minimum similarity fuzzy search setting, value should be between 0 and 1

getNoImage

java.lang.String getNoImage()
Returns the default image.

Returns:
the default image.

getPaymentGateway

PaymentGateway getPaymentGateway(PaymentType paymentType)
Get the payment gateway for the given payment type (e.g. CreditCard).

Parameters:
paymentType - the payment type
Returns:
the payment gateway

getPowerReviewsMerchantId

int getPowerReviewsMerchantId()
Returns the PowerReviews merchant id.

Returns:
the PowerReviews merchant id

getPrefixLength

int getPrefixLength()
Returns the fuzzy search setting for the length of common non-fuzzy prefix.

Returns:
the length of common non-fuzzy prefix

getPropertiesWithNameStartsWith

java.util.Map getPropertiesWithNameStartsWith(java.lang.String prefix)
Return name and values of those properties that start with the given string.

Parameters:
prefix - the prefix of the name
Returns:
those properties starts with the given string

getSecureAssetPath

java.lang.String getSecureAssetPath()
Return the absolute secure asset (digital goods) directory path.

Returns:
the absolute secure asset (digital goods) directory path

getSecureAssetSubFolder

java.lang.String getSecureAssetSubFolder()
Return the secure asset (digital goods) sub folder name.

Returns:
the secure asset (digital goods) sub folder name.

getSfContextUrl

java.lang.String getSfContextUrl()
Return the store front context URL.

Returns:
the store front context URL

getTopSellerCount

int getTopSellerCount()
Returns the number of top seller products to display.

Returns:
the number of top seller products to display

getUnitsLength

java.lang.String getUnitsLength()
Returns the unit measurement of length.

Returns:
the length units

getUnitsWeight

java.lang.String getUnitsWeight()
Returns the unit measurement of weigth.

Returns:
the weight units

getUserIdMode

int getUserIdMode()
Return the mode to generate user Id. 1 - Use user email as user Id, this is default value. 2 - Generate unique premanent user Id, currently will append a random four digit suffix to email address, and use it as User Id. The user Id is created when the customer is created first time. Later on, when the customer change the email address, the user Id will not be changed. 3 - Independent email and user Id

Returns:
the flag to indicate how to generate user Id

getUserMaintainMode

int getUserMaintainMode()
Return the user maintenance mode. 1 - Maintain user password in Local DB, default value. 2 - Maintain user password through JAAS, CM will disable the create/delete and change password function in this mode.

Returns:
the user maintenance mode

getUtility

Utility getUtility()
Returns the Utility instance.

Returns:
the utility instance

getWebApplicationContext

org.springframework.web.context.WebApplicationContext getWebApplicationContext()
Return the web application context.

Returns:
the web application context

getWebInfPath

java.lang.String getWebInfPath()
Return the absolute WEB-INF directory path.

Returns:
the absolute WEB-INF directory path

isAttributeFilterEnabled

boolean isAttributeFilterEnabled()
check the attributeFilter is enabled.

Returns:
the attributeFilterEnabled

isPowerReviewsEnabled

boolean isPowerReviewsEnabled()
Returns true if PowerReviews has been enabled, otherwise, false.

Returns:
true if PowerReviews has been enabled, otherwise, false

isSeoEnabled

boolean isSeoEnabled()
Returns true if SEO(Search Engine Optimization) has been enabled, otherwise, false.

Returns:
true if SEO(Search Engine Optimization) has been enabled, otherwise, false

setAccuracy

void setAccuracy(float accuracy)
Sets the degree of similarity that a word must have to the original word in order to be suggested.

Parameters:
accuracy - the similarity

setCheckoutTransactionBehaviour

void setCheckoutTransactionBehaviour(CheckoutTransactionBehaviour behaviour)
Sets the checkoutTransactionBehaviour that defines how a checkout transaction is processed.

Parameters:
behaviour - the behaviour enum object

setCustomerProfileAttributes

void setCustomerProfileAttributes(java.util.Map customerProfileAttributes)
Sets the customer profile attribute map.

Parameters:
customerProfileAttributes - the customer profile attributes map

setDatabaseMetaData

void setDatabaseMetaData(java.sql.DatabaseMetaData databaseMetaData)
                         throws EpSystemException
Called in EPContextListener to set the DatabaseMetaData at the start up time.

Parameters:
databaseMetaData - Database metadata.
Throws:
EpSystemException - in case of any error

setMaximumSuggestions

void setMaximumSuggestions(int suggestions)
Sets the maximum number of suggestions that will be returned with the search results.

Parameters:
suggestions - the maximum number of suggestions

setMaximumSuggestionsPerWord

void setMaximumSuggestionsPerWord(int maximumSuggestionsPerWord)
Sets the maximum number of suggestions per word that will be generated when generating search suggestions.

Parameters:
maximumSuggestionsPerWord - the maximum number of suggestions per word

setMaxReturnNumber

void setMaxReturnNumber(int number)
Sets the number of maximum results to return to the search client as the search result.

Parameters:
number - the number of maximum results to return, set it to 0 for no limit.

setMinimumResultsThreshold

void setMinimumResultsThreshold(int minimumResultsThreshold)
Sets the number of search results that, if not exceeded will trigger the generation of search suggestions.

Parameters:
minimumResultsThreshold - the minimum results threshold

setMinimumSimilarity

void setMinimumSimilarity(float minimumSimilarity)
Sets the minimum similarity fuzzy search setting, value should be between 0 and 1.

Parameters:
minimumSimilarity - the minimum similarity fuzzy search setting

setPaymentGatewayMap

void setPaymentGatewayMap(java.util.Map paymentGatewayMap)
Set the payment gateway map, keyed by the payment type (e.g. "CreditCard", "PayPalExpress").

Parameters:
paymentGatewayMap - the payment gateway map.

setPrefixLength

void setPrefixLength(int prefixLength)
Sets fuzzy search setting for the length of common non-fuzzy prefix.

Parameters:
prefixLength - length of common non-fuzzy prefix

setProperties

void setProperties(java.util.Map properties)
Set the properties.

Parameters:
properties - the properties

setWebApplicationContext

void setWebApplicationContext(org.springframework.web.context.WebApplicationContext context)
Set the web application context.

Parameters:
context - the web application context to set.

setWebInfPath

void setWebInfPath(java.lang.String webInfPath)
Set the absolute path to the WEB-INF directory.

Parameters:
webInfPath - the absolute path