Class CategoryToCategoryDropHandler
- java.lang.Object
-
- com.hybris.backoffice.cockpitng.dnd.handlers.AbstractReferenceDropHandler<CategoryModel,CategoryModel>
-
- com.hybris.backoffice.cockpitng.dnd.handlers.CategoryToCategoryDropHandler
-
- All Implemented Interfaces:
com.hybris.cockpitng.dnd.DropHandler<CategoryModel,CategoryModel>
public class CategoryToCategoryDropHandler extends AbstractReferenceDropHandler<CategoryModel,CategoryModel>
Drop handler responsible for appending/replacing supercategories for categories.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.StringAPPEND_NOTIFICATION_KEYprotected static java.lang.StringCONTEXT_PARAMETER_PARENT_OBJECTprotected static java.lang.StringPAREMETER_RELATED_OBJECTS_TO_UPDATEstatic java.lang.StringREPLACE_NOTIFICATION_KEY
-
Constructor Summary
Constructors Constructor Description CategoryToCategoryDropHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidaddRelatedObjectToUpdateToContextAppend(CategoryModel dragged, CategoryModel target, com.hybris.cockpitng.dnd.DragAndDropContext context)protected voidaddRelatedObjectToUpdateToContextReplace(CategoryModel dragged, CategoryModel target, com.hybris.cockpitng.dnd.DragAndDropContext context)protected CategoryModelassignSupercategory(CategoryModel subcategory, CategoryModel supercategory, com.hybris.cockpitng.dnd.DragAndDropContext context)java.util.List<java.lang.String>findSupportedTypes()protected java.util.List<com.hybris.cockpitng.dnd.DropOperationData<CategoryModel,CategoryModel,java.lang.Object>>handleAppend(java.util.List<CategoryModel> dragged, CategoryModel targetCategory, com.hybris.cockpitng.dnd.DragAndDropContext context)Returns the result of appending of the dragged object to the target.protected java.util.List<com.hybris.cockpitng.dnd.DropOperationData<CategoryModel,CategoryModel,java.lang.Object>>handleReplace(java.util.List<CategoryModel> dragged, CategoryModel targetCategory, com.hybris.cockpitng.dnd.DragAndDropContext context)Returns the result of replacing of the dragged object in the target.protected CategoryModelreplaceSupercategory(CategoryModel dragged, CategoryModel target, com.hybris.cockpitng.dnd.DragAndDropContext context)-
Methods inherited from class com.hybris.backoffice.cockpitng.dnd.handlers.AbstractReferenceDropHandler
getDragAndDropConfigurationService, handleDrop, resolveActionType, setDragAndDropConfigurationService
-
-
-
-
Field Detail
-
APPEND_NOTIFICATION_KEY
public static final java.lang.String APPEND_NOTIFICATION_KEY
- See Also:
- Constant Field Values
-
REPLACE_NOTIFICATION_KEY
public static final java.lang.String REPLACE_NOTIFICATION_KEY
- See Also:
- Constant Field Values
-
PAREMETER_RELATED_OBJECTS_TO_UPDATE
protected static final java.lang.String PAREMETER_RELATED_OBJECTS_TO_UPDATE
- See Also:
- Constant Field Values
-
CONTEXT_PARAMETER_PARENT_OBJECT
protected static final java.lang.String CONTEXT_PARAMETER_PARENT_OBJECT
- See Also:
- Constant Field Values
-
-
Method Detail
-
handleAppend
protected java.util.List<com.hybris.cockpitng.dnd.DropOperationData<CategoryModel,CategoryModel,java.lang.Object>> handleAppend(java.util.List<CategoryModel> dragged, CategoryModel targetCategory, com.hybris.cockpitng.dnd.DragAndDropContext context)
Description copied from class:AbstractReferenceDropHandlerReturns the result of appending of the dragged object to the target.- Specified by:
handleAppendin classAbstractReferenceDropHandler<CategoryModel,CategoryModel>- Parameters:
dragged- dragged objects.targetCategory- target object on which dragged objects are dropped.context- context of drag&drop operation.
-
handleReplace
protected java.util.List<com.hybris.cockpitng.dnd.DropOperationData<CategoryModel,CategoryModel,java.lang.Object>> handleReplace(java.util.List<CategoryModel> dragged, CategoryModel targetCategory, com.hybris.cockpitng.dnd.DragAndDropContext context)
Description copied from class:AbstractReferenceDropHandlerReturns the result of replacing of the dragged object in the target.- Specified by:
handleReplacein classAbstractReferenceDropHandler<CategoryModel,CategoryModel>- Parameters:
dragged- dragged objects.targetCategory- target object on which dragged objects are dropped.context- context of drag&drop operation.
-
assignSupercategory
protected CategoryModel assignSupercategory(CategoryModel subcategory, CategoryModel supercategory, com.hybris.cockpitng.dnd.DragAndDropContext context)
-
addRelatedObjectToUpdateToContextAppend
protected void addRelatedObjectToUpdateToContextAppend(CategoryModel dragged, CategoryModel target, com.hybris.cockpitng.dnd.DragAndDropContext context)
-
replaceSupercategory
protected CategoryModel replaceSupercategory(CategoryModel dragged, CategoryModel target, com.hybris.cockpitng.dnd.DragAndDropContext context)
-
addRelatedObjectToUpdateToContextReplace
protected void addRelatedObjectToUpdateToContextReplace(CategoryModel dragged, CategoryModel target, com.hybris.cockpitng.dnd.DragAndDropContext context)
-
findSupportedTypes
public java.util.List<java.lang.String> findSupportedTypes()
-
-