public class DefaultCommerceCartMetadataUpdateValidationHook extends java.lang.Object implements CommerceCartMetadataUpdateMethodHook
| Modifier and Type | Field and Description |
|---|---|
protected static int |
MAX_CHARS_LIMIT |
| Constructor and Description |
|---|
DefaultCommerceCartMetadataUpdateValidationHook() |
| Modifier and Type | Method and Description |
|---|---|
void |
afterMetadataUpdate(CommerceCartMetadataParameter parameter)
Executed after commerce cart metadata update.
|
void |
beforeMetadataUpdate(CommerceCartMetadataParameter parameter)
Validates name and description cart metadata attributes.
|
protected void |
validateAttribute(java.util.Optional<java.lang.String> attribute,
java.lang.String attributeName) |
protected static final int MAX_CHARS_LIMIT
public DefaultCommerceCartMetadataUpdateValidationHook()
public void beforeMetadataUpdate(CommerceCartMetadataParameter parameter)
beforeMetadataUpdate in interface CommerceCartMetadataUpdateMethodHookparameter - a bean holding any number of additional attributes a client may want to pass to the methodjava.lang.IllegalArgumentException - if either name or description attributes have a length greater than 255protected void validateAttribute(java.util.Optional<java.lang.String> attribute,
java.lang.String attributeName)
public void afterMetadataUpdate(CommerceCartMetadataParameter parameter)
CommerceCartMetadataUpdateMethodHookafterMetadataUpdate in interface CommerceCartMetadataUpdateMethodHookparameter - a bean holding any number of additional attributes a client may want to pass to the methodCopyright © 2018 SAP SE. All Rights Reserved.