xatkit-runtime icon indicating copy to clipboard operation
xatkit-runtime copied to clipboard

Provide a default implementation of createContext in AbstractIntentRecognitionProvider

Open gdaniel opened this issue 3 years ago • 0 comments

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;
    }

gdaniel avatar Feb 07 '22 13:02 gdaniel