Class ValidationEngine

java.lang.Object
com.epam.fix.validation.engine.ValidationEngine
All Implemented Interfaces:
IMessageValidator

public class ValidationEngine extends Object implements IMessageValidator
Validator provides functionality for validation FIX message using custom validators.
Author:
Serhiy_Zahriychuk Created on Sep 9, 2008
  • Constructor Details

    • ValidationEngine

      public ValidationEngine(IValidatorContainer validators, boolean isContentValidation)
      Constructor Validator creates a new Validator instance.
      Parameters:
      validators - of type List
      isContentValidation - Indicates that will be validation only content of FIXMessage.
    • ValidationEngine

      public ValidationEngine(IValidatorContainer validators)
      Constructor Validator creates a new Validator instance.
      Parameters:
      validators - of type List
  • Method Details

    • validateFIXMessage

      public FIXErrorContainer validateFIXMessage(FIXFieldList message)
      Description copied from interface: IMessageValidator
      Validates the fix message.
      Specified by:
      validateFIXMessage in interface IMessageValidator
      Parameters:
      message - the fix message
      Returns:
      returns the validation result
    • validateFIXMessage

      public FIXErrorContainer validateFIXMessage(String msgType, FIXFieldList message)
      Method validateFIXMessage validates the FIXMessage.
      Specified by:
      validateFIXMessage in interface IMessageValidator
      Parameters:
      msgType - of type String
      message - of type FIXFieldList
      Returns:
      List of errors of validation , if validate is successful method returns empty list
    • preloadDictionary

      public static void preloadDictionary(com.epam.fixengine.configuration.FIXVersionContainer fixVersionContainer, boolean replaceData)
      Pre-loads dictionaries from path uriToDictionary. If uriToDictionary is empty or null.
      Parameters:
      fixVersionContainer - Version of FIX dictionary.
      replaceData - If true systems replace the old dictionary(if old dictionary is null system create new dictionary with input elements.)
    • preloadDictionary

      public static void preloadDictionary(FIXVersion version, String uriToDictionary, boolean replaceData)
      Pre-loads dictionaries from path uriToDictionary. If uriToDictionary is empty or null.
      Parameters:
      version - Version of FIX dictionary.
      uriToDictionary - Path to the dictionary. If path empty or null system loads dictionary from the class path.
      replaceData - If true systems replace the old dictionary(if old dictionary is null system create new dictionary with input elements.) In other way system adds input elements or replace if found the differences in the same elements.
    • preloadDictionary

      public static void preloadDictionary(String dictionaryID, FIXVersion version, String uriToDictionary, boolean replaceData)
      Pre-loads dictionaries from path uriToDictionary. If uriToDictionary is empty or null.
      Parameters:
      dictionaryID - Unique ID of dictionary
      version - Version of FIX dictionary.
      uriToDictionary - Path to the dictionary. If path empty or null system loads dictionary from the class path.
      replaceData - If true systems replace the old dictionary(if old dictionary is null system create new dictionary with input elements.) In other way system adds input elements or replace if found the differences in the same elements.
    • preloadDictionary

      @Deprecated public static void preloadDictionary(FIXVersion version, String uriToDictionary, boolean isExternalResource, boolean replaceData)
      Deprecated.
      Pre-loads dictionaries from path uriToDictionary. If uriToDictionary is empty or null.
      Parameters:
      version - Version of FIX dictionary.
      uriToDictionary - Path to the dictionary. If path empty or null system loads dictionary from the class path.
      isExternalResource - the flag
      replaceData - If true systems replace the old dictionary(if old dictionary is null system create new dictionary with input elements.) In other way system adds input elements or replace if found the differences in the same elements. NOTE: isExternalResource parameters is not used eny more. By default path is interpreted as external. To define classpath resource need to add "classpath:" prefix.
      See Also:
    • setContentValidation

      public void setContentValidation(boolean contentValidation)
      Enable/disable content validation.
      Specified by:
      setContentValidation in interface IMessageValidator
      Parameters:
      contentValidation -
    • toString

      public String toString()
      Overrides:
      toString in class Object