com.epam.fix.validation.engine
Class AbstractValidator

java.lang.Object
  extended by com.epam.fix.validation.engine.AbstractValidator
All Implemented Interfaces:
IValidator
Direct Known Subclasses:
ConditionalValidator, DuplicatedFieldValidator, FieldAllowedInMessageValidator, FieldOrderValidator, FieldsDefinitionsTypeValidator, GroupValidator, MessageTypeValidator, MessageWelformedValidator, RequiredFieldValidator

public abstract class AbstractValidator
extends Object
implements IValidator

General interface to provide creating of validators for an application.

Author:
Serhiy_Zahriychuk Date: Sep 9, 2008

Field Summary
protected static FIXErrorBuilder fixErrorBuilder
           
protected  FIXUtil util
           
 
Constructor Summary
protected AbstractValidator(FIXUtil util)
           
 
Method Summary
 FIXUtil getUtil()
          Gets fix util.
protected  boolean isHeader(int tag)
           
protected  boolean isHeaderOrTrailer(int tag)
           
protected  boolean isMessageTypeExist(String msgType)
           
protected  boolean isTrailer(int tag)
           
abstract  FIXErrorContainer validate(String msgType, IValidationFIXMessage fixMessage, boolean isContentValidation)
          Method "validate" validates of FIX message and returns list of errors of validation process.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

util

protected FIXUtil util

fixErrorBuilder

protected static FIXErrorBuilder fixErrorBuilder
Constructor Detail

AbstractValidator

protected AbstractValidator(FIXUtil util)
Method Detail

validate

public abstract FIXErrorContainer validate(String msgType,
                                           IValidationFIXMessage fixMessage,
                                           boolean isContentValidation)
Method "validate" validates of FIX message and returns list of errors of validation process.

Specified by:
validate in interface IValidator
Parameters:
msgType - Type of Message.
fixMessage - FIX Message.
isContentValidation - If true that is mean that will be validation only content of FIX message, without header or trailer.
Returns:
List of errors of validation, if process of validationg is done successeful method returns empty list of errors.

isHeader

protected boolean isHeader(int tag)

isTrailer

protected boolean isTrailer(int tag)

isHeaderOrTrailer

protected boolean isHeaderOrTrailer(int tag)

isMessageTypeExist

protected boolean isMessageTypeExist(String msgType)

getUtil

public FIXUtil getUtil()
Gets fix util.

Returns:
FIXUtil


Copyright © 2000-2014 EPAM Systems. All Rights Reserved.