public final class RemoveFieldDefinition extends UpdateActionImpl<Type>
See also TypeUpdateCommand.
withUpdateableType(client(), type -> { final String name = randomKey(); final FieldDefinition fieldDefinition = FieldDefinition.of(StringFieldType.of(), name, en("label"), false, TextInputHint.SINGLE_LINE); final Type updatedType = client().executeBlocking(TypeUpdateCommand.of(type, AddFieldDefinition.of(fieldDefinition))); assertThat(updatedType.getFieldDefinitionByName(name)).isEqualTo(fieldDefinition); assertThat(updatedType.getFieldDefinitions()).hasSize(type.getFieldDefinitions().size() + 1); final Type updated2 = client().executeBlocking(TypeUpdateCommand.of(updatedType, RemoveFieldDefinition.of(name))); assertThat(updated2.getFieldDefinitions()).hasSize(type.getFieldDefinitions().size()); return updated2; });
See the test code.
Modifier and Type | Method and Description |
---|---|
String |
getFieldName() |
static RemoveFieldDefinition |
of(String fieldName) |
getAction
public static RemoveFieldDefinition of(String fieldName)
public String getFieldName()