Package com.hybris.backoffice.bulkedit
Class BulkEditHandler
- java.lang.Object
-
- com.hybris.backoffice.bulkedit.BulkEditHandler
-
- All Implemented Interfaces:
com.hybris.cockpitng.widgets.configurableflow.FlowActionHandler
public class BulkEditHandler extends java.lang.Object implements com.hybris.cockpitng.widgets.configurableflow.FlowActionHandlerBulk edit handler which is responsible for applying changes defined in theBulkEditForm. Params:- bulkEditFormModelKey - path to bulk edit for
BulkEditFormin widget model - required
BulkEditForm.getItemsToEdit(). If any of those operation fails changes will be reverted on all items.
-
-
Constructor Summary
Constructors Constructor Description BulkEditHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidapplyChanges(java.lang.Object item, com.hybris.cockpitng.dataaccess.facades.type.DataType dataType, com.hybris.backoffice.attributechooser.Attribute attribute, BulkEditForm form)protected voidapplyChanges(java.lang.Object item, com.hybris.cockpitng.dataaccess.facades.type.DataType dataType, BulkEditForm bulkEditForm)protected voidbeginTransaction()Deprecated.since 1808, not used anymore.protected voidclearAttribute(java.lang.Object item, com.hybris.cockpitng.dataaccess.facades.type.DataAttribute dataAttribute, com.hybris.backoffice.attributechooser.Attribute attribute)protected voidcommitTransaction()Deprecated.since 1808, not used anymore.BulkEditFormgetBulkEditForm(com.hybris.cockpitng.core.model.WidgetModel widgetModel, java.util.Map<java.lang.String,java.lang.String> parameters)BulkEditValidationHelpergetBulkEditValidationHelper()java.util.Set<java.lang.String>getDisabledInterceptorsBeanNames()ModelServicegetModelService()com.hybris.backoffice.widgets.notificationarea.NotificationServicegetNotificationService()com.hybris.cockpitng.dataaccess.facades.object.ObjectFacadegetObjectFacade()com.hybris.cockpitng.type.ObjectValueServicegetObjectValueService()SessionServicegetSessionService()com.hybris.cockpitng.dataaccess.facades.type.TypeFacadegetTypeFacade()protected booleanisEmptyCollection(java.lang.Object newLocalizedValue)protected booleanisEmptyMap(java.lang.Object newLocalizedValue)protected booleanisEmptyString(java.lang.Object newLocalizedValue)protected booleanisNotEmptyValue(java.lang.Object newLocalizedValue)protected java.util.Optional<com.hybris.cockpitng.dataaccess.facades.type.DataType>loadType(java.lang.Object item)protected java.util.Collection<? super java.lang.Object>mergeCollections(java.util.Collection<? super java.lang.Object> current, java.util.Collection<? super java.lang.Object> valuesToAdd)protected java.util.MapmergeMaps(java.util.Map newValue, java.util.Map currentValue)protected voidnotifyCannotSaveValidationFailed(BulkEditForm bulkEditForm, java.util.Map<java.lang.Object,java.util.List<com.hybris.cockpitng.validation.model.ValidationInfo>> validations)protected voidnotifySaveFailed(com.hybris.cockpitng.widgets.configurableflow.FlowActionHandlerAdapter adapter, com.hybris.cockpitng.dataaccess.facades.object.ObjectFacadeOperationResult<java.lang.Object> saveResult)protected voidnotifySaveSucceeded(com.hybris.cockpitng.widgets.configurableflow.FlowActionHandlerAdapter adapter, BulkEditForm bulkEditForm)voidperform(com.hybris.cockpitng.config.jaxb.wizard.CustomType customType, com.hybris.cockpitng.widgets.configurableflow.FlowActionHandlerAdapter adapter, java.util.Map<java.lang.String,java.lang.String> parameters)protected voidrevertAppliedChanges(BulkEditForm bulkEditForm)protected voidrollbackTransaction()Deprecated.since 1808, not used anymore.protected com.hybris.cockpitng.dataaccess.facades.object.ObjectFacadeOperationResult<java.lang.Object>saveChanges(BulkEditForm bulkEditForm, java.util.Map<java.lang.String,java.lang.String> parameters)protected com.hybris.cockpitng.dataaccess.facades.object.ObjectFacadeOperationResult<java.lang.Object>saveChangesWithInterceptors(BulkEditForm bulkEditForm)protected com.hybris.cockpitng.dataaccess.facades.object.ObjectFacadeOperationResult<java.lang.Object>saveChangesWithoutInterceptors(BulkEditForm bulkEditForm)voidsetBulkEditValidationHelper(BulkEditValidationHelper bulkEditValidationHelper)protected voidsetCollectionValue(java.lang.Object item, com.hybris.backoffice.attributechooser.Attribute attribute, BulkEditForm form)voidsetDisabledInterceptorsBeanNames(java.util.Set<java.lang.String> disabledInterceptorsBeanNames)protected voidsetLocalizedValue(java.lang.Object item, com.hybris.cockpitng.dataaccess.facades.type.DataAttribute dataAttribute, com.hybris.backoffice.attributechooser.Attribute attribute, BulkEditForm form)protected voidsetLocalizedValue(java.lang.Object item, java.util.Set<java.util.Locale> locales, java.lang.String qualifier, java.lang.Object templateObject)protected voidsetLocalizedValue(java.lang.Object item, java.util.Set<java.util.Locale> locales, java.lang.String qualifier, java.util.Map<java.util.Locale,java.lang.Object> newValue)protected voidsetMapValue(java.lang.Object item, com.hybris.backoffice.attributechooser.Attribute attribute, BulkEditForm form)voidsetModelService(ModelService modelService)voidsetNotificationService(com.hybris.backoffice.widgets.notificationarea.NotificationService notificationService)voidsetObjectFacade(com.hybris.cockpitng.dataaccess.facades.object.ObjectFacade objectFacade)voidsetObjectValueService(com.hybris.cockpitng.type.ObjectValueService objectValueService)voidsetSessionService(SessionService sessionService)protected voidsetSingleValue(java.lang.Object item, com.hybris.backoffice.attributechooser.Attribute attribute, BulkEditForm form)protected voidsetSingleValue(java.lang.Object item, com.hybris.backoffice.attributechooser.Attribute attribute, java.lang.Object templateObject)Deprecated.since 1808 please usesetSingleValue(Object, Attribute, BulkEditForm)voidsetTypeFacade(com.hybris.cockpitng.dataaccess.facades.type.TypeFacade typeFacade)protected voidshowValidationErrors(java.util.Map<java.lang.Object,java.util.List<com.hybris.cockpitng.validation.model.ValidationInfo>> validations, com.hybris.cockpitng.widgets.configurableflow.FlowActionHandlerAdapter adapter, BulkEditForm bulkEditForm)
-
-
-
Method Detail
-
perform
public void perform(com.hybris.cockpitng.config.jaxb.wizard.CustomType customType, com.hybris.cockpitng.widgets.configurableflow.FlowActionHandlerAdapter adapter, java.util.Map<java.lang.String,java.lang.String> parameters)- Specified by:
performin interfacecom.hybris.cockpitng.widgets.configurableflow.FlowActionHandler
-
showValidationErrors
protected void showValidationErrors(java.util.Map<java.lang.Object,java.util.List<com.hybris.cockpitng.validation.model.ValidationInfo>> validations, com.hybris.cockpitng.widgets.configurableflow.FlowActionHandlerAdapter adapter, BulkEditForm bulkEditForm)
-
saveChanges
protected com.hybris.cockpitng.dataaccess.facades.object.ObjectFacadeOperationResult<java.lang.Object> saveChanges(BulkEditForm bulkEditForm, java.util.Map<java.lang.String,java.lang.String> parameters)
-
saveChangesWithoutInterceptors
protected com.hybris.cockpitng.dataaccess.facades.object.ObjectFacadeOperationResult<java.lang.Object> saveChangesWithoutInterceptors(BulkEditForm bulkEditForm)
-
saveChangesWithInterceptors
protected com.hybris.cockpitng.dataaccess.facades.object.ObjectFacadeOperationResult<java.lang.Object> saveChangesWithInterceptors(BulkEditForm bulkEditForm)
-
applyChanges
protected void applyChanges(java.lang.Object item, com.hybris.cockpitng.dataaccess.facades.type.DataType dataType, BulkEditForm bulkEditForm)
-
applyChanges
protected void applyChanges(java.lang.Object item, com.hybris.cockpitng.dataaccess.facades.type.DataType dataType, com.hybris.backoffice.attributechooser.Attribute attribute, BulkEditForm form)
-
setLocalizedValue
protected void setLocalizedValue(java.lang.Object item, com.hybris.cockpitng.dataaccess.facades.type.DataAttribute dataAttribute, com.hybris.backoffice.attributechooser.Attribute attribute, BulkEditForm form)
-
clearAttribute
protected void clearAttribute(java.lang.Object item, com.hybris.cockpitng.dataaccess.facades.type.DataAttribute dataAttribute, com.hybris.backoffice.attributechooser.Attribute attribute)
-
setSingleValue
@Deprecated protected void setSingleValue(java.lang.Object item, com.hybris.backoffice.attributechooser.Attribute attribute, java.lang.Object templateObject)Deprecated.since 1808 please usesetSingleValue(Object, Attribute, BulkEditForm)
-
setSingleValue
protected void setSingleValue(java.lang.Object item, com.hybris.backoffice.attributechooser.Attribute attribute, BulkEditForm form)
-
setLocalizedValue
protected void setLocalizedValue(java.lang.Object item, java.util.Set<java.util.Locale> locales, java.lang.String qualifier, java.lang.Object templateObject)
-
setLocalizedValue
protected void setLocalizedValue(java.lang.Object item, java.util.Set<java.util.Locale> locales, java.lang.String qualifier, java.util.Map<java.util.Locale,java.lang.Object> newValue)
-
setCollectionValue
protected void setCollectionValue(java.lang.Object item, com.hybris.backoffice.attributechooser.Attribute attribute, BulkEditForm form)
-
mergeCollections
protected java.util.Collection<? super java.lang.Object> mergeCollections(java.util.Collection<? super java.lang.Object> current, java.util.Collection<? super java.lang.Object> valuesToAdd)
-
setMapValue
protected void setMapValue(java.lang.Object item, com.hybris.backoffice.attributechooser.Attribute attribute, BulkEditForm form)
-
mergeMaps
protected java.util.Map mergeMaps(java.util.Map newValue, java.util.Map currentValue)
-
revertAppliedChanges
protected void revertAppliedChanges(BulkEditForm bulkEditForm)
-
notifySaveFailed
protected void notifySaveFailed(com.hybris.cockpitng.widgets.configurableflow.FlowActionHandlerAdapter adapter, com.hybris.cockpitng.dataaccess.facades.object.ObjectFacadeOperationResult<java.lang.Object> saveResult)
-
notifySaveSucceeded
protected void notifySaveSucceeded(com.hybris.cockpitng.widgets.configurableflow.FlowActionHandlerAdapter adapter, BulkEditForm bulkEditForm)
-
notifyCannotSaveValidationFailed
protected void notifyCannotSaveValidationFailed(BulkEditForm bulkEditForm, java.util.Map<java.lang.Object,java.util.List<com.hybris.cockpitng.validation.model.ValidationInfo>> validations)
-
isNotEmptyValue
protected boolean isNotEmptyValue(java.lang.Object newLocalizedValue)
-
isEmptyMap
protected boolean isEmptyMap(java.lang.Object newLocalizedValue)
-
isEmptyCollection
protected boolean isEmptyCollection(java.lang.Object newLocalizedValue)
-
isEmptyString
protected boolean isEmptyString(java.lang.Object newLocalizedValue)
-
loadType
protected java.util.Optional<com.hybris.cockpitng.dataaccess.facades.type.DataType> loadType(java.lang.Object item)
-
getBulkEditForm
public BulkEditForm getBulkEditForm(com.hybris.cockpitng.core.model.WidgetModel widgetModel, java.util.Map<java.lang.String,java.lang.String> parameters)
-
getObjectValueService
public com.hybris.cockpitng.type.ObjectValueService getObjectValueService()
-
commitTransaction
@Deprecated protected void commitTransaction()
Deprecated.since 1808, not used anymore.saveChangesWithoutInterceptors(com.hybris.backoffice.bulkedit.BulkEditForm)uses save method which became transactional in 1808
-
rollbackTransaction
@Deprecated protected void rollbackTransaction()
Deprecated.since 1808, not used anymore.saveChangesWithoutInterceptors(com.hybris.backoffice.bulkedit.BulkEditForm)uses save method which became transactional in 1808
-
beginTransaction
@Deprecated protected void beginTransaction()
Deprecated.since 1808, not used anymore.saveChangesWithoutInterceptors(com.hybris.backoffice.bulkedit.BulkEditForm)uses save method which became transactional in 1808
-
setObjectValueService
public void setObjectValueService(com.hybris.cockpitng.type.ObjectValueService objectValueService)
-
getObjectFacade
public com.hybris.cockpitng.dataaccess.facades.object.ObjectFacade getObjectFacade()
-
setObjectFacade
public void setObjectFacade(com.hybris.cockpitng.dataaccess.facades.object.ObjectFacade objectFacade)
-
setTypeFacade
public void setTypeFacade(com.hybris.cockpitng.dataaccess.facades.type.TypeFacade typeFacade)
-
getTypeFacade
public com.hybris.cockpitng.dataaccess.facades.type.TypeFacade getTypeFacade()
-
getNotificationService
public com.hybris.backoffice.widgets.notificationarea.NotificationService getNotificationService()
-
setNotificationService
public void setNotificationService(com.hybris.backoffice.widgets.notificationarea.NotificationService notificationService)
-
getModelService
public ModelService getModelService()
-
setModelService
public void setModelService(ModelService modelService)
-
getSessionService
public SessionService getSessionService()
-
setSessionService
public void setSessionService(SessionService sessionService)
-
getBulkEditValidationHelper
public BulkEditValidationHelper getBulkEditValidationHelper()
-
setBulkEditValidationHelper
public void setBulkEditValidationHelper(BulkEditValidationHelper bulkEditValidationHelper)
-
getDisabledInterceptorsBeanNames
public java.util.Set<java.lang.String> getDisabledInterceptorsBeanNames()
-
setDisabledInterceptorsBeanNames
public void setDisabledInterceptorsBeanNames(java.util.Set<java.lang.String> disabledInterceptorsBeanNames)
-
-