Class BaseJsonValidator

    • Constructor Detail

      • BaseJsonValidator

        public BaseJsonValidator​(java.lang.String schemaPath,
                                 com.inductiveautomation.ignition.common.gson.JsonElement schemaNode,
                                 JsonSchema parentSchema,
                                 ValidatorTypeCode validatorType)
      • BaseJsonValidator

        public BaseJsonValidator​(java.lang.String schemaPath,
                                 com.inductiveautomation.ignition.common.gson.JsonElement schemaNode,
                                 JsonSchema parentSchema,
                                 ValidatorTypeCode validatorType,
                                 JsonSchema subSchema,
                                 boolean useRefCache)
      • BaseJsonValidator

        public BaseJsonValidator​(java.lang.String schemaPath,
                                 com.inductiveautomation.ignition.common.gson.JsonElement schemaNode,
                                 JsonSchema parentSchema,
                                 ValidatorTypeCode validatorType,
                                 JsonSchema subSchema)
      • BaseJsonValidator

        public BaseJsonValidator​(java.lang.String schemaPath,
                                 com.inductiveautomation.ignition.common.gson.JsonElement schemaNode,
                                 JsonSchema parentSchema,
                                 ValidatorTypeCode validatorType,
                                 boolean useRefCache)
    • Method Detail

      • getSchemaPath

        protected java.lang.String getSchemaPath()
      • getSchemaNode

        protected com.inductiveautomation.ignition.common.gson.JsonElement getSchemaNode()
      • getParentSchema

        protected JsonSchema getParentSchema()
      • getSubSchema

        protected JsonSchema getSubSchema()
      • hasSubSchema

        protected boolean hasSubSchema()
      • useRefCache

        protected boolean useRefCache()
      • obtainSubSchemaNode

        protected JsonSchema obtainSubSchemaNode​(com.inductiveautomation.ignition.common.gson.JsonElement schemaNode)
      • validate

        public java.util.Set<ValidationMessage> validate​(com.inductiveautomation.ignition.common.gson.JsonElement node)
        Description copied from interface: JsonValidator
        Validate the given root JsonElement, starting at the root of the data path.
        Specified by:
        validate in interface JsonValidator
        Parameters:
        node - JsonElement
        Returns:
        A list of ValidationMessage if there is any validation error, or an empty list if there is no error.
      • equals

        protected boolean equals​(double n1,
                                 double n2)
      • greaterThan

        protected boolean greaterThan​(double n1,
                                      double n2)
      • lessThan

        protected boolean lessThan​(double n1,
                                   double n2)
      • parseErrorCode

        protected void parseErrorCode​(java.lang.String errorCodeKey)
      • buildValidationMessage

        protected ValidationMessage buildValidationMessage​(java.lang.String at,
                                                           java.lang.String... arguments)
      • debug

        protected void debug​(org.slf4j.Logger logger,
                             com.inductiveautomation.ignition.common.gson.JsonElement node,
                             com.inductiveautomation.ignition.common.gson.JsonElement rootNode,
                             java.lang.String at)
      • asInt

        public int asInt​(com.inductiveautomation.ignition.common.gson.JsonElement element)