public class SchemaImpl extends BaseMutableStateValidator implements Schema
| Modifier and Type | Method and Description |
|---|---|
void |
applyDefaultValues(JsonArray array)
This function mutates
array applying default values, when available. |
void |
applyDefaultValues(JsonObject object)
This function mutates
object applying default values, when available. |
boolean |
calculateIsSync() |
void |
doApplyDefaultValues(Object obj) |
Object |
getDefaultValue()
Return the default value defined in the schema
|
JsonObject |
getJson()
Get Json representation of the schema
|
JsonPointer |
getScope()
Get scope of this schema
|
boolean |
hasDefaultValue()
Return true if the schema has a default value defined
|
void |
triggerUpdateIsSync()
Manually trigger the sync state update
|
Future<Void> |
validateAsync(Object in)
Validate the json performing an asynchronous validation.
|
void |
validateSync(Object in)
Validate the json performing a synchronous validation.
|
checkSync, getParent, getPriority, initializeIsSync, isSync, validateSyncAsAsyncpublic JsonPointer getScope()
Schemapublic JsonObject getJson()
Schemapublic Object getDefaultValue()
SchemagetDefaultValue in interface Schemapublic boolean hasDefaultValue()
SchemahasDefaultValue in interface Schemapublic void applyDefaultValues(JsonArray array) throws NoSyncValidationException
Schemaarray applying default values, when available.applyDefaultValues in interface SchemaNoSyncValidationException - if this schema represents a $ref not solved yetpublic void applyDefaultValues(JsonObject object) throws NoSyncValidationException
Schemaobject applying default values, when available.applyDefaultValues in interface SchemaNoSyncValidationException - if this schema represents a $ref not solved yetpublic void doApplyDefaultValues(Object obj)
public void triggerUpdateIsSync()
MutableStateValidatortriggerUpdateIsSync in interface MutableStateValidatortriggerUpdateIsSync in class BaseMutableStateValidatorpublic Future<Void> validateAsync(Object in)
SchemaValidationException if json doesn't match the schema.this#validateSync(Object)validateAsync in interface AsyncValidatorvalidateAsync in interface Schemapublic void validateSync(Object in) throws ValidationException, NoSyncValidationException
SchemaValidationException if json doesn't match the schema.validateSync in interface SyncValidatorvalidateSync in interface SchemaValidationException - if the object is not validNoSyncValidationException - If the schema cannot perform a synchronous validationpublic boolean calculateIsSync()
calculateIsSync in class BaseMutableStateValidatorCopyright © 2020 Eclipse. All rights reserved.