IEntitlementSource Class
This is the interface that should be implemented for providing the various Entitlement related service implementations. As mentioned earlier, implementations of this interface are expected to be use and throw objects and should not try to retain state.
The details of the APIs to be implemented are provided in the following table:
Attribute / Operation | Purpose |
---|---|
public String getName() | This API returns the name that the developer would like to associate to this class. This may be displayed to the end user as part of the configuration screens as is as well as printed in logs as appropriate. |
public IUserValue getUserDetails(String loginId); | This API is triggered as part of the user log-in sequence. This is expected to return the UserValue that provides the details of the user. |
public IUserValue getUserPreferences(IUserValue userValue) throws ProcessingErrorException; | This API is triggered as part of the user log-in sequence. This is expected to return the UserValue that has been updated with the user preferences. |
public CanvasViewEntlVO getUserAccessEntitlements(String gcif, String userNo , String sUserRole) throws EntitlementException; | There are two overloaded variants of this API (with the sUserRole as the additional parameter). This API must return the entitlements of the user for access level check. The expected result (CanvasViewEntlVO) must have a List<Map<String,String>> where every record / Map is expected to have the following keys:
|
public DataEntitlements getUserDataEntitlements(String[] productsList, String[] subprodList, String[] functionList, String gcif, String userNo, String channelId, String sUserRole) throws EntitlementException | There are multiple overloaded variants of this API ultimately leading to this final variant that needs to be triggered. The other variants of this interface method are deprecated and only this variant is used. |
public String updateUserPreferences(List<String> preferenceType, List<Object> preferenceValues, String userNo) throws ProcessingErrorException | This API is triggered by the framework when the user tries to update their preferences. The exact list of preference criteria and the corresponding values are provided for the entitlement system to store or update those against the provided user. |