Class DefaultClassificationService
- java.lang.Object
-
- de.hybris.platform.servicelayer.internal.service.AbstractService
-
- de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
-
- de.hybris.platform.classification.impl.DefaultClassificationService
-
- All Implemented Interfaces:
ClassificationService,java.io.Serializable,org.springframework.beans.factory.Aware,org.springframework.beans.factory.BeanNameAware,org.springframework.beans.factory.InitializingBean
public class DefaultClassificationService extends AbstractBusinessService implements ClassificationService
Implementation of theClassificationServicebacked by Jalo API an flexible search.- See Also:
- Serialized Form
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
AbstractService.SerializableDTO
-
-
Field Summary
-
Fields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
modelService, sessionService, txManager
-
Fields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
tenant
-
-
Constructor Summary
Constructors Constructor Description DefaultClassificationService()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.util.Collection<ClassificationAttributeUnitModel>getAttributeUnits(ClassificationSystemVersionModel systemVersion)Returns a list of all classification attribute units.FeaturegetFeature(ItemModel item, ClassAttributeAssignmentModel assignment)Deprecated, for removal: This API element is subject to removal in a future version.since agesFeaturegetFeature(ProductModel product, ClassAttributeAssignmentModel assignment)Returns a classification feature for a given product and assignment.FeatureListgetFeatures(ProductModel product)Returns a list of classification features for a given product.FeatureListgetFeatures(ProductModel product, java.util.List<ClassAttributeAssignmentModel> assignments)Returns a list of classification features for a given product and assignments.ProductFilterResultgetProductsByFilter(ProductFilter filter)Returns all products for which the given filter applies.voidreplaceFeatures(ProductModel product, FeatureList modelFeatureList)Sets all the features from the list to the product model.voidsetClassificationDao(ClassificationDao classificationDao)voidsetClassResolverStrategy(ClassificationClassesResolverStrategy classResolverStrategy)voidsetFeature(ProductModel product, Feature feature)Sets a singleFeatureto the givenProductModel.voidsetFeatures(ProductModel product, FeatureList modelFeatureList)Sets the given list of classificationFeatures to the givenProductModel.voidsetFormatFactory(FormatFactory formatFactory)voidsetLoadStoreFeaturesStrategy(LoadStoreFeaturesStrategy loadStoreFeaturesStrategy)voidsetProductService(ProductService productService)-
Methods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractBusinessService
getModelService, getSessionService, getTxManager, setModelService, setSessionService, setTxManager
-
Methods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
afterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplace
-
-
-
-
Method Detail
-
getFeature
@Deprecated(since="ages", forRemoval=true) public Feature getFeature(ItemModel item, ClassAttributeAssignmentModel assignment)Deprecated, for removal: This API element is subject to removal in a future version.since agesUses the Jalo feature API to load feature and then converts them.- Specified by:
getFeaturein interfaceClassificationService- Parameters:
item- the item to load the features for- Returns:
- the features
-
getFeature
public Feature getFeature(ProductModel product, ClassAttributeAssignmentModel assignment)
Description copied from interface:ClassificationServiceReturns a classification feature for a given product and assignment.- Specified by:
getFeaturein interfaceClassificationService- Parameters:
product- the item to load the features for- Returns:
- the features
-
getFeatures
public FeatureList getFeatures(ProductModel product)
Description copied from interface:ClassificationServiceReturns a list of classification features for a given product.- Specified by:
getFeaturesin interfaceClassificationService- Parameters:
product- the product to load the features for- Returns:
- the list of features
-
setFeature
public void setFeature(ProductModel product, Feature feature)
Description copied from interface:ClassificationServiceSets a singleFeatureto the givenProductModel. Any other Feature at the product model won't be changed.- Specified by:
setFeaturein interfaceClassificationService- Parameters:
product- the productfeature- the feature
-
setFeatures
public void setFeatures(ProductModel product, FeatureList modelFeatureList)
Description copied from interface:ClassificationServiceSets the given list of classificationFeatures to the givenProductModel. Any other existing feature at the product model which is not in the list won't change- Specified by:
setFeaturesin interfaceClassificationService- Parameters:
product- the productmodelFeatureList- the FeatureList object
-
replaceFeatures
public void replaceFeatures(ProductModel product, FeatureList modelFeatureList)
Description copied from interface:ClassificationServiceSets all the features from the list to the product model. The existing features at the producr model which are not in the feature list are removed (untyped feature) or the feature values of this feature are cleared (typed feature)- Specified by:
replaceFeaturesin interfaceClassificationService- Parameters:
product- the Product modelmodelFeatureList- contains the features with new/changed feature values. Or features with the same feature values which are already stored - those won't change then.
-
getProductsByFilter
public ProductFilterResult getProductsByFilter(ProductFilter filter) throws UnknownIdentifierException, AmbiguousIdentifierException
Description copied from interface:ClassificationServiceReturns all products for which the given filter applies. The filter is defined in terms of a category and a number of classification attribute code/value pairs. Attribute values can be given as String. This method will convert string values to the type of the actual classification attribute before applying the filter. Scalar types are converted by using thevalueOfmethod of attribute value's class. When the attribute is of type enum the string is interpreted as the code of the enum value.- Specified by:
getProductsByFilterin interfaceClassificationService- Parameters:
filter- the filter to apply- Returns:
- the filtered products
- Throws:
UnknownIdentifierException- when a attribute with a given code cannot be foundAmbiguousIdentifierException- when there's more than one attribute with a given code
-
getAttributeUnits
public java.util.Collection<ClassificationAttributeUnitModel> getAttributeUnits(ClassificationSystemVersionModel systemVersion)
Description copied from interface:ClassificationServiceReturns a list of all classification attribute units.- Specified by:
getAttributeUnitsin interfaceClassificationService- Parameters:
systemVersion- the system version of the classification- Returns:
- the classification attribute units
-
getFeatures
public FeatureList getFeatures(ProductModel product, java.util.List<ClassAttributeAssignmentModel> assignments)
Description copied from interface:ClassificationServiceReturns a list of classification features for a given product and assignments.- Specified by:
getFeaturesin interfaceClassificationService- Parameters:
product- the product to load the features forassignments- list of assignments- Returns:
- the list of features
-
setClassificationDao
public void setClassificationDao(ClassificationDao classificationDao)
-
setProductService
public void setProductService(ProductService productService)
-
setFormatFactory
public void setFormatFactory(FormatFactory formatFactory)
-
setLoadStoreFeaturesStrategy
public void setLoadStoreFeaturesStrategy(LoadStoreFeaturesStrategy loadStoreFeaturesStrategy)
-
setClassResolverStrategy
public void setClassResolverStrategy(ClassificationClassesResolverStrategy classResolverStrategy)
-
-