class CSVDataSetDefAttributesEditor implements IsWidget, org.dashbuilder.dataset.client.editor.CSVDataSetDefAttributesEditor {

    @PostConstruct
    public void init() {
        // Initialize the Bean specific attributes editor view.
        view.init(this);
        view.initWidgets(fileURL.view, filePath.view, separatorChar.view, quoteChar.view,
                escapeChar.view, datePattern.view, numberPattern.view);
        fileURL.addHelpContent(DataSetEditorConstants.INSTANCE.csv_URL(),
                DataSetEditorConstants.INSTANCE.csv_URL_description(),
                Placement.BOTTOM);
        filePath.addHelpContent(DataSetEditorConstants.INSTANCE.csv_filePath(),
                DataSetEditorConstants.INSTANCE.csv_filePath_description(),
                Placement.BOTTOM);
        separatorChar.addHelpContent(DataSetEditorConstants.INSTANCE.csv_sepChar(),
                DataSetEditorConstants.INSTANCE.csv_sepChar_description(),
                Placement.BOTTOM);
        quoteChar.addHelpContent(DataSetEditorConstants.INSTANCE.csv_quoteChar(),
                DataSetEditorConstants.INSTANCE.csv_quoteChar_description(),
                Placement.BOTTOM);
        escapeChar.addHelpContent(DataSetEditorConstants.INSTANCE.csv_escapeChar(),
                DataSetEditorConstants.INSTANCE.csv_escapeChar_description(),
                Placement.BOTTOM);
        datePattern.addHelpContent(DataSetEditorConstants.INSTANCE.csv_datePattern(),
                DataSetEditorConstants.INSTANCE.csv_datePattern_description(),
                Placement.BOTTOM);
        numberPattern.addHelpContent(DataSetEditorConstants.INSTANCE.csv_numberPattern(),
                DataSetEditorConstants.INSTANCE.csv_numberPattern_description(),
                Placement.BOTTOM);

        // Configure file upload component.
        filePath.configure("csvFileUpload", new FileUploadEditor.FileUploadEditorCallback() {
            @Override
            public String getUploadFileName() {
                return value.getUUID() + ".csv";
            }

            @Override
            public String getUploadFileUrl() {
                String csvPath = "default://master@datasets/tmp/" + value.getUUID() + ".csv";
                return dataSetClientServices.getUploadFileUrl(csvPath);
            }
        });
        
        // By default, show the file path input.
        view.showFilePathInput();
    }

    @Inject public  CSVDataSetDefAttributesEditor(final DataSetClientServices dataSetClientServices,
                                         final ValueBoxEditor<String> fileURL,
                                         final FileUploadEditor filePath,
                                         final ValueBoxEditor<Character> separatorChar,
                                         final ValueBoxEditor<Character> quoteChar,
                                         final ValueBoxEditor<Character> escapeChar,
                                         final ValueBoxEditor<String> datePattern,
                                         final ValueBoxEditor<String> numberPattern,
                                         final View view);

}