I uses Open DACS Java API and it provides AuthorizationAgent.getPermissionVariable(handle,status, sVariableName, sVariableData) but I cannot find what permissionvariables can be got via the method and the example using the method.
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:
Theexample 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;}
Ifthe method lookup is successful, you will be able to get the value of thevariable. The example output:
[192.168.27.44:8211] pimchaya allow access of U.ITEM.MAX.AGGREGATE. The value is 20,
[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_DENIEDand you can get the reason in AuthorizationCheckStatus.getStatusText(). Based on my test,the U.ITEM.MAX.AGGREGATEcan 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 theAggregate Item Limit of the user. The example output:
[192.168.27.44:8211] chongdee denied access of U.ITEM.MAX.AGGREGATEstatus message - Authorization Check not set