Class FileBasedUserManager
java.lang.Object
com.caplin.motif.fx.ret.common.extension.usermanager.FileBasedUserManager
- All Implemented Interfaces:
UserManager
A
UserManager
which reads permissions from a file.-
Nested Class Summary
Nested classes/interfaces inherited from interface com.caplin.motif.fx.ret.common.permission.UserManager
UserManager.Context
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptiongetRetClientForSsoUsername
(String assetClass, String ssoUsername) Given an asset class and a Single Sign On (SSO) user name, returns the RET client name.getRetClientForToboUsername
(String assetClass, String toboUsername) Given an asset class and a Trade On Behalf Of (TOBO) user name, returns the RET client name.getRetClientsTradedBySsoUser
(String ssoUsername) Given a Single Sign On (SSO) user name, returns the set of RET clients which can be traded on behalf of.getRetClientsTradedByToboUser
(String toboUsername) Given a Trade On Behalf Of (TOBO) user name, returns the set of RET clients which can be traded on behalf of.getSsoUsername
(String toboUsername) Given a Trade On Behalf Of (TOBO) user name, returns a Single Sign On (SSO) user name.getSsoUserNamesWhoCanTobo
(String retClientName) Given a RET client name, returns the set of all Single Sign On (SSO) users with permission to Trade On Behalf Of (TOBO) them.getToboUsername
(String retClientName) Given a RET client name, returns the Trade On Behalf Of (TOBO) user name.getToboUsers
(String ssoUsername) Given a Single Sign On (SSO) user name, returns the set of related Trade On Behalf Of (TOBO) users.void
initialise
(UserManager.Context context) This notifies theUserManager
that it is about to be loaded.
-
Constructor Details
-
FileBasedUserManager
public FileBasedUserManager()
-
-
Method Details
-
initialise
Description copied from interface:UserManager
This notifies the
UserManager
that it is about to be loaded. This method will be called by the system once.You should use this method to perform any initialisation required before the
UserManager
is loaded by the system.- Specified by:
initialise
in interfaceUserManager
- Throws:
UserManagerException
- if for any reason initialisation fails.
-
getRetClientForToboUsername
public String getRetClientForToboUsername(String assetClass, String toboUsername) throws UserManagerException Description copied from interface:UserManager
Given an asset class and a Trade On Behalf Of (TOBO) user name, returns the RET client name.Asset Class TOBO User Name Returns FX client1 client1.ret.client.fx Commodities client1 client1.ret.client.pm - Specified by:
getRetClientForToboUsername
in interfaceUserManager
- Throws:
UserManagerException
- if no user is found.
-
getRetClientForSsoUsername
public String getRetClientForSsoUsername(String assetClass, String ssoUsername) throws UserManagerException Description copied from interface:UserManager
Given an asset class and a Single Sign On (SSO) user name, returns the RET client name.Asset Class SSOUser Returns FX user1@caplin.com user1.ret.client.fx Commodities user1@caplin.com user1.ret.client.pm - Specified by:
getRetClientForSsoUsername
in interfaceUserManager
- Throws:
UserManagerException
- if no user is found.
-
getSsoUsername
Description copied from interface:UserManager
Given a Trade On Behalf Of (TOBO) user name, returns a Single Sign On (SSO) user name.TOBO User Name Returns client1 user1@caplin.com client2 user2@caplin.com - Specified by:
getSsoUsername
in interfaceUserManager
- Throws:
UserManagerException
- if no user is found.
-
getToboUsername
Description copied from interface:UserManager
Given a RET client name, returns the Trade On Behalf Of (TOBO) user name.RET Client Name Returns michael.ret.client.fx michael michael.ret.client.pm michael terry.ret.client.pm terry - Specified by:
getToboUsername
in interfaceUserManager
- Throws:
UserManagerException
- if no client is found.
-
getToboUsers
Description copied from interface:UserManager
Given a Single Sign On (SSO) user name, returns the set of related Trade On Behalf Of (TOBO) users.SSO User Name Returns salestrader1@caplin.com (salestrader, graham, john, terry, eric, michael) user1@caplin.com (client1) - Specified by:
getToboUsers
in interfaceUserManager
- Throws:
UserManagerException
- if no user is found.
-
getSsoUserNamesWhoCanTobo
Description copied from interface:UserManager
Given a RET client name, returns the set of all Single Sign On (SSO) users with permission to Trade On Behalf Of (TOBO) them.RET Client Name Returns terry.ret.client.fx (salestrader1@caplin.com) client1.ret.client.fx (user1@caplin.com) - Specified by:
getSsoUserNamesWhoCanTobo
in interfaceUserManager
- Throws:
UserManagerException
- if no client is found.
-
getRetClientsTradedBySsoUser
Description copied from interface:UserManager
Given a Single Sign On (SSO) user name, returns the set of RET clients which can be traded on behalf of.SSO User Name Returns salestrader1@caplin.com (rates.ret.client.fx, graham.ret.client.fx, john.ret.client.fx, terry.ret.client.fx, eric.ret.client.fx, michael.ret.client.fx) user1@caplin.com (client1.ret.client.fx, client1.ret.client.pm) - Specified by:
getRetClientsTradedBySsoUser
in interfaceUserManager
- Throws:
UserManagerException
- if no user is found.
-
getRetClientsTradedByToboUser
Description copied from interface:UserManager
Given a Trade On Behalf Of (TOBO) user name, returns the set of RET clients which can be traded on behalf of.TOBO User Name Returns graham (graham.ret.client.fx) user1 (client1.ret.client.fx, client1.ret.client.pm) - Specified by:
getRetClientsTradedByToboUser
in interfaceUserManager
- Throws:
UserManagerException
- if no user is found.
-