com.epam.mdp.full.template
Interface TemplateContainer

All Superinterfaces:
java.lang.Iterable

public interface TemplateContainer
extends java.lang.Iterable

This common interface that provides list of methods for managing of templates, such as registry, return, remove and etc.

Author:
Serhiy_Zahriychuk Date: Oct 30, 2008

Method Summary
 void addAll(java.util.List<Template> messageTemplates)
          Adds the template list?
 void addTemplate(int templateID, Template template)
          Adds the template.
 void addTemplate(java.lang.String templateName, Template template)
          Adds the template.
 Type getField(Template template, java.lang.String fieldName)
          Gets field field.
 int getFieldIndex(Template template, java.lang.String fieldName)
          Gets index of fieldName field in template.
 int getFieldIndex(Template template, Type field)
          Gets index of fieldName field in template.
 Type[] getFields(Template template, java.util.Collection<java.lang.Integer> fieldsID)
          Gets the array of field.
 FIXField[] getFIXField(Template template, ITypeValue valueType)
          Gets field field.
 Template getTemplateByFIXMessage(FIXFieldList message)
          Returns MessageTemplate for FIX message.
 Template getTemplateById(int templateID)
          Gets template.
 Template getTemplateByName(java.lang.String name)
          Gets template.
 Template[] getTemplates()
          Gets the array of template.
 boolean hasField(Template template, java.lang.String fieldName)
          Checks if exist the fieldName field in template.
 void removeTemplate(int templateID)
          Removes the template with template id.
 int size()
          Returns the size of template container.
 
Methods inherited from interface java.lang.Iterable
iterator
 

Method Detail

getTemplateByName

Template getTemplateByName(java.lang.String name)
Gets template.

Parameters:
name - the name of template

getTemplateById

Template getTemplateById(int templateID)
Gets template.

Parameters:
templateID - the id of template

size

int size()
Returns the size of template container.


getTemplateByFIXMessage

Template getTemplateByFIXMessage(FIXFieldList message)
Returns MessageTemplate for FIX message.
This method uses tag with number 35 (message type) as parameter by default for return template.

Parameters:
message - the FIX message
Returns:
Template for this message

getTemplates

Template[] getTemplates()
Gets the array of template.


addTemplate

void addTemplate(int templateID,
                 Template template)
Adds the template.

Parameters:
templateID - the template id
template - the template

addTemplate

void addTemplate(java.lang.String templateName,
                 Template template)
Adds the template.

Parameters:
templateName - the template name
template - the template

addAll

void addAll(java.util.List<Template> messageTemplates)
Adds the template list?

Parameters:
messageTemplates - the templates

removeTemplate

void removeTemplate(int templateID)
Removes the template with template id.

Parameters:
templateID - the template id

hasField

boolean hasField(Template template,
                 java.lang.String fieldName)
Checks if exist the fieldName field in template.

Parameters:
template - the template
fieldName - the field name

getFieldIndex

int getFieldIndex(Template template,
                  java.lang.String fieldName)
Gets index of fieldName field in template.
If field name is not exist in template the method returns -1.

Parameters:
template - the template
fieldName - the field name

getFieldIndex

int getFieldIndex(Template template,
                  Type field)
Gets index of fieldName field in template.
If field name is not exist in template the method returns -1.

Parameters:
template - the template
field - the field

getField

Type getField(Template template,
              java.lang.String fieldName)
Gets field field.
If field is not exist in template the method returns null.

Parameters:
template - the template
fieldName - the field name

getFields

Type[] getFields(Template template,
                 java.util.Collection<java.lang.Integer> fieldsID)
Gets the array of field.

Parameters:
template - the template
fieldsID - the collection of field id

getFIXField

FIXField[] getFIXField(Template template,
                       ITypeValue valueType)
Gets field field.
If value type is not exist in template the method returns empty array.

Parameters:
template - the template
valueType - the value type


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