public final class ChangeFieldDefinitionLabel extends UpdateActionImpl<Type>
See also TypeUpdateCommand.
withUpdateableType(client(), type -> { final LocalizedString newLabel = randomSlug(); final String name = type.getFieldDefinitions().get(0).getName(); final Type updatedType = client().executeBlocking(TypeUpdateCommand.of(type, ChangeFieldDefinitionLabel.of(name, newLabel))); assertThat(updatedType.getFieldDefinitionByName(name).getLabel()).isEqualTo(newLabel); return updatedType; });
See the test code.
Modifier and Type | Method and Description |
---|---|
String |
getFieldName() |
LocalizedString |
getLabel() |
static ChangeFieldDefinitionLabel |
of(String fieldName,
LocalizedString label) |
getAction
public static ChangeFieldDefinitionLabel of(String fieldName, LocalizedString label)
public String getFieldName()
public LocalizedString getLabel()