class DataSetEditWorkflow extends DataSetEditorWorkflow<T> {

    public DataSetEditWorkflow edit( final T definition, List<DataColumnDef> allColumns ) {
        clear();
        this.dataSetDef = definition;
        checkDataSetDefNotNull();

        this.driver = beanManager.lookupBean( getDriverClass() ).newInstance();
        this.editor = beanManager.lookupBean( getEditorClass() ).newInstance();
        driver.initialize( editor );
        editor.setAcceptableValues( allColumns );
        driver.edit( definition );

        this.flushCommand = () -> flush(DataSetEditWorkflow.this.driver);
        this.stepValidator = () -> {
            final boolean isCacheEnabled = definition.isCacheEnabled();
            final boolean isPushEnabled = definition.isPushEnabled();
            final boolean isRefreshEnabled = definition.getRefreshTime() != null;
            Iterable<ConstraintViolation<?>> violations = validate( isCacheEnabled,
                                                                    isPushEnabled,
                                                                    isRefreshEnabled );
            driver.setConstraintViolations( violations );
            addViolations( violations );
        };

        // Show data set editor view.
        view.clearView();
        view.add( getWidget() );

        return this;
    }

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

}