-
Type:
Improvement
-
Status: Closed
-
Priority:
Minor
-
Resolution: Won't Do
-
Affects Version/s: 6.5.2.3
-
Fix Version/s: None
-
Component/s: API descriptor
-
Labels:None
-
Support Ticket IDs:
Specifically the #of method:
returns the realm in Realm type, instead of a String. This is needed when trying to use annotated service but the calling service doesn't support injection.
For example, PAP doesn't support injection. If it needs to access an annotated service, then it needs to call the #getRealmSingleton method:
getRealmSingleton(Class<T> serviceInterface, Realm realm)
So, one can use
String realm = DNMapper.orgNameToRealmName(ssoToken.getProperty("Organization"));
and then use Realms.of(realm) to get the realm in Realm type.
The workaround is to create a global service and then use #getGlobalSingleton where Realm is not required, but global service is not always an accepted solution.
It's quite unlikely to update PAP to support injection, so making the #of method would be useful.