Class FIXUtil
java.lang.Object
com.epam.fix.validation.engine.utils.FIXUtil
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic String
commentToHtmlStr
(Comment comment) int
countLengthForGroupUnit
(FIXField[] message, int indexOfGroupTags, int startGroupTag, FIXField lengthOfGroupTag, Set<Integer> stackOfGroupsTag, String messageType, int rootGroupStartTag) Counts the group length.int
countLengthForGroupUnit
(FIXFieldList message, int indexOfGroupTags, int startGroupTag, FIXField lengthOfGroupTag, Set<Integer> stackOfGroupsTag, String messageType, int rootGroupStartTag) Counts the group length.int
countLengthForOneGroupUnit
(FIXField[] message, int indexOfGroupTags, int startGroupTag, FIXField lengthOfGroupTag, Set<Integer> stackOfGroupsTag, String messageType, int rootGroupStartTag) Counts the group length.int
countLengthForOneGroupUnit
(FIXFieldList message, int indexOfGroupTags, int startGroupTag, FIXField lengthOfGroupTag, Set<Integer> stackOfGroupsTag, String messageType, int rootGroupStartTag) Counts the group length.static String
descrToHtmlStr
(Descr descr) Find group by start tag.int[]
Gets tags.Method getBlockDefUtils returns the blockDefUtils of this FixUtils object.Gets conditional cache.Gets the field.Fielddef[]
Gets fields.getFieldDefByName
(String name) Gets field.getFieldDefByTag
(int tag) Gets field.getFieldDefs
(List<?> fieldsWithGroupsAndBlocks, boolean useGroupTags) Gets the collection of field defs.getFieldDefsHier
(List<?> fieldsWithGroupsAndBlocks) Gets the collection of field defs.getFieldDefsWithNewAlghorithm
(List<?> fieldsWithGroupsAndBlocks, boolean useGroupTags) Returns list of tags of fields from input list.Returns list of tags of fields from input list.getFieldsByMessageType
(String messageType) Gets fields for message.getFieldsTags
(List<?> list) Returns list of tags of fields from input list.int
getFieldTagByName
(String name) Gets field tag.Gets field type by field name.getFieldTypeByFieldTag
(int tag) Gets field type by field tag.com.epam.fix.dictionary.Dictionaries
Method getFixdic returns the fixdic of this FixUtils object.getGroupContent
(String msgType, int startTagId) Get repeating group content.getGroupFieldDefs
(String msgType, int startTagId) Get all field defs in repeating group.getGroupsCache
(String msgType) getGroupsTags
(String msgType, int groupTag, FIXFieldList fieldList, boolean withInternalGroup) Gets group tags.getGroupTagsWithInternalGroups
(String msgType, int groupTag, FIXFieldList fieldList) Gets group tags, the returned result includes the inner groups.getGroupTagsWithOutInternalGroups
(String msgType, int tag, FIXFieldList fieldList) Gets group tags, the returned result does not include the inner groups.Method getDefUtils returns the defUtils of this FixUtils object.getMessageFieldDefHier
(String msgType) Get message type field def hierarchy.getRequiredTagsForMessage
(String msgType) Method getRequiredTagsForMessage returns array of required tags, or empty array if message does not have required tags.Method getSmhDef returns the smhDef of this FixUtils object.Method getSmtDef returns the smtDef of this FixUtils object.int
getStartTagForGroup
(String msgType, int tag) Returns start tag for group by goup tag.getTagInfoAboutGroup
(List<Object> fieldOrDescrOrAlias, int tag) getTagsByMsgType
(String messageType) Gets tags for message.getValblockdef
(String idRef) Gets valblockdef by idRef.Gets val blocks.Gets fix version.com.epam.fixengine.configuration.FIXVersionContainer
boolean
hasRequiredTagInMessage
(List<?> list, FIXFieldList fieldList) Checks if fields list of message contains tags from blockboolean
hasRequiredTagInMessage
(List<?> list, FIXFieldList fieldList, boolean withInternalGroup) boolean
isGroupTag
(String msgType, int groupTag) Checks if groupgroupTag
defined for message typemsgType
boolean
isHeader
(int tag) boolean
isKnownTag
(int tag) Checks if tag exist.boolean
isMessageContainField
(String messageType, int tag) Checks if message body contain tag.boolean
isRequiredTag
(String msgType, Integer tag) Checks if tag is required for message type.boolean
isTagDefinedForMessage
(String msgType, int tagNum) Method isTagDefinedForMessage, verifies whether the tag is present in a message by type of message.boolean
isTagDefinedForMessageOrBlock
(String shortName, int tagNum) Verifies whether the tag is defines for message by type of messageboolean
isTrailer
(int tag)
-
Field Details
-
fixErrorBuilder
-
-
Method Details
-
getValblockdefs
Gets val blocks. -
getAllTags
public int[] getAllTags()Gets tags. -
isHeader
public boolean isHeader(int tag) -
isTrailer
public boolean isTrailer(int tag) -
getFieldDef
Gets fields. -
getConditionalCache
Gets conditional cache. -
getTagsByMsgType
Gets tags for message.- Parameters:
messageType
- the message type of message
-
getFieldsByMessageType
Gets fields for message.- Parameters:
messageType
- the message type of message
-
getVersion
Gets fix version. -
getVersionContainer
public com.epam.fixengine.configuration.FIXVersionContainer getVersionContainer() -
getFieldDefByTag
Gets field.- Parameters:
tag
- the tag
-
getFieldDefByName
Gets field.- Parameters:
name
- the field name
-
getFieldTagByName
Gets field tag.- Parameters:
name
- the field name
-
getFieldTypeByFieldName
Gets field type by field name.- Parameters:
name
- the field name
-
getFieldTypeByFieldTag
Gets field type by field tag.- Parameters:
tag
- the filed tag.
-
findGroup
Find group by start tag.- Parameters:
msgType
- the message type.startTagId
- the start tag if repeating group.
-
getGroupContent
Get repeating group content.- Parameters:
msgType
- the message type.startTagId
- the start tag if repeating group.
-
getGroupFieldDefs
Get all field defs in repeating group.- Parameters:
msgType
- the message type.startTagId
- the start tag if repeating group.
-
getMessageFieldDefHier
Get message type field def hierarchy.- Parameters:
msgType
- the message type.
-
isTagDefinedForMessage
Method isTagDefinedForMessage, verifies whether the tag is present in a message by type of message.- Parameters:
msgType
- the message typetagNum
- the num of tag- Returns:
- true if presents, otherwise false
-
getRequiredTagsForMessage
Method getRequiredTagsForMessage returns array of required tags, or empty array if message does not have required tags.- Parameters:
msgType
- the type of message- Returns:
- int[] Array of required tags
- Throws:
MessageDefinitionsException
- if message does not exist
-
isTagDefinedForMessageOrBlock
Verifies whether the tag is defines for message by type of message- Parameters:
shortName
- the type of messagetagNum
- the tag- Returns:
true
if defines, otherwisefalse
-
hasRequiredTagInMessage
Checks if fields list of message contains tags from block- Parameters:
list
- the list of field of blockfieldList
- the field list of message- Returns:
- true if contains in otherwise false
-
hasRequiredTagInMessage
public boolean hasRequiredTagInMessage(List<?> list, FIXFieldList fieldList, boolean withInternalGroup) -
getGroupTagsWithInternalGroups
public Map<Integer,Field> getGroupTagsWithInternalGroups(String msgType, int groupTag, FIXFieldList fieldList) Gets group tags, the returned result includes the inner groups.- Parameters:
msgType
- the message typegroupTag
- the group tagfieldList
- the list of fields
-
getGroupTagsWithOutInternalGroups
public Map<Integer,Field> getGroupTagsWithOutInternalGroups(String msgType, int tag, FIXFieldList fieldList) Gets group tags, the returned result does not include the inner groups.- Parameters:
msgType
- the message typetag
- the tagfieldList
- the list of fields
-
getGroupsTags
public Map<Integer,Field> getGroupsTags(String msgType, int groupTag, FIXFieldList fieldList, boolean withInternalGroup) Gets group tags.- Parameters:
msgType
- the message typegroupTag
- the group tagfieldList
- the list of fieldswithInternalGroup
- if flag is true the inner groups will be included
-
isKnownTag
public boolean isKnownTag(int tag) Checks if tag exist.- Parameters:
tag
- the tag
-
isGroupTag
Checks if groupgroupTag
defined for message typemsgType
- Parameters:
groupTag
- the group tagmsgType
- the message type
-
getStartTagForGroup
Returns start tag for group by goup tag.- Parameters:
msgType
- Type of message.tag
- Tag of Group length.- Returns:
- Start field tag of group, if msgType does not exist return -1
-
getMessageDefUtils
Method getDefUtils returns the defUtils of this FixUtils object.- Returns:
- the defUtils (type MessageDefUtils) of this FixUtils object.
-
getBlockDefUtils
Method getBlockDefUtils returns the blockDefUtils of this FixUtils object.- Returns:
- the blockDefUtils (type BlockDefUtils) of this FixUtils object.
-
getFixdic
public com.epam.fix.dictionary.Dictionaries getFixdic()Method getFixdic returns the fixdic of this FixUtils object.- Returns:
- the fixdic (type Fixdic) of this FixUtils object.
-
getSmhDef
Method getSmhDef returns the smhDef of this FixUtils object.- Returns:
- the smhDef (type Blockdef) of this FixUtils object.
-
getSmtDef
Method getSmtDef returns the smtDef of this FixUtils object.- Returns:
- the smtDef (type Blockdef) of this FixUtils object.
-
getFieldDefsHier
Gets the collection of field defs.- Parameters:
fieldsWithGroupsAndBlocks
- the collection with fields, groups and blocks
-
getFieldDefs
Gets the collection of field defs.- Parameters:
fieldsWithGroupsAndBlocks
- the collection with fields, groups and blocksuseGroupTags
- the flag provides to include the fields of group to result collection
-
getFieldDefsWithNewAlghorithm
-
getFieldsTags
Returns list of tags of fields from input list.- Parameters:
list
- Input list- Returns:
- List of tags of fields
-
getFields
Returns list of tags of fields from input list.- Parameters:
list
- Input list- Returns:
- List of tags of fields
-
getFields
Returns list of tags of fields from input list.- Parameters:
messageType
- the type of FIX Message.- Returns:
- List of tags of fields
-
getTagInfoAboutGroup
-
countLengthForGroupUnit
public int countLengthForGroupUnit(FIXField[] message, int indexOfGroupTags, int startGroupTag, FIXField lengthOfGroupTag, Set<Integer> stackOfGroupsTag, String messageType, int rootGroupStartTag) Counts the group length.- Parameters:
message
- the messageindexOfGroupTags
- the index of group tagstartGroupTag
- the start group taglengthOfGroupTag
- the length of group tagstackOfGroupsTag
- the group tagsmessageType
- the message typerootGroupStartTag
- the root group start tag
-
countLengthForGroupUnit
public int countLengthForGroupUnit(FIXFieldList message, int indexOfGroupTags, int startGroupTag, FIXField lengthOfGroupTag, Set<Integer> stackOfGroupsTag, String messageType, int rootGroupStartTag) Counts the group length.- Parameters:
message
- the messageindexOfGroupTags
- the index of group tagstartGroupTag
- the start group taglengthOfGroupTag
- the length of group tagstackOfGroupsTag
- the group tagsmessageType
- the message typerootGroupStartTag
- the root group start tag
-
countLengthForOneGroupUnit
public int countLengthForOneGroupUnit(FIXField[] message, int indexOfGroupTags, int startGroupTag, FIXField lengthOfGroupTag, Set<Integer> stackOfGroupsTag, String messageType, int rootGroupStartTag) Counts the group length.- Parameters:
message
- the messageindexOfGroupTags
- the index of group tagstartGroupTag
- the start group taglengthOfGroupTag
- the length of group tagstackOfGroupsTag
- the group tagsmessageType
- the message typerootGroupStartTag
- the root group start tag
-
countLengthForOneGroupUnit
public int countLengthForOneGroupUnit(FIXFieldList message, int indexOfGroupTags, int startGroupTag, FIXField lengthOfGroupTag, Set<Integer> stackOfGroupsTag, String messageType, int rootGroupStartTag) Counts the group length.- Parameters:
message
- the messageindexOfGroupTags
- the index of group tagstartGroupTag
- the start group taglengthOfGroupTag
- the length of group tagstackOfGroupsTag
- the group tagsmessageType
- the message typerootGroupStartTag
- the root group start tag
-
getField
Gets the field.- Parameters:
msgType
- the message typetag
- the tag- Returns:
- field if tag occurred otherwise nl
-
isRequiredTag
Checks if tag is required for message type.- Parameters:
msgType
- the message typetag
- the tag
-
getGroupsCache
-
isMessageContainField
Checks if message body contain tag. Note: tags from group ignored.- Parameters:
messageType
- the message typetag
- the tag
-
getValblockdef
Gets valblockdef by idRef.- Parameters:
idRef
- the id ref name- Returns:
- Valblockdef
-
descrToHtmlStr
- Throws:
Exception
-
commentToHtmlStr
- Throws:
Exception
-