Class AugmentationUtils


  • public final class AugmentationUtils
    extends Object
    The common utility for the augmentation service.
    Author:
    Dima Myroniuk (dmyroniuk)
    • Method Detail

      • addComponentAugmentationKeyIfBlank

        public static void addComponentAugmentationKeyIfBlank​(com.broadleafcommerce.metadata.dsl.core.Component<?> component,
                                                              String prefix,
                                                              String componentKey)
        Adds the augmentation key to the action component if it is blank. It used COMPONENT_AUGMENTATION_KEY_FORMAT format to create the key. For example if the prefix is "generalForm" and the component key is "field:name" then the result will be "generalForm.components[field:name]"
        Parameters:
        component - the component to add the augmentation key
        prefix - the key prefix
        componentKey - the component key
      • addActionComponentAugmentationKeyIfBlank

        public static void addActionComponentAugmentationKeyIfBlank​(com.broadleafcommerce.metadata.dsl.core.Component<?> component,
                                                                    String prefix,
                                                                    String actionKey,
                                                                    String componentKey)
        Adds the augmentation key to the component if it is blank. It used ACTION_COMPONENT_AUGMENTATION_KEY_FORMAT format to create the key. For example if the prefix is "generalForm", the action key is "action:create" and the component key is "field:name" then the result will be "generalForm.actions[action:create].components[field:name]"
        Parameters:
        component - the component to add the augmentation key
        prefix - the key prefix
        actionKey - the action key
        componentKey - the component key