public final class ChangeAttributeDefinitionLabel extends UpdateActionImpl<ProductType>
See also ProductTypeUpdateCommand.
withUpdateableProductType(client(), productType -> { final String attributeName = "color"; assertThat(productType.findAttribute(attributeName)).isPresent(); final LocalizedString label = LocalizedString.of(ENGLISH, "the color label"); final ProductType updatedProductType = client().executeBlocking(ProductTypeUpdateCommand.of(productType, ChangeAttributeDefinitionLabel.of(attributeName, label))); assertThat(updatedProductType.getAttribute(attributeName).getLabel()).isEqualTo(label); return updatedProductType; });
See the test code.
AttributeDefinition.getLabel()
Modifier and Type | Method and Description |
---|---|
String |
getAttributeName() |
LocalizedString |
getLabel() |
static ChangeAttributeDefinitionLabel |
of(String attributeName,
LocalizedString label) |
getAction
public static ChangeAttributeDefinitionLabel of(String attributeName, LocalizedString label)
public String getAttributeName()
public LocalizedString getLabel()