Class GroupAugmentationProcessor
java.lang.Object
com.broadleafcommerce.metadata.core.service.processor.GroupAugmentationProcessor
- All Implemented Interfaces:
AugmentationProcessor
@Order(10000)
public class GroupAugmentationProcessor
extends Object
implements AugmentationProcessor
This processor is used to insert or update the groups.
- Author:
- Dima Myroniuk (dmyroniuk)
-
Constructor Summary
ConstructorsConstructorDescriptionGroupAugmentationProcessor(com.fasterxml.jackson.databind.ObjectMapper mapper) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidapplyAugmentation(com.broadleafcommerce.metadata.dsl.core.Group<?> group, GroupAugmentationPayload groupAugmentationPayload) booleancanHandleInsert(com.broadleafcommerce.metadata.dsl.core.Component<?> parent, Augmentation augmentation) Check if this service can process the augmentation for theAugmentationChangeType.INSERTchange.booleancanHandleUpdate(com.broadleafcommerce.metadata.dsl.core.Component<?> component, Augmentation augmentation) Check if this service can process the augmentation for theAugmentationChangeType.PATCHchange.protected com.broadleafcommerce.metadata.dsl.core.Group<?>createGroup(GroupAugmentationPayload groupAugmentationPayload) protected GroupAugmentationPayloadgetGroupAugmentationPayload(Augmentation augmentation) protected com.fasterxml.jackson.databind.ObjectMappercom.broadleafcommerce.metadata.dsl.core.Component<?>processInsert(com.broadleafcommerce.metadata.dsl.core.Component<?> parent, Augmentation augmentation) Adds the new component to the specified parent component.com.broadleafcommerce.metadata.dsl.core.Component<?>processUpdate(com.broadleafcommerce.metadata.dsl.core.Component<?> component, Augmentation augmentation) Updates the specified component.
-
Constructor Details
-
GroupAugmentationProcessor
public GroupAugmentationProcessor(com.fasterxml.jackson.databind.ObjectMapper mapper)
-
-
Method Details
-
canHandleInsert
public boolean canHandleInsert(com.broadleafcommerce.metadata.dsl.core.Component<?> parent, Augmentation augmentation) Description copied from interface:AugmentationProcessorCheck if this service can process the augmentation for theAugmentationChangeType.INSERTchange.- Specified by:
canHandleInsertin interfaceAugmentationProcessor- Parameters:
parent- the parent component to insert the augmented componentaugmentation- the augmentation to apply- Returns:
- true if this processor can process the augmentation
-
canHandleUpdate
public boolean canHandleUpdate(com.broadleafcommerce.metadata.dsl.core.Component<?> component, Augmentation augmentation) Description copied from interface:AugmentationProcessorCheck if this service can process the augmentation for theAugmentationChangeType.PATCHchange.- Specified by:
canHandleUpdatein interfaceAugmentationProcessor- Parameters:
component- the component to update with the specified augmentationaugmentation- the augmentation to apply- Returns:
- true if this processor can process the augmentation
-
processInsert
public com.broadleafcommerce.metadata.dsl.core.Component<?> processInsert(com.broadleafcommerce.metadata.dsl.core.Component<?> parent, Augmentation augmentation) Description copied from interface:AugmentationProcessorAdds the new component to the specified parent component.- Specified by:
processInsertin interfaceAugmentationProcessor- Parameters:
parent- the parent component to insert the new componentaugmentation- the augmentation to apply- Returns:
- the inserted component
-
processUpdate
public com.broadleafcommerce.metadata.dsl.core.Component<?> processUpdate(com.broadleafcommerce.metadata.dsl.core.Component<?> component, Augmentation augmentation) Description copied from interface:AugmentationProcessorUpdates the specified component.- Specified by:
processUpdatein interfaceAugmentationProcessor- Parameters:
component- the component to updateaugmentation- the augmentation to apply- Returns:
- the updated component
-
createGroup
protected com.broadleafcommerce.metadata.dsl.core.Group<?> createGroup(GroupAugmentationPayload groupAugmentationPayload) -
applyAugmentation
protected void applyAugmentation(com.broadleafcommerce.metadata.dsl.core.Group<?> group, GroupAugmentationPayload groupAugmentationPayload) -
getGroupAugmentationPayload
-
getMapper
protected com.fasterxml.jackson.databind.ObjectMapper getMapper()
-