Class AugmentationUtils
- java.lang.Object
-
- com.broadleafcommerce.metadata.core.util.AugmentationUtils
-
public final class AugmentationUtils extends Object
The common utility for the augmentation service.- Author:
- Dima Myroniuk (dmyroniuk)
-
-
Field Summary
Fields Modifier and Type Field Description static String
ACTION_COMPONENT_AUGMENTATION_KEY_FORMAT
static String
COMPONENT_AUGMENTATION_KEY_FORMAT
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description 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.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.
-
-
-
Field Detail
-
COMPONENT_AUGMENTATION_KEY_FORMAT
public static final String COMPONENT_AUGMENTATION_KEY_FORMAT
- See Also:
- Constant Field Values
-
ACTION_COMPONENT_AUGMENTATION_KEY_FORMAT
public static final String ACTION_COMPONENT_AUGMENTATION_KEY_FORMAT
- See Also:
- Constant Field Values
-
-
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 usedCOMPONENT_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 keyprefix
- the key prefixcomponentKey
- 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 usedACTION_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 keyprefix
- the key prefixactionKey
- the action keycomponentKey
- the component key
-
-