Package cool.klass.deserializer.json
Class RequiredPropertiesValidator
java.lang.Object
cool.klass.deserializer.json.RequiredPropertiesValidator
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ContextStackprotected final booleanprotected final booleanprotected final Klassprotected final com.fasterxml.jackson.databind.node.ObjectNodeprotected final OperationModeprotected final Optional<AssociationEnd> -
Constructor Summary
ConstructorsConstructorDescriptionRequiredPropertiesValidator(ContextStack contextStack, Klass klass, com.fasterxml.jackson.databind.node.ObjectNode objectNode, OperationMode operationMode, Optional<AssociationEnd> pathHere, boolean isRoot, boolean isInProjection) -
Method Summary
Modifier and TypeMethodDescriptionprotected ObjectgetKeyFromJsonNode(DataTypeProperty keyProperty, com.fasterxml.jackson.databind.JsonNode jsonNode, AssociationEnd associationEnd, com.fasterxml.jackson.databind.JsonNode parentJsonNode) protected org.eclipse.collections.api.list.ImmutableList<Object>getKeysFromJsonNode(com.fasterxml.jackson.databind.JsonNode jsonNode, AssociationEnd associationEnd, com.fasterxml.jackson.databind.JsonNode parentJsonNode) protected OperationModegetNextMode(OperationMode operationMode, AssociationEnd associationEnd) protected voidhandleAssociationEnd(AssociationEnd associationEnd) protected voidhandleAssociationEndOutsideProjection(AssociationEnd associationEnd) protected voidprotected voidhandleAuditAssociationEnd(AssociationEnd associationEnd) protected voidprotected voidhandleDataTypeProperty(DataTypeProperty dataTypeProperty) protected voidhandleErrorIfAbsent(AssociationEnd associationEnd, String propertyKind) protected voidhandleIdProperty(DataTypeProperty dataTypeProperty) protected voidhandleIfPresent(AssociationEnd property, String propertyKind) protected voidhandleIfPresent(DataTypeProperty property, String propertyKind, cool.klass.deserializer.json.RequiredPropertiesValidator.Severity severity) protected voidhandleKeyProperty(DataTypeProperty dataTypeProperty) protected voidhandleOwnedAssociationEnd(AssociationEnd associationEnd) protected voidhandleOwnedAssociationEnd(AssociationEnd associationEnd, com.fasterxml.jackson.databind.node.ObjectNode objectNode) protected voidhandlePlainAssociationEnd(AssociationEnd associationEnd, com.fasterxml.jackson.databind.node.ObjectNode objectNode, OperationMode nextMode) protected voidhandlePlainProperty(DataTypeProperty property) voidhandleToMany(AssociationEnd associationEnd, com.fasterxml.jackson.databind.JsonNode jsonNode) protected voidhandleToManyOutsideProjection(AssociationEnd associationEnd, com.fasterxml.jackson.databind.JsonNode jsonNode) voidhandleToOne(AssociationEnd associationEnd, com.fasterxml.jackson.databind.JsonNode jsonNode) protected voidhandleToOneOutsideProjection(AssociationEnd associationEnd, com.fasterxml.jackson.databind.JsonNode jsonNode) protected voidhandleVersionAssociationEnd(AssociationEnd associationEnd) protected booleanisBackward(AssociationEnd associationEnd) protected booleanisForeignKeyMatchingKeyOnPath(DataTypeProperty dataTypeProperty) protected booleanisForeignKeyMatchingRequiredNested(DataTypeProperty dataTypeProperty) protected booleanisToOneRequired(AssociationEnd associationEnd) voidvalidate()static voidvalidate(org.eclipse.collections.api.list.MutableList<String> errors, org.eclipse.collections.api.list.MutableList<String> warnings, Klass klass, com.fasterxml.jackson.databind.node.ObjectNode objectNode, OperationMode operationMode)
-
Field Details
-
contextStack
-
klass
-
objectNode
@Nonnull protected final com.fasterxml.jackson.databind.node.ObjectNode objectNode -
operationMode
-
pathHere
-
isRoot
protected final boolean isRoot -
isInProjection
protected final boolean isInProjection
-
-
Constructor Details
-
RequiredPropertiesValidator
public RequiredPropertiesValidator(@Nonnull ContextStack contextStack, @Nonnull Klass klass, @Nonnull com.fasterxml.jackson.databind.node.ObjectNode objectNode, @Nonnull OperationMode operationMode, @Nonnull Optional<AssociationEnd> pathHere, boolean isRoot, boolean isInProjection)
-
-
Method Details
-
validate
public static void validate(@Nonnull org.eclipse.collections.api.list.MutableList<String> errors, @Nonnull org.eclipse.collections.api.list.MutableList<String> warnings, @Nonnull Klass klass, @Nonnull com.fasterxml.jackson.databind.node.ObjectNode objectNode, @Nonnull OperationMode operationMode) -
validate
public void validate() -
handleDataTypeProperties
protected void handleDataTypeProperties() -
handleDataTypeProperty
-
handleIdProperty
-
handleKeyProperty
-
isForeignKeyMatchingRequiredNested
-
isToOneRequired
-
isForeignKeyMatchingKeyOnPath
-
handleIfPresent
protected void handleIfPresent(@Nonnull DataTypeProperty property, String propertyKind, cool.klass.deserializer.json.RequiredPropertiesValidator.Severity severity) -
handleIfPresent
-
handlePlainProperty
-
handleAssociationEnds
protected void handleAssociationEnds() -
handleAssociationEnd
-
handleToOne
public void handleToOne(@Nonnull AssociationEnd associationEnd, com.fasterxml.jackson.databind.JsonNode jsonNode) -
handleToMany
public void handleToMany(@Nonnull AssociationEnd associationEnd, com.fasterxml.jackson.databind.JsonNode jsonNode) -
handleAssociationEndOutsideProjection
-
handleToOneOutsideProjection
protected void handleToOneOutsideProjection(@Nonnull AssociationEnd associationEnd, @Nonnull com.fasterxml.jackson.databind.JsonNode jsonNode) -
handleToManyOutsideProjection
protected void handleToManyOutsideProjection(@Nonnull AssociationEnd associationEnd, @Nonnull com.fasterxml.jackson.databind.JsonNode jsonNode) -
handleErrorIfAbsent
-
handleOwnedAssociationEnd
protected void handleOwnedAssociationEnd(@Nonnull AssociationEnd associationEnd, @Nonnull com.fasterxml.jackson.databind.node.ObjectNode objectNode) -
handleOwnedAssociationEnd
-
handleVersionAssociationEnd
-
handleAuditAssociationEnd
-
handlePlainAssociationEnd
protected void handlePlainAssociationEnd(@Nonnull AssociationEnd associationEnd, @Nonnull com.fasterxml.jackson.databind.node.ObjectNode objectNode, @Nonnull OperationMode nextMode) -
getNextMode
@Nonnull protected OperationMode getNextMode(OperationMode operationMode, @Nonnull AssociationEnd associationEnd) -
getKeysFromJsonNode
protected org.eclipse.collections.api.list.ImmutableList<Object> getKeysFromJsonNode(@Nonnull com.fasterxml.jackson.databind.JsonNode jsonNode, @Nonnull AssociationEnd associationEnd, @Nonnull com.fasterxml.jackson.databind.JsonNode parentJsonNode) -
getKeyFromJsonNode
protected Object getKeyFromJsonNode(@Nonnull DataTypeProperty keyProperty, @Nonnull com.fasterxml.jackson.databind.JsonNode jsonNode, @Nonnull AssociationEnd associationEnd, @Nonnull com.fasterxml.jackson.databind.JsonNode parentJsonNode) -
isBackward
-