Class ClassificationObjectValueHandler
- java.lang.Object
-
- de.hybris.platform.cockpit.services.values.impl.ClassificationObjectValueHandler
-
- All Implemented Interfaces:
ObjectValueHandler
public class ClassificationObjectValueHandler extends java.lang.Object implements ObjectValueHandler
Responsible for loading and storing of classification values.
-
-
Field Summary
Fields Modifier and Type Field Description protected ClassificationServiceclassificationService
-
Constructor Summary
Constructors Constructor Description ClassificationObjectValueHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected ItemModelfetchItem(java.lang.Object source)protected ClassificationServicegetClassificationService()protected TypeServicegetCockpitTypeService()CommonI18NServicegetCommonI18NService()protected FeatureContainergetFeatureContainer(ItemModel item, ClassAttributeAssignment attributeAssignment)I18NServicegetI18NService()protected java.util.Set<LanguageModel>getLanguageModels(java.util.Set<java.lang.String> isoCodes)protected java.util.Set<Language>getLanguages(java.util.Set<java.lang.String> isoCodes)Deprecated.since 6.3, usegetLanguageModels(Set)insteadprotected java.util.Set<ClassAttributePropertyDescriptor>getMatchingDescriptors(ItemModel itemModel, java.util.Set<PropertyDescriptor> descriptors)ModelServicegetModelService()protected SessionServicegetSessionService()protected TypeServicegetTypeService()protected java.lang.ObjectgetValue(Feature feature, java.util.Set<java.lang.String> languageIsos, boolean multi, boolean localized)protected java.lang.ObjectgetValueSimple(Feature feature, boolean multi)voidloadValues(ObjectValueContainer valueContainer, ObjectType type, java.lang.Object source, java.util.Set<PropertyDescriptor> descriptors, java.util.Set<java.lang.String> languageIsoCodes)Loads values of given descriptors and in given languages.protected java.util.Map<ClassAttributePropertyDescriptor,java.lang.Object>readValues(ItemModel item, java.util.Set<ClassAttributePropertyDescriptor> matchingProperties, java.util.Set<java.lang.String> languageIsoCodes)voidsetClassificationService(ClassificationService classificationService)voidsetCockpitTypeService(TypeService cockpitTypeService)voidsetCommonI18NService(CommonI18NService commonI18NService)voidsetI18nService(I18NService i18NService)voidsetModelService(ModelService modelService)voidsetSessionService(SessionService sessionService)voidsetTypeService(TypeService typeService)protected voidsetValue(Feature feature, java.lang.Object value, java.lang.String langIso, boolean multiple)protected voidsetValueSimple(Feature feature, java.lang.Object value, boolean multiple)voidstoreValues(ObjectValueContainer container)Stores values of the given value container.voidstoreValues(ObjectValueContainer container, boolean forceWrite)Stores values of the given value container.protected java.lang.ObjectunwrapClassValue(java.lang.Object value, Feature feature)voidupdateValues(ObjectValueContainer container, java.util.Set<java.lang.String> languageIsoCodes)Updates values of the given value container in given languages.voidupdateValues(ObjectValueContainer container, java.util.Set<java.lang.String> languageIsoCodes, java.util.Set<PropertyDescriptor> descriptors)Updates values of given descriptors and in given languages.java.lang.ObjectwrapClassValue(java.lang.Object value)
-
-
-
Field Detail
-
classificationService
protected ClassificationService classificationService
-
-
Method Detail
-
loadValues
public void loadValues(ObjectValueContainer valueContainer, ObjectType type, java.lang.Object source, java.util.Set<PropertyDescriptor> descriptors, java.util.Set<java.lang.String> languageIsoCodes) throws ValueHandlerException
Description copied from interface:ObjectValueHandlerLoads values of given descriptors and in given languages. Only object values this value handler is responsible for are loaded!- Specified by:
loadValuesin interfaceObjectValueHandler- Parameters:
valueContainer- container of all valuestype- type of the objectsource- the object itselfdescriptors- descriptors which should be loadedlanguageIsoCodes- languages in which the localized values should be loaded- Throws:
ValueHandlerException- if something goes wrong during value loading
-
getLanguages
@Deprecated protected java.util.Set<Language> getLanguages(java.util.Set<java.lang.String> isoCodes)
Deprecated.since 6.3, usegetLanguageModels(Set)instead
-
getLanguageModels
protected java.util.Set<LanguageModel> getLanguageModels(java.util.Set<java.lang.String> isoCodes)
-
readValues
protected java.util.Map<ClassAttributePropertyDescriptor,java.lang.Object> readValues(ItemModel item, java.util.Set<ClassAttributePropertyDescriptor> matchingProperties, java.util.Set<java.lang.String> languageIsoCodes)
-
getMatchingDescriptors
protected java.util.Set<ClassAttributePropertyDescriptor> getMatchingDescriptors(ItemModel itemModel, java.util.Set<PropertyDescriptor> descriptors)
-
fetchItem
protected ItemModel fetchItem(java.lang.Object source) throws ValueHandlerException
- Throws:
ValueHandlerException
-
storeValues
public void storeValues(ObjectValueContainer container) throws ValueHandlerException
Description copied from interface:ObjectValueHandlerStores values of the given value container. Only object values this value handler is responsible for are stored!- Specified by:
storeValuesin interfaceObjectValueHandler- Parameters:
container- container of all values- Throws:
ValueHandlerException- something goes wrong during value storing
-
storeValues
public void storeValues(ObjectValueContainer container, boolean forceWrite) throws ValueHandlerException
Description copied from interface:ObjectValueHandlerStores values of the given value container. Only object values this value handler is responsible for are stored!- Specified by:
storeValuesin interfaceObjectValueHandler- Parameters:
container- container of all valuesforceWrite- store values even if they are not marked as modified- Throws:
ValueHandlerException- something goes wrong during value storing
-
getFeatureContainer
protected FeatureContainer getFeatureContainer(ItemModel item, ClassAttributeAssignment attributeAssignment)
-
getValue
protected java.lang.Object getValue(Feature feature, java.util.Set<java.lang.String> languageIsos, boolean multi, boolean localized)
-
getValueSimple
protected java.lang.Object getValueSimple(Feature feature, boolean multi)
-
setValue
protected void setValue(Feature feature, java.lang.Object value, java.lang.String langIso, boolean multiple)
-
setValueSimple
protected void setValueSimple(Feature feature, java.lang.Object value, boolean multiple)
-
wrapClassValue
public java.lang.Object wrapClassValue(java.lang.Object value)
-
unwrapClassValue
protected java.lang.Object unwrapClassValue(java.lang.Object value, Feature feature)
-
updateValues
public void updateValues(ObjectValueContainer container, java.util.Set<java.lang.String> languageIsoCodes, java.util.Set<PropertyDescriptor> descriptors) throws ValueHandlerException
Description copied from interface:ObjectValueHandlerUpdates values of given descriptors and in given languages. Only object values this value handler is responsible for are updated!- Specified by:
updateValuesin interfaceObjectValueHandler- Parameters:
container- container of all valueslanguageIsoCodes- languages in which the localized values should be loadeddescriptors- descriptors which should be updated- Throws:
ValueHandlerException- if something goes wrong during value loading
-
updateValues
public void updateValues(ObjectValueContainer container, java.util.Set<java.lang.String> languageIsoCodes) throws ValueHandlerException
Description copied from interface:ObjectValueHandlerUpdates values of the given value container in given languages. Only object values this value handler is responsible for are updated!- Specified by:
updateValuesin interfaceObjectValueHandler- Parameters:
container- container of all valueslanguageIsoCodes- languages in which the localized values should be loaded- Throws:
ValueHandlerException- if something goes wrong during value loading
-
getCockpitTypeService
protected TypeService getCockpitTypeService()
-
setCockpitTypeService
public void setCockpitTypeService(TypeService cockpitTypeService)
-
getTypeService
protected TypeService getTypeService()
-
setTypeService
public void setTypeService(TypeService typeService)
-
setModelService
public void setModelService(ModelService modelService)
-
getModelService
public ModelService getModelService()
-
setCommonI18NService
public void setCommonI18NService(CommonI18NService commonI18NService)
-
getCommonI18NService
public CommonI18NService getCommonI18NService()
-
setI18nService
public void setI18nService(I18NService i18NService)
-
getI18NService
public I18NService getI18NService()
-
getSessionService
protected SessionService getSessionService()
-
setSessionService
public void setSessionService(SessionService sessionService)
-
getClassificationService
protected ClassificationService getClassificationService()
-
setClassificationService
public void setClassificationService(ClassificationService classificationService)
-
-