Class DefaultItemModificationHistoryService
java.lang.Object
com.hybris.backoffice.cockpitng.dataaccess.facades.object.savedvalues.DefaultItemModificationHistoryService
- All Implemented Interfaces:
ItemModificationHistoryService
public class DefaultItemModificationHistoryService
extends Object
implements ItemModificationHistoryService
This service simplifies work with item history (
SavedValuesModel). It covers both standard and localized
attributes.-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected ItemModificationInfocomputeModificationsForModifiedItem(ItemModel itemModel, ModelValueHistory modelHistory, boolean isNew) protected ObjectconvertLocalizedMapToPersistenceLayer(Map<Locale, Object> localizedMap) createModificationInfo(ItemModel itemModel) Creates ItemModificationInfo object which could be later passed toItemModificationHistoryService.logItemModification(ItemModificationInfo).protected JaloConnectionprotected ObjectgetOriginalValue(ItemModel model, String attribute, ModelValueHistory history) protected ObjectgetOriginalValue(ItemModel model, String attribute, Locale locale, ModelValueHistory history) getSavedValues(ItemModel item) Gets the saved valuesprotected booleanisEncrypted(ItemModel model, String attribute) voidlogItemModification(ItemModificationInfo modificationInfo) Persist modification infoprotected voidlogModifications(ItemModel model, ItemModificationInfo modificationInfo) voidsetAttributesExcludedFromModificationHistory(Map<String, Set<String>> attributesExcludedFromModificationHistory) voidsetCommonI18NService(CommonI18NService commonI18NService) voidsetFlexibleSearchService(FlexibleSearchService flexibleSearchService) voidsetI18NService(I18NService i18NService) voidsetModelService(ModelService modelService) voidsetTypeFacade(com.hybris.cockpitng.dataaccess.facades.type.TypeFacade typeFacade) protected ObjecttoPersistenceLayer(Object value, boolean localized)
-
Constructor Details
-
DefaultItemModificationHistoryService
public DefaultItemModificationHistoryService()
-
-
Method Details
-
getSavedValues
Description copied from interface:ItemModificationHistoryServiceGets the saved values- Specified by:
getSavedValuesin interfaceItemModificationHistoryService- Parameters:
item- item for which we looking for SavedValues- Returns:
- List of all SavedValues for given
item
-
setFlexibleSearchService
-
getModelService
-
setModelService
-
getI18NService
-
setI18NService
-
getCommonI18NService
-
setCommonI18NService
-
setTypeFacade
public void setTypeFacade(com.hybris.cockpitng.dataaccess.facades.type.TypeFacade typeFacade) -
logItemModification
Description copied from interface:ItemModificationHistoryServicePersist modification info- Specified by:
logItemModificationin interfaceItemModificationHistoryService- Parameters:
modificationInfo- info to log- See Also:
-
createModificationInfo
Description copied from interface:ItemModificationHistoryServiceCreates ItemModificationInfo object which could be later passed toItemModificationHistoryService.logItemModification(ItemModificationInfo). Should be called after changes made on object, but before saving it.- Specified by:
createModificationInfoin interfaceItemModificationHistoryService- Parameters:
itemModel- changed item- Returns:
- ItemModificationInfo
- See Also:
-
computeModificationsForModifiedItem
protected ItemModificationInfo computeModificationsForModifiedItem(ItemModel itemModel, ModelValueHistory modelHistory, boolean isNew) -
getOriginalValue
-
isEncrypted
-
getOriginalValue
protected Object getOriginalValue(ItemModel model, String attribute, Locale locale, ModelValueHistory history) -
logModifications
-
getJaloConnection
-
toPersistenceLayer
-
convertLocalizedMapToPersistenceLayer
-
getAttributesExcludedFromModificationHistory
-
setAttributesExcludedFromModificationHistory
-