1global class CustomCacheDataImplementation implements vlocity_cmt.VlocityOpenInterface
2{
3 private vlocity_cmt.VOIInvoker invoker = vlocity_cmt.VOIInvoker.getInstance();
4 private vlocity_cmt.VlocityOpenInterface voi = (vlocity_cmt.VlocityOpenInterface)invoker.invoke('DefaultGetCacheDataImplementation', 'debugCreate', null, null, null);
5
6 global Boolean invokeMethod(String methodName, Map<String, Object> input, Map<String, Object> output, Map<String, Object> options)
7 {
8 normalizeApiName();
9 voi.invokeMethod(methodName ,input, output, options);
10 return true;
11 }
12
13 private void normalizeApiName()
14 {
15 if(vlocity_cmt.FlowStaticMap.flowMap.get('apiName') != null)
16 {
17 String apiName = (String) vlocity_cmt.FlowStaticMap.flowMap.get('apiName');
18 switch on apiName
19 {
20 when 'getOffers'{
21 vlocity_cmt.FlowStaticMap.flowMap.put('apiName','GetOffers');
22 }
23
24 when 'getOfferDetails' {
25 vlocity_cmt.FlowStaticMap.flowMap.put('apiName','GetOfferDetails');
26 }
27
28 when 'getContainOffers'{
29 vlocity_cmt.FlowStaticMap.flowMap.put('apiName','GetContainOffers');
30 }
31 }
32 }
33 }
34}