Interface AugmentationProcessor
- All Known Implementing Classes:
ExternalAugmentationProcessor,FieldAugmentationProcessor,GroupAugmentationProcessor,SelectFieldAugmentationProcessor
public interface AugmentationProcessor
The processor that is used to process
AugmentationChangeType.INSERT and
AugmentationChangeType.PATCH operations.- Author:
- Dima Myroniuk (dmyroniuk)
-
Method Summary
Modifier and TypeMethodDescriptionbooleancanHandleInsert(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.com.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.
-
Method Details
-
canHandleInsert
boolean canHandleInsert(com.broadleafcommerce.metadata.dsl.core.Component<?> parent, Augmentation augmentation) Check if this service can process the augmentation for theAugmentationChangeType.INSERTchange.- Parameters:
parent- the parent component to insert the augmented componentaugmentation- the augmentation to apply- Returns:
- true if this processor can process the augmentation
-
canHandleUpdate
boolean canHandleUpdate(com.broadleafcommerce.metadata.dsl.core.Component<?> component, Augmentation augmentation) Check if this service can process the augmentation for theAugmentationChangeType.PATCHchange.- Parameters:
component- the component to update with the specified augmentationaugmentation- the augmentation to apply- Returns:
- true if this processor can process the augmentation
-
processInsert
com.broadleafcommerce.metadata.dsl.core.Component<?> processInsert(com.broadleafcommerce.metadata.dsl.core.Component<?> parent, Augmentation augmentation) Adds the new component to the specified parent component.- Parameters:
parent- the parent component to insert the new componentaugmentation- the augmentation to apply- Returns:
- the inserted component
-
processUpdate
com.broadleafcommerce.metadata.dsl.core.Component<?> processUpdate(com.broadleafcommerce.metadata.dsl.core.Component<?> component, Augmentation augmentation) Updates the specified component.- Parameters:
component- the component to updateaugmentation- the augmentation to apply- Returns:
- the updated component
-