|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.camel.dataformat.bindy.BindyAbstractFactory
org.apache.camel.dataformat.bindy.BindyKeyValuePairFactory
public class BindyKeyValuePairFactory
The BindyKeyValuePairFactory is the class who allows to bind data of type key value pair. Such format exist in financial messages FIX. This class allows to generate a model associated to message, bind data from a message to the POJOs, export data of POJOs to a message and format data into String, Date, Double, ... according to the format/pattern defined
Field Summary |
---|
Fields inherited from class org.apache.camel.dataformat.bindy.BindyAbstractFactory |
---|
annotatedLinkFields, crlf, models |
Constructor Summary | |
---|---|
BindyKeyValuePairFactory(org.apache.camel.spi.PackageScanClassResolver resolver,
String... packageNames)
|
Method Summary | |
---|---|
void |
bind(List<String> data,
Map<String,Object> model,
int line)
The bind allow to read the content of a record (expressed as a List |
void |
bind(List<String> data,
Map<String,Object> model,
int line,
Map<String,List<Object>> lists)
|
String |
getKeyValuePairSeparator()
Find the key value pair separator used to link the key with its value |
String |
getPairSeparator()
Find the pair separator used to delimit the key value pair fields |
void |
initAnnotatedFields()
Find fields annotated in each class of the model |
void |
initKeyValuePairModel()
method uses to initialize the model representing the classes who will bind the data This process will scan for classes according to the package name provided, check the annotated classes and fields. |
boolean |
isMessageOrdered()
Flag indicating if the message must be ordered |
String |
unbind(Map<String,Object> model)
The unbind is used to transform the content of the classes model objects into a string. |
Methods inherited from class org.apache.camel.dataformat.bindy.BindyAbstractFactory |
---|
factory, formatString, generateKey, getCarriageReturn, getDefaultValueForPrimitive, getLocale, initModel, link, setLocale |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.apache.camel.dataformat.bindy.BindyFactory |
---|
initModel |
Constructor Detail |
---|
public BindyKeyValuePairFactory(org.apache.camel.spi.PackageScanClassResolver resolver, String... packageNames) throws Exception
Exception
Method Detail |
---|
public void initKeyValuePairModel() throws Exception
Exception
public void initAnnotatedFields()
BindyAbstractFactory
initAnnotatedFields
in class BindyAbstractFactory
public void bind(List<String> data, Map<String,Object> model, int line) throws Exception
BindyFactory
bind
in interface BindyFactory
bind
in class BindyAbstractFactory
data
- Listmodel
- Mapline
- is the position of the record into the file
Exception
- can be thrownpublic void bind(List<String> data, Map<String,Object> model, int line, Map<String,List<Object>> lists) throws Exception
Exception
public String unbind(Map<String,Object> model) throws Exception
BindyFactory
unbind
in interface BindyFactory
unbind
in class BindyAbstractFactory
model
- MapException
- can be thrownpublic String getPairSeparator()
public String getKeyValuePairSeparator()
public boolean isMessageOrdered()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |