Class CalendarConfigurationBuilder
- java.lang.Object
-
- com.caplin.motif.fx.ret.calendar.config.CalendarConfigurationBuilder
-
public class CalendarConfigurationBuilder extends java.lang.Object
This class produces a CalendarConfiguration which can be used to instantiate aCalendarAdapter
.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ADAPTER_NAME
-
Constructor Summary
Constructors Constructor Description CalendarConfigurationBuilder()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CalendarConfiguration
build()
Creates an instance of CalendarConfiguration which can be used to instantiate a CalendarAdapter.CalendarConfigurationBuilder
setAdapterConfigurationListener(AdapterConfigurationListener listener)
Sets a custom AdapterConfigurationListener to load custom configurations.CalendarConfigurationBuilder
setConfigurationLoader(ConfigurationLoader configurationLoader)
Sets a customConfigurationLoader
to replace the CalendarAdapter's default behaviour.CalendarConfigurationBuilder
setDataSource(com.caplin.datasource.DataSource dataSource)
Sets a custom DataSource to extend the CalendarAdapter's default behaviour.CalendarConfigurationBuilder
setDataTransformer(CalendarDataTransformer dataTransformer)
Sets a custom CalendarDataTransformer to extend the CalendarAdapter's default behaviour.CalendarConfigurationBuilder
setInstrumentProvider(InstrumentProvider instrumentProvider)
Sets a custom InstrumentProvider to replace the CalendarAdapter's default behaviour.CalendarConfigurationBuilder
setSettlementSubjectParser(com.caplin.motif.datasource.SubjectParser<com.caplin.motif.fx.ret.calendar.subject.RETSettlementDateSubjectInfo> settlementSubjectParser)
CalendarConfigurationBuilder
setTenorSubjectParser(com.caplin.motif.datasource.SubjectParser<com.caplin.motif.fx.ret.calendar.subject.RETTenorDateSubjectInfo> tenorSubjectParser)
CalendarConfigurationBuilder
setUserManager(UserManager userManager)
Sets a custom UserManager to replace the CalendarAdapter's default behaviour.
-
-
-
Field Detail
-
ADAPTER_NAME
public static final java.lang.String ADAPTER_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CalendarConfigurationBuilder
public CalendarConfigurationBuilder() throws ConfigurationLoaderException
- Throws:
ConfigurationLoaderException
-
-
Method Detail
-
setDataTransformer
public CalendarConfigurationBuilder setDataTransformer(CalendarDataTransformer dataTransformer)
Sets a custom CalendarDataTransformer to extend the CalendarAdapter's default behaviour.- Parameters:
dataTransformer
- a customCalendarDataTransformer
- Returns:
- the CalendarConfigurationBuilder
-
setAdapterConfigurationListener
public CalendarConfigurationBuilder setAdapterConfigurationListener(AdapterConfigurationListener listener)
Sets a custom AdapterConfigurationListener to load custom configurations.- Parameters:
listener
- The listener that will receive a callback to load custom configurations- Returns:
- the CalendarConfigurationBuilder
-
setDataSource
public CalendarConfigurationBuilder setDataSource(com.caplin.datasource.DataSource dataSource)
Sets a custom DataSource to extend the CalendarAdapter's default behaviour.- Parameters:
dataSource
- a customDataSource
- Returns:
- the CalendarConfigurationBuilder
-
setConfigurationLoader
public CalendarConfigurationBuilder setConfigurationLoader(ConfigurationLoader configurationLoader)
Sets a customConfigurationLoader
to replace the CalendarAdapter's default behaviour.- Parameters:
configurationLoader
- a customConfigurationLoader
- Returns:
- the CalendarConfigurationBuilder
-
setInstrumentProvider
public CalendarConfigurationBuilder setInstrumentProvider(InstrumentProvider instrumentProvider)
Sets a custom InstrumentProvider to replace the CalendarAdapter's default behaviour.- Parameters:
instrumentProvider
- a customInstrumentProvider
- Returns:
- the CalendarConfigurationBuilder
-
setUserManager
public CalendarConfigurationBuilder setUserManager(UserManager userManager)
Sets a custom UserManager to replace the CalendarAdapter's default behaviour.- Parameters:
userManager
- a customUserManager
- Returns:
- the CalendarConfigurationBuilder
-
setSettlementSubjectParser
public CalendarConfigurationBuilder setSettlementSubjectParser(com.caplin.motif.datasource.SubjectParser<com.caplin.motif.fx.ret.calendar.subject.RETSettlementDateSubjectInfo> settlementSubjectParser)
-
setTenorSubjectParser
public CalendarConfigurationBuilder setTenorSubjectParser(com.caplin.motif.datasource.SubjectParser<com.caplin.motif.fx.ret.calendar.subject.RETTenorDateSubjectInfo> tenorSubjectParser)
-
build
public CalendarConfiguration build()
Creates an instance of CalendarConfiguration which can be used to instantiate a CalendarAdapter.- Returns:
- a new CalendarConfiguration
-
-