Update
#1:
I was able to make callouts
and model interceptors
work by using AbstractModuleInterceptor
and AbstractModelInterceptor
. Basically, I manually registered Model Interceptors and Callouts instead of depending upon spring do its magic (don’t know why it doesn’t work automatically just with @Component
annotation)
I created Model Interceptor Register by doing;
@Component
public class PhoenixModelIntercept extends AbstractModelInterceptor{
@Override
protected void onInit(IModelValidationEngine engine, I_AD_Client client) {
engine.addModelValidator(new PHN_INFO(), client);
engine.addModelValidator(new PHN_ADDR(), client);
}
}
Similarly. I created Callout Register Class by doing;
@Component
public class Main extends AbstractModuleInterceptor{
@Override
protected void registerCallouts(IProgramaticCalloutProvider calloutsRegistry) {
calloutsRegistry.registerAnnotatedCallout(new PHN_INFO());
calloutsRegistry.registerAnnotatedCallout(new PHN_ADDR());
}
}
Here, PHN_INFO
and PHN_ADDR
are two model interceptors as well as callouts for my test table.