Class DefaultSnCommonConfigurationService
- java.lang.Object
-
- de.hybris.platform.searchservices.admin.service.impl.DefaultSnCommonConfigurationService
-
- All Implemented Interfaces:
SnCommonConfigurationService
public class DefaultSnCommonConfigurationService extends java.lang.Object implements SnCommonConfigurationService
Default implementation ofSnCommonConfigurationService.
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.StringEXPRESSION_PARAMprotected static java.lang.StringINDEX_TYPE_ID_PARAM
-
Constructor Summary
Constructors Constructor Description DefaultSnCommonConfigurationService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleancanExportConfiguration(java.lang.String indexConfigurationId)Returns whether the index configuration and everything associated can be exported to the search provider.protected SnExpressionInfocreateExpression(SnField field)protected SnExpressionInfocreateIdExpression()protected SnExpressionInfocreateScoreExpression()voidexportConfiguration(java.lang.String indexConfigurationId)Exports the index configuration and everything associated to the search provider.CatalogServicegetCatalogService()java.util.List<CatalogVersionModel>getCatalogVersions(java.lang.String indexTypeId)Returns the catalog versions for the given index type.CatalogVersionServicegetCatalogVersionService()CommonI18NServicegetCommonI18NService()java.util.List<CurrencyModel>getCurrencies(java.lang.String indexTypeId)Returns the currencies for the given index type.java.util.List<SnExpressionInfo>getFacetExpressions(java.lang.String indexTypeId)Returns the valid facet expressions.java.util.List<SnExpressionInfo>getGroupExpressions(java.lang.String indexTypeId)Returns the valid group expressions.java.util.List<LanguageModel>getLanguages(java.lang.String indexTypeId)Returns the languages for the given index type.SnFieldTypeRegistrygetSnFieldTypeRegistry()SnIndexConfigurationServicegetSnIndexConfigurationService()SnIndexTypeServicegetSnIndexTypeService()SnSearchProviderFactorygetSnSearchProviderFactory()SnSessionServicegetSnSessionService()SnSynonymDictionaryServicegetSnSynonymDictionaryService()java.util.List<SnExpressionInfo>getSortExpressions(java.lang.String indexTypeId)Returns the valid sort expressions.UserModelgetUser(java.lang.String indexTypeId)Returns the user for the given index type.UserServicegetUserService()booleanisValidFacetExpression(java.lang.String indexTypeId, java.lang.String expression)Checks if a given expression is a valid facet expression.protected booleanisValidFacetField(SnField field)booleanisValidGroupExpression(java.lang.String indexTypeId, java.lang.String expression)Checks if a given expression is a valid group expression.protected booleanisValidGroupField(SnField field)booleanisValidSortExpression(java.lang.String indexTypeId, java.lang.String expression)Checks if a given expression is a valid sort expression.protected booleanisValidSortField(SnField field)voidsetCatalogService(CatalogService catalogService)voidsetCatalogVersionService(CatalogVersionService catalogVersionService)voidsetCommonI18NService(CommonI18NService commonI18NService)voidsetSnFieldTypeRegistry(SnFieldTypeRegistry snFieldTypeRegistry)voidsetSnIndexConfigurationService(SnIndexConfigurationService snIndexConfigurationService)voidsetSnIndexTypeService(SnIndexTypeService snIndexTypeService)voidsetSnSearchProviderFactory(SnSearchProviderFactory snSearchProviderFactory)voidsetSnSessionService(SnSessionService snSessionService)voidsetSnSynonymDictionaryService(SnSynonymDictionaryService snSynonymDictionaryService)voidsetUserService(UserService userService)
-
-
-
Field Detail
-
INDEX_TYPE_ID_PARAM
protected static final java.lang.String INDEX_TYPE_ID_PARAM
- See Also:
- Constant Field Values
-
EXPRESSION_PARAM
protected static final java.lang.String EXPRESSION_PARAM
- See Also:
- Constant Field Values
-
-
Method Detail
-
getUser
public UserModel getUser(java.lang.String indexTypeId)
Description copied from interface:SnCommonConfigurationServiceReturns the user for the given index type.- Specified by:
getUserin interfaceSnCommonConfigurationService- Parameters:
indexTypeId- - the index type- Returns:
- the user
-
getLanguages
public java.util.List<LanguageModel> getLanguages(java.lang.String indexTypeId)
Description copied from interface:SnCommonConfigurationServiceReturns the languages for the given index type.- Specified by:
getLanguagesin interfaceSnCommonConfigurationService- Parameters:
indexTypeId- - the index type- Returns:
- the languages
-
getCurrencies
public java.util.List<CurrencyModel> getCurrencies(java.lang.String indexTypeId)
Description copied from interface:SnCommonConfigurationServiceReturns the currencies for the given index type.- Specified by:
getCurrenciesin interfaceSnCommonConfigurationService- Parameters:
indexTypeId- - the index type- Returns:
- the currencies
-
getCatalogVersions
public java.util.List<CatalogVersionModel> getCatalogVersions(java.lang.String indexTypeId)
Description copied from interface:SnCommonConfigurationServiceReturns the catalog versions for the given index type.- Specified by:
getCatalogVersionsin interfaceSnCommonConfigurationService- Parameters:
indexTypeId- - the index type- Returns:
- the catalog versions
-
getFacetExpressions
public java.util.List<SnExpressionInfo> getFacetExpressions(java.lang.String indexTypeId)
Description copied from interface:SnCommonConfigurationServiceReturns the valid facet expressions.- Specified by:
getFacetExpressionsin interfaceSnCommonConfigurationService- Parameters:
indexTypeId- - the index type- Returns:
- the facet expressions
-
isValidFacetExpression
public boolean isValidFacetExpression(java.lang.String indexTypeId, java.lang.String expression)Description copied from interface:SnCommonConfigurationServiceChecks if a given expression is a valid facet expression.- Specified by:
isValidFacetExpressionin interfaceSnCommonConfigurationService- Parameters:
indexTypeId- - the index typeexpression- - the expression- Returns:
trueif it is a valid facet expression,falseotherwise
-
isValidFacetField
protected boolean isValidFacetField(SnField field)
-
getSortExpressions
public java.util.List<SnExpressionInfo> getSortExpressions(java.lang.String indexTypeId)
Description copied from interface:SnCommonConfigurationServiceReturns the valid sort expressions.- Specified by:
getSortExpressionsin interfaceSnCommonConfigurationService- Parameters:
indexTypeId- - the index type- Returns:
- the sort expressions
-
isValidSortExpression
public boolean isValidSortExpression(java.lang.String indexTypeId, java.lang.String expression)Description copied from interface:SnCommonConfigurationServiceChecks if a given expression is a valid sort expression.- Specified by:
isValidSortExpressionin interfaceSnCommonConfigurationService- Parameters:
indexTypeId- - the index typeexpression- - the expression- Returns:
trueif it is a valid sort expression,falseotherwise
-
isValidSortField
protected boolean isValidSortField(SnField field)
-
getGroupExpressions
public java.util.List<SnExpressionInfo> getGroupExpressions(java.lang.String indexTypeId)
Description copied from interface:SnCommonConfigurationServiceReturns the valid group expressions.- Specified by:
getGroupExpressionsin interfaceSnCommonConfigurationService- Parameters:
indexTypeId- - the index type- Returns:
- the group expressions
-
isValidGroupExpression
public boolean isValidGroupExpression(java.lang.String indexTypeId, java.lang.String expression)Description copied from interface:SnCommonConfigurationServiceChecks if a given expression is a valid group expression.- Specified by:
isValidGroupExpressionin interfaceSnCommonConfigurationService- Parameters:
indexTypeId- - the index typeexpression- - the expression- Returns:
trueif it is a valid group expression,falseotherwise
-
isValidGroupField
protected boolean isValidGroupField(SnField field)
-
createExpression
protected SnExpressionInfo createExpression(SnField field)
-
createScoreExpression
protected SnExpressionInfo createScoreExpression()
-
createIdExpression
protected SnExpressionInfo createIdExpression()
-
canExportConfiguration
public boolean canExportConfiguration(java.lang.String indexConfigurationId)
Description copied from interface:SnCommonConfigurationServiceReturns whether the index configuration and everything associated can be exported to the search provider.- Specified by:
canExportConfigurationin interfaceSnCommonConfigurationService- Parameters:
indexConfigurationId- - the index configuration id- Returns:
trueif the configuration can be exported,falseotherwise
-
exportConfiguration
public void exportConfiguration(java.lang.String indexConfigurationId) throws SnExceptionDescription copied from interface:SnCommonConfigurationServiceExports the index configuration and everything associated to the search provider.- Specified by:
exportConfigurationin interfaceSnCommonConfigurationService- Parameters:
indexConfigurationId- - the index configuration id- Throws:
SnException- if an error occurs
-
getUserService
public UserService getUserService()
-
setUserService
public void setUserService(UserService userService)
-
getCommonI18NService
public CommonI18NService getCommonI18NService()
-
setCommonI18NService
public void setCommonI18NService(CommonI18NService commonI18NService)
-
getCatalogService
public CatalogService getCatalogService()
-
setCatalogService
public void setCatalogService(CatalogService catalogService)
-
getCatalogVersionService
public CatalogVersionService getCatalogVersionService()
-
setCatalogVersionService
public void setCatalogVersionService(CatalogVersionService catalogVersionService)
-
getSnSessionService
public SnSessionService getSnSessionService()
-
setSnSessionService
public void setSnSessionService(SnSessionService snSessionService)
-
getSnSynonymDictionaryService
public SnSynonymDictionaryService getSnSynonymDictionaryService()
-
setSnSynonymDictionaryService
public void setSnSynonymDictionaryService(SnSynonymDictionaryService snSynonymDictionaryService)
-
getSnIndexConfigurationService
public SnIndexConfigurationService getSnIndexConfigurationService()
-
setSnIndexConfigurationService
public void setSnIndexConfigurationService(SnIndexConfigurationService snIndexConfigurationService)
-
getSnIndexTypeService
public SnIndexTypeService getSnIndexTypeService()
-
setSnIndexTypeService
public void setSnIndexTypeService(SnIndexTypeService snIndexTypeService)
-
getSnFieldTypeRegistry
public SnFieldTypeRegistry getSnFieldTypeRegistry()
-
setSnFieldTypeRegistry
public void setSnFieldTypeRegistry(SnFieldTypeRegistry snFieldTypeRegistry)
-
getSnSearchProviderFactory
public SnSearchProviderFactory getSnSearchProviderFactory()
-
setSnSearchProviderFactory
public void setSnSearchProviderFactory(SnSearchProviderFactory snSearchProviderFactory)
-
-