xatkit-runtime
xatkit-runtime copied to clipboard
Provide a default implementation of createContext in AbstractIntentRecognitionProvider
This code is duplicated in several places, and it should be considered as a default behavior from the parent class:
@Override
public StateContext createContext(@NonNull String sessionId) {
/*
* FIXME duplicated code from RegExIntentRecognitionProvider
*/
StateContext stateContext = ExecutionFactory.eINSTANCE.createStateContext();
stateContext.setContextId(sessionId);
stateContext.setConfiguration(ConfigurationConverter.getMap(configuration.getBaseConfiguration()));
return stateContext;
}