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.String
APPEND_NOTIFICATION_KEY
protected static java.lang.String
CONTEXT_PARAMETER_PARENT_OBJECT
protected static java.lang.String
PAREMETER_RELATED_OBJECTS_TO_UPDATE
static java.lang.String
REPLACE_NOTIFICATION_KEY
-
Constructor Summary
Constructors Constructor Description CategoryToCategoryDropHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
addRelatedObjectToUpdateToContextAppend(CategoryModel dragged, CategoryModel target, com.hybris.cockpitng.dnd.DragAndDropContext context)
protected void
addRelatedObjectToUpdateToContextReplace(CategoryModel dragged, CategoryModel target, com.hybris.cockpitng.dnd.DragAndDropContext context)
protected CategoryModel
assignSupercategory(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 CategoryModel
replaceSupercategory(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:AbstractReferenceDropHandler
Returns the result of appending of the dragged object to the target.- Specified by:
handleAppend
in 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:AbstractReferenceDropHandler
Returns the result of replacing of the dragged object in the target.- Specified by:
handleReplace
in 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()
-
-