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,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 the
ClassificationService backed by Jalo API an flexible search.- See Also:
-
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, txManagerFields inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
tenant -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttributeUnits(ClassificationSystemVersionModel systemVersion) Returns a list of all classification attribute units.getFeature(ItemModel item, ClassAttributeAssignmentModel assignment) Deprecated, for removal: This API element is subject to removal in a future version.since agesgetFeature(ProductModel product, ClassAttributeAssignmentModel assignment) Returns a classification feature for a given product and assignment.getFeatures(ProductModel product) Returns a list of classification features for a given product.getFeatures(ProductModel product, List<ClassAttributeAssignmentModel> assignments) Returns a list of classification features for a given product and assignments.getProductsByFilter(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, setTxManagerMethods inherited from class de.hybris.platform.servicelayer.internal.service.AbstractService
afterPropertiesSet, getCurrentTenant, setBeanName, setCurrentTenant, writeReplace
-
Constructor Details
-
DefaultClassificationService
public DefaultClassificationService()
-
-
Method Details
-
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
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
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
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
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
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 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, 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
-
setProductService
-
setFormatFactory
-
setLoadStoreFeaturesStrategy
-
setClassResolverStrategy
-