public final class ValidationMessageV3 extends SchemaV3<ModelBuilder.ValidationMessage,ValidationMessageV3>
SchemaV3.Meta
Schema.AutoParseable
Modifier and Type | Field and Description |
---|---|
java.lang.String |
field_name |
java.lang.String |
message |
java.lang.String |
message_type |
Constructor and Description |
---|
ValidationMessageV3() |
Modifier and Type | Method and Description |
---|---|
ModelBuilder.ValidationMessage |
createImpl()
Create an appropriate implementation object and any child objects but does not fill them.
|
ValidationMessageV3 |
fillFromImpl(ModelBuilder.ValidationMessage vm)
Fill this Schema from the given implementation object.
|
static void |
mapValidationMessageFieldNames(ValidationMessageV3[] validation_messages,
java.lang.String[] from,
java.lang.String[] to)
Map impl field names in the validation messages to schema field names,
called after behavior of stripping leading _ characters.
|
createAndFillImpl, extractVersionFromSchemaName, fillFromBody, fillFromImpl, fillFromImpl, fillFromParms, fillFromParms, fillImpl, fillImpl, getImplClass, getImplClass, getSchemaName, getSchemaType, getSchemaVersion, init_meta, markdown, markdown, newInstance, newInstance, setField, setSchemaType_doNotCall
asBytes, clone, copyOver, frozenType, read, readExternal, readJSON, reloadFromBytes, toJsonString, write, writeExternal
@API(help="Type of validation message (ERROR, WARN, INFO, HIDE)", direction=OUTPUT) public java.lang.String message_type
@API(help="Field to which the message applies", direction=OUTPUT) public java.lang.String field_name
public static void mapValidationMessageFieldNames(ValidationMessageV3[] validation_messages, java.lang.String[] from, java.lang.String[] to)
public ModelBuilder.ValidationMessage createImpl()
Schema
For objects without children this method does all the required work. For objects with children the subclass will need to override, e.g. by calling super.createImpl() and then calling createImpl() on its children.
Note that impl objects for schemas which override this method don't need to have a default constructor (e.g., a Keyed object constructor can still create and set the Key), but they must not fill any fields which can be filled later from the schema.
TODO: We could handle the common case of children with the same field names here by finding all of our fields that are themselves Schemas.
createImpl
in class Schema<ModelBuilder.ValidationMessage,ValidationMessageV3>
public ValidationMessageV3 fillFromImpl(ModelBuilder.ValidationMessage vm)
Schema
fillFromImpl
in class Schema<ModelBuilder.ValidationMessage,ValidationMessageV3>