Class LBNConfigurationBuilder
- java.lang.Object
-
- com.caplin.motif.fx.ret.lbn.config.LBNConfigurationBuilder
-
public class LBNConfigurationBuilder extends java.lang.Object
This class produces a LBNConfiguration which can be used to instantiate an LBNAdapter.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ADAPTER_NAME
-
Constructor Summary
Constructors Constructor Description LBNConfigurationBuilder()
This class produces a LBNConfiguration which can be used to instantiate aLBNAdapter
.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description LBNConfigurationBuilder
addBlotterType(BlotterType blotterType)
Adds a blotter type to the LBN adapter.LBNConfiguration
build()
Creates an instance of LBNConfiguration which can be used to instantiate a LBNAdapter.LBNConfigurationBuilder
setAdapterConfigurationListener(AdapterConfigurationListener listener)
Sets a customAdapterConfigurationListener
to load custom configurations.LBNConfigurationBuilder
setBlotterCriteriaFactory(BlotterCriteriaFactory blotterCriteriaFactory)
Sets the factory used to generate LBN queriesLBNConfigurationBuilder
setBlotterItemFieldsUpdater(BlotterRecordFieldsUpdater fieldsUpdater)
Deprecated.BlotterRecordFieldsUpdater
has been deprecated.LBNConfigurationBuilder
setBlotterRecordFactory(com.caplin.motif.fx.ret.lbn.internal.BlotterRecordFactory blotterRecordFactory)
Sets a customBlotterRecordFactory
to override the default factory used to create blotter records from RET deal records.LBNConfigurationBuilder
setBlotterRecordIdFactory(BlotterRecordIdFactory blotterRecordIdFactory)
Sets a customBlotterRecordIdFactory
to override the default id factory for the executed blotter.LBNConfigurationBuilder
setConfigurationLoader(ConfigurationLoader configurationLoader)
Sets a customConfigurationLoader
to replace the OrderAdapter's default behaviour.LBNConfigurationBuilder
setCustomFieldValuesSerialiser(CustomFieldValuesSerialiser customFieldValuesSerialiser)
Sets a customCustomFieldValuesSerialiser
used to serialise/deserialiseCustomFieldValues
objects.LBNConfigurationBuilder
setDataSource(com.caplin.datasource.DataSource dataSource)
Sets a customDataSource
to extend the LBNAdapter's default behaviour.LBNConfigurationBuilder
setLBNCustomFieldsFactory(LBNCustomFieldsFactory lbnCustomFieldsFactory)
Sets a customLBNCustomFieldsFactory
to override the LBNAdapter's default LBNCustomFieldsFactory.LBNConfigurationBuilder
setUserManager(UserManager userManager)
Sets a customUserManager
to override the LBNAdapter's default UserManager.
-
-
-
Field Detail
-
ADAPTER_NAME
public static final java.lang.String ADAPTER_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
LBNConfigurationBuilder
public LBNConfigurationBuilder() throws ConfigurationLoaderException
This class produces a LBNConfiguration which can be used to instantiate aLBNAdapter
.- Throws:
ConfigurationLoaderException
-
-
Method Detail
-
setBlotterItemFieldsUpdater
@Deprecated public LBNConfigurationBuilder setBlotterItemFieldsUpdater(BlotterRecordFieldsUpdater fieldsUpdater)
Deprecated.BlotterRecordFieldsUpdater
has been deprecated. Please useLBNCustomFieldsFactory
.Sets a custom
BlotterRecordFieldsUpdater
to override the LBNAdapter's default BlotterItemFieldsUpdater. The BlotterItemFieldsUpdater allows the user to receive fields to be sent for a blotter record. The custom BlotterItemFieldsUpdater can change, add, remove fields on the record.- Parameters:
fieldsUpdater
- A customBlotterRecordFieldsUpdater
- Returns:
- the LBNConfigurationBuilder
- See Also:
BlotterRecordFieldsUpdater
-
setLBNCustomFieldsFactory
public LBNConfigurationBuilder setLBNCustomFieldsFactory(LBNCustomFieldsFactory lbnCustomFieldsFactory)
Sets a customLBNCustomFieldsFactory
to override the LBNAdapter's default LBNCustomFieldsFactory. The LBNCustomFieldsFactory allows the user to receive fields to be sent for a blotter record. The custom LBNCustomFieldsFactory can add more fields on the record.- Parameters:
lbnCustomFieldsFactory
- A customLBNCustomFieldsFactory
- Returns:
- the LBNConfigurationBuilder
-
setBlotterRecordIdFactory
public LBNConfigurationBuilder setBlotterRecordIdFactory(BlotterRecordIdFactory blotterRecordIdFactory)
Sets a customBlotterRecordIdFactory
to override the default id factory for the executed blotter.- Parameters:
blotterRecordIdFactory
- A customBlotterRecordIdFactory
- Returns:
- the LBNConfigurationBuilder
- See Also:
BlotterRecordIdFactory
-
setBlotterRecordFactory
public LBNConfigurationBuilder setBlotterRecordFactory(com.caplin.motif.fx.ret.lbn.internal.BlotterRecordFactory blotterRecordFactory)
Sets a customBlotterRecordFactory
to override the default factory used to create blotter records from RET deal records.- Parameters:
blotterRecordFactory
- a customBlotterRecordFactory
- Returns:
- the LBNConfigurationBuilder
- See Also:
BlotterRecordFactory
-
setUserManager
public LBNConfigurationBuilder setUserManager(UserManager userManager)
Sets a customUserManager
to override the LBNAdapter's default UserManager.- Parameters:
userManager
- a customUserManager
- Returns:
- the LBNConfigurationBuilder
- See Also:
UserManager
-
setAdapterConfigurationListener
public LBNConfigurationBuilder setAdapterConfigurationListener(AdapterConfigurationListener listener)
Sets a customAdapterConfigurationListener
to load custom configurations.- Parameters:
listener
- The listener that will receive a callback to load custom configurations- Returns:
- the LBNConfigurationBuilder
- See Also:
AdapterConfigurationListener
-
setCustomFieldValuesSerialiser
public LBNConfigurationBuilder setCustomFieldValuesSerialiser(CustomFieldValuesSerialiser customFieldValuesSerialiser)
Sets a customCustomFieldValuesSerialiser
used to serialise/deserialiseCustomFieldValues
objects. The resulting serialised objects will be stored in the TakerOrderCustom field.- Parameters:
customFieldValuesSerialiser
- The custom serialiser to use when serialising/deserialisingCustomFieldValues
objects
-
setDataSource
public LBNConfigurationBuilder setDataSource(com.caplin.datasource.DataSource dataSource)
Sets a customDataSource
to extend the LBNAdapter's default behaviour.- Parameters:
dataSource
- a customDataSource
- Returns:
- the LBNConfigurationBuilder
- See Also:
DataSource
-
setConfigurationLoader
public LBNConfigurationBuilder setConfigurationLoader(ConfigurationLoader configurationLoader)
Sets a customConfigurationLoader
to replace the OrderAdapter's default behaviour.- Parameters:
configurationLoader
- a customConfigurationLoader
- Returns:
- the LBNConfigurationBuilder
- See Also:
ConfigurationLoader
-
setBlotterCriteriaFactory
public LBNConfigurationBuilder setBlotterCriteriaFactory(BlotterCriteriaFactory blotterCriteriaFactory)
Sets the factory used to generate LBN queries- Returns:
- the LBNConfigurationBuilder
- See Also:
BlotterCriteriaFactory
-
addBlotterType
public LBNConfigurationBuilder addBlotterType(BlotterType blotterType)
Adds a blotter type to the LBN adapter. Blotters will be loaded in order; as a consequence the first blotter to match the request subject (determined by BlotterType#getSubjectPattern) will handle the request.- Returns:
- the LBNConfigurationBuilder
- See Also:
BlotterType
-
build
public LBNConfiguration build()
Creates an instance of LBNConfiguration which can be used to instantiate a LBNAdapter.- Returns:
- a new LBNConfiguration
-
-