class DataSetProviderTypeWorkflow extends DataSetEditorWorkflow<DataSetDef> {

    public DataSetProviderTypeWorkflow providerTypeEdition() {
        checkDataSetDefNotNull();

        // Provider type editor driver edition.
        dataSetDefProviderTypeDriver = beanManager.lookupBean(DataSetDefProviderTypeDriver.class).newInstance();
        dataSetDefProviderTypeDriver.initialize(providerTypeEditor);
        dataSetDefProviderTypeDriver.edit(getDataSetDef());

        this.flushCommand = () -> {
            flush(dataSetDefProviderTypeDriver);
        };

        this.stepValidator = () -> {
            Iterable<ConstraintViolation<?>> violations = validatorProvider.validateProviderType(getDataSetDef());
            dataSetDefProviderTypeDriver.setConstraintViolations(violations);
            addViolations(violations);
        };

        // Show provider type editor view.
        view.clearView();
        view.add(providerTypeEditor.asWidget());

        return this;
    }

    @Inject public  DataSetProviderTypeWorkflow(final DataSetClientServices clientServices,
                                       final DataSetValidatorProvider validatorProvider,
                                       final SyncBeanManager beanManager,
                                       final DataSetDefProviderTypeEditor providerTypeEditor,
                                       final Event<SaveRequestEvent> saveRequestEvent,
                                       final Event<CancelRequestEvent> cancelRequestEvent,
                                       final Event<TestDataSetRequestEvent> testDataSetEvent,
                                       final View view);

}