The variables retrieved by AuthorizationAgent.getPermissionVariable(..) method and an example

Best Answer
-
The AuthorizationAgent.getPermissionVariable(com.reuters.rfa.common.Handle handle, AuthorizationCheckStatus status, java.lang.String sVariableName,String[] sVariableData) method finds a value with a variable name. The variables and their meanings are listed below:
-
U.ITEM.MAX.AGGREGATE
- The maximum
number of items that the user can open. This value is specific to a user. - DACS_API_VERSION - The version of
the DACS API which OpenDACS API uses to communicating with DACS/the version
of the DACS API that enforces permissions. This value is global in nature and
unrelated to a user.
The
example source code using the method://after you can login and get the valid handle ,_handle.
AuthorizationCheckStatus authCheckStatus = new AuthorizationCheckStatus();
String sVariableName = "U.ITEM.MAX.AGGREGATE";
//String sVariableName = "DACS_API_VERSION";
String[] sVariableData=new String[3];
try {
// Get the permission variable value given a variable name for a given user handle.
AuthorizationCheckResult authCheckResult = _agent.getPermissionVariable(_handle,authCheckStatus,sVariableName , sVariableData);
// Check the result of calling the getPermissionVariable() method.
if (authCheckResult == AuthorizationCheckResult.ACCESS_ALLOWED)
{
System.out.print("[" + _daemonHost + "] " + _name +
" allow access of " + sVariableName + ". The value is " );
if(sVariableData!=null){
for(String aData:sVariableData)
if(aData!=null)
System.out.print(aData + ",");
System.out.println();
}
}
else {
System.out.println("[" + _daemonHost + "] " + _name + " denied access of " + sVariableName);
System.out.println("status message - " + authCheckStatus.getStatusText());
}
} catch (AuthorizationException ae)
{
// In case the exception occurs during calling method.
System.err.println("[" + _daemonHost + "] " + _name +
" check get Permission variable named " + sVariableName + " failed");
System.out.println("Exception message - " + ae.getMessage());
return;
}If
the method lookup is successful, you will be able to get the value of the
variable. The example output:- When the Variable Name is U.ITEM.MAX.AGGREGATE
[192.168.27.44:8211] pimchaya allow access of U.ITEM.MAX.AGGREGATE. The value is 20,
- When the Variable Name is DACS_API_VERSION
[192.168.27.44:8211] pimchaya allow access of DACS_API_VERSION. The value is dacs6.7.0.F2,
If the method lookup is failure, you will get AuthorizationCheckResult.ACCESS_DENIED
and you can get the reason in AuthorizationCheckStatus.getStatusText(). Based on my test,the U.ITEM.MAX.AGGREGATE
can be failed to look up if the Aggregate Item Limit of the user is not set(blank)
or the DACS e.g. version 6.3 does not provide the interface to set the
Aggregate Item Limit of the user. The example output:[192.168.27.44:8211] chongdee denied access of U.ITEM.MAX.AGGREGATE
status message - Authorization Check not set0 -
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 693 Datastream
- 1.5K DSS
- 629 Eikon COM
- 5.2K Eikon Data APIs
- 11 Electronic Trading
- 1 Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 255 ETA
- 561 WebSocket API
- 39 FX Venues
- 15 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 25 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 281 Open PermID
- 46 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 23 RDMS
- 2K Refinitiv Data Platform
- 727 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 106 UPA
- 194 TREP Infrastructure
- 229 TRKD
- 918 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 96 Workspace SDK
- 11 Element Framework
- 5 Grid
- 19 World-Check Data File
- 1 Yield Book Analytics
- 48 中文论坛