Implementing Cloud API graph-based retrieval
This topic only applies to ClaimCenter.
-
Modify the existing
IPolicySearchAdapterplugin registry so that it points to the internalGraphBasedPolicySearchAndRetrieveAdapterImplclass.-
For more information, see Modify the existing IPolicySearchAdapter plugin registry.
-
-
Register a new plugin registry for the
IFallbackPolicySearchPluginplugin.-
For more information, see Register the IFallbackPolicySearchPlugin plugin.
-
-
Point the
IFallbackPolicySearchPluginplugin to the class that implements the non-graph-based search and retrieval functionality.-
For insurers with existing search and retrieval logic, this is probably the class that the
IPolicySearchAdapterplugin previously pointed to. -
For insurers with no existing search and retrieval logic, this is a new class.
-
For more information, see Register the IFallbackPolicySearchPlugin plugin.
-
-
Register a new plugin registry for the
ICloudRetrievePolicyPluginplugin. Point it to a new class that implements theICloudRetrievePolicyPlugininterface.-
For more information, see Register the ICloudRetrievePolicyPlugin plugin.
-
-
In the
ICloudRetrievePolicyPluginimplementation class:-
Implement the
shouldUseGraphRetrieveForPolicyTypemethod. This method must return true if the policy in question is supposed to be retrieved as a policy graph, and false if the policy in question is supposed to fall back to theIFallbackPolicySearchPluginplugin'sretrievePolicyFromPolicySummarymethod. For more information, see Implement the shouldUseGraphRetrieveForPolicyType method. -
Implement the
getPolicyGraphmethod. This method must return a JSON string that adheres to the Policy graph schema. For more information, see Implement the getPolicyGraph method.
-
Modify the existing IPolicySearchAdapter plugin registry
If your implementation of ClaimCenter will use graph-based policy retrieval for some
or all of the policies retrieved, then the IPolicySearchAdapter
plugin registry must point to the following Java class:
gw.plugin.policy.cloud.GraphBasedPolicySearchAndRetrieveAdapterImplNote that this is an internal Java class that cannot be modified.
Register the IFallbackPolicySearchPlugin plugin
In the base configuration, there is no plugin registry for the
IFallbackPolicySearchPlugin plugin. To implement this plugin,
you must do the following:
-
If you have no existing code for policy search and retrieval, then you create a class that implements the
IPolicySearchAdapterinterface. Within this class, you must provide implementations for the methods that execute policy search and policy retrieval for non-graph-based policies. For more information, see the Integrations, Plugins, and Web Services. -
Create a new plugin registry.
-
Set Name to
IFallbackPolicySearchPlugin. -
Set Interface to
IFallbackPolicySearchPlugin.
-
-
Point the plugin registry to the class that implements the
IPolicySearchAdapterlogic. This could be an existing class or one created in the first step of this procedure.
Register the ICloudRetrievePolicyPlugin plugin
In the base configuration, there is no plugin registry for the
ICloudRetrievePolicyPlugin plugin. To implement this plugin,
you must do the following:
-
Create a new class that implements the
ICloudRetrievePolicyPlugininterface. -
Create a new plugin registry.
-
Set Name to
ICloudRetrievePolicyPlugin. -
Set Interface to
ICloudRetrievePolicyPlugin.
-
-
Point the plugin registry to the class created in the first step of this procedure.
Implement the shouldUseGraphRetrieveForPolicyType method
Within the ICloudRetrievePolicyPlugin implementation class, you must
implement the shouldUseGraphRetrieveForPolicyType method. This
method receives a PolicyType value. It returns a Boolean.
-
If it returns true, then the policy is retrieved as a policy graph. (In other words, it is retrieved using the
ICloudRetrievePolicyPlugin.getPolicyGraphmethod.) -
If it returns false, then the policy is retrieved using some other type of integration logic. (In other words, it is retrieved using the
IFallbackPolicySearchPlugin.retrievePolicyFromPolicySummarymethod.)
override function shouldUseGraphRetrieveForPolicyType(policyType : PolicyType) : boolean {
return (policyType == PolicyType.TC_PERSONALAUTO)
}Implement the getPolicyGraph method
Within the ICloudRetrievePolicyPlugin
implementation class, you must implement the getPolicyGraph method.
This method receives a policySummary value. It returns a String
that must consist of well-formed JSON that adheres to the Policy graph schema.
override function getPolicyGraph(@NotNull policySummary : PolicySummary) : String {
return null
}The manner in which you implement this method depends on the nature of the data stored in the Policy Administration System and the place where you want to store the code that converts that information into Policy-schema compliant JSON.
To view an example of what this method might return, see Cloud API getPolicyGraph sample return value.