Class PermissioningAdapterConfigurationBuilder
- java.lang.Object
-
- com.caplin.motif.fx.ret.permissioning.config.PermissioningAdapterConfigurationBuilder
-
public class PermissioningAdapterConfigurationBuilder extends java.lang.Object
This class produces a PermissioningAdapterConfiguration which can be used to instantiate a PermissioningAdapter.
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
ADAPTER_NAME
-
Constructor Summary
Constructors Constructor Description PermissioningAdapterConfigurationBuilder()
This class produces a PermissioningAdapterConfiguration which can be used to instantiate aPermissioningAdapter
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PermissioningAdapterConfigurationBuilder
addPermissionLoader(PermissionLoader permissionLoader)
Adds aPermissionLoader
to the list that will be used by the PermissioningAdapter to apply permissions.PermissioningAdapterConfiguration
build()
Creates an instance of PermissioningConfiguration which can be used to instantiate a PermissioningAdapter.PermissioningAdapterConfigurationBuilder
setAdapterConfigurationListener(AdapterConfigurationListener listener)
Sets a customAdapterConfigurationListener
to extend the PermissioningAdapter's default behaviour.PermissioningAdapterConfigurationBuilder
setAuthenticationManager(AuthenticationManager authenticationManager)
Sets a customAuthenticationManager
to extend the PermissioningAdapter's default behaviour.PermissioningAdapterConfigurationBuilder
setConfigurationLoader(ConfigurationLoader configurationLoader)
Sets a customConfigurationLoader
to replace the OrderAdapter's default behaviour.PermissioningAdapterConfigurationBuilder
setDataSource(com.caplin.datasource.DataSource dataSource)
Sets a customDataSource
to extend the PermissioningAdapter's default behaviour.PermissioningAdapterConfigurationBuilder
setInstrumentProvider(InstrumentProvider instrumentProvider)
Sets a customInstrumentProvider
to replace the default InstrumentProviderPermissioningAdapterConfigurationBuilder
setUserManager(UserManager userManager)
Sets a customUserManager
to extend the PermissioningAdapter's default behaviour.
-
-
-
Field Detail
-
ADAPTER_NAME
public static final java.lang.String ADAPTER_NAME
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
PermissioningAdapterConfigurationBuilder
public PermissioningAdapterConfigurationBuilder() throws ConfigurationLoaderException
This class produces a PermissioningAdapterConfiguration which can be used to instantiate aPermissioningAdapter
.- Throws:
ConfigurationLoaderException
-
-
Method Detail
-
setUserManager
public PermissioningAdapterConfigurationBuilder setUserManager(UserManager userManager)
Sets a customUserManager
to extend the PermissioningAdapter's default behaviour.- Parameters:
userManager
- a customUserManager
- Returns:
- the PermissioningAdapterConfigurationBuilder
- See Also:
UserManager
-
setAuthenticationManager
public PermissioningAdapterConfigurationBuilder setAuthenticationManager(AuthenticationManager authenticationManager)
Sets a customAuthenticationManager
to extend the PermissioningAdapter's default behaviour.- Parameters:
authenticationManager
- a customAuthenticationManager
- Returns:
- the PermissioningAdapterConfigurationBuilder
- See Also:
AuthenticationManager
-
setAdapterConfigurationListener
public PermissioningAdapterConfigurationBuilder setAdapterConfigurationListener(AdapterConfigurationListener listener)
Sets a customAdapterConfigurationListener
to extend the PermissioningAdapter's default behaviour.- Parameters:
listener
- a customAdapterConfigurationListener
- Returns:
- the PermissioningAdapterConfigurationBuilder
- See Also:
AdapterConfigurationListener
-
setDataSource
public PermissioningAdapterConfigurationBuilder setDataSource(com.caplin.datasource.DataSource dataSource)
Sets a customDataSource
to extend the PermissioningAdapter's default behaviour.- Parameters:
dataSource
- a customDataSource
- Returns:
- the PermissioningAdapterConfigurationBuilder
- See Also:
DataSource
-
setConfigurationLoader
public PermissioningAdapterConfigurationBuilder setConfigurationLoader(ConfigurationLoader configurationLoader)
Sets a customConfigurationLoader
to replace the OrderAdapter's default behaviour.- Parameters:
configurationLoader
- a customConfigurationLoader
- Returns:
- the PermissioningAdapterConfigurationBuilder
- See Also:
ConfigurationLoader
-
setInstrumentProvider
public PermissioningAdapterConfigurationBuilder setInstrumentProvider(InstrumentProvider instrumentProvider)
Sets a customInstrumentProvider
to replace the default InstrumentProvider- Parameters:
instrumentProvider
- a customInstrumentProvider
- Returns:
- this
-
addPermissionLoader
public PermissioningAdapterConfigurationBuilder addPermissionLoader(PermissionLoader permissionLoader)
Adds aPermissionLoader
to the list that will be used by the PermissioningAdapter to apply permissions. The order is important, calls into the permissions loaders will occur in the order that they were added.- Parameters:
permissionLoader
- A permissions loader to add.- Returns:
- The PermissioningAdapterConfigurationBuilder
- See Also:
PermissionLoader
-
build
public PermissioningAdapterConfiguration build()
Creates an instance of PermissioningConfiguration which can be used to instantiate a PermissioningAdapter.- Returns:
- a new PermissioningConfiguration
-
-