Search in sources :

Example 1 with HadoopPropertiesDialog

use of org.talend.metadata.managment.ui.dialog.HadoopPropertiesDialog in project tbd-studio-se by Talend.

the class StandardHCInfoForm method addHadoopPropertiesFields.

private void addHadoopPropertiesFields() {
    hadoopPropertiesComposite = new Composite(propertiesComposite, SWT.NONE);
    GridLayout hadoopPropertiesLayout = new GridLayout(1, false);
    hadoopPropertiesLayout.marginWidth = 0;
    hadoopPropertiesLayout.marginHeight = 0;
    hadoopPropertiesComposite.setLayout(hadoopPropertiesLayout);
    hadoopPropertiesComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    propertiesDialog = new HadoopPropertiesDialog(getShell(), getHadoopProperties()) {

        @Override
        protected boolean isReadOnly() {
            return !isEditable();
        }

        @Override
        protected List<Map<String, Object>> getLatestInitProperties() {
            return getHadoopProperties();
        }

        @Override
        public void applyProperties(List<Map<String, Object>> properties) {
            getConnection().setHadoopProperties(HadoopRepositoryUtil.getHadoopPropertiesJsonStr(properties));
        }
    };
    propertiesDialog.createPropertiesFields(hadoopPropertiesComposite);
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) ScrolledComposite(org.eclipse.swt.custom.ScrolledComposite) GridData(org.eclipse.swt.layout.GridData) List(java.util.List) ArrayList(java.util.ArrayList) HadoopPropertiesDialog(org.talend.metadata.managment.ui.dialog.HadoopPropertiesDialog) Map(java.util.Map) HashMap(java.util.HashMap)

Example 2 with HadoopPropertiesDialog

use of org.talend.metadata.managment.ui.dialog.HadoopPropertiesDialog in project tbd-studio-se by Talend.

the class HDIInfoForm method addHadoopPropertiesFields.

private void addHadoopPropertiesFields() {
    hadoopPropertiesComposite = new Composite(propertiesComposite, SWT.NONE);
    GridLayout hadoopPropertiesLayout = new GridLayout(1, false);
    hadoopPropertiesLayout.marginWidth = 0;
    hadoopPropertiesLayout.marginHeight = 0;
    hadoopPropertiesComposite.setLayout(hadoopPropertiesLayout);
    hadoopPropertiesComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    propertiesDialog = new HadoopPropertiesDialog(getShell(), getHadoopProperties()) {

        @Override
        protected boolean isReadOnly() {
            return !isEditable();
        }

        @Override
        protected List<Map<String, Object>> getLatestInitProperties() {
            return getHadoopProperties();
        }

        @Override
        public void applyProperties(List<Map<String, Object>> properties) {
            getConnection().setHadoopProperties(HadoopRepositoryUtil.getHadoopPropertiesJsonStr(properties));
        }
    };
    propertiesDialog.createPropertiesFields(hadoopPropertiesComposite);
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) GridData(org.eclipse.swt.layout.GridData) List(java.util.List) HadoopPropertiesDialog(org.talend.metadata.managment.ui.dialog.HadoopPropertiesDialog) Map(java.util.Map)

Example 3 with HadoopPropertiesDialog

use of org.talend.metadata.managment.ui.dialog.HadoopPropertiesDialog in project tbd-studio-se by Talend.

the class GoogleDataprocInfoForm method addHadoopPropertiesFields.

private void addHadoopPropertiesFields() {
    hadoopPropertiesComposite = new Composite(propertiesComposite, SWT.NONE);
    GridLayout hadoopPropertiesLayout = new GridLayout(1, false);
    hadoopPropertiesLayout.marginWidth = 0;
    hadoopPropertiesLayout.marginHeight = 0;
    hadoopPropertiesComposite.setLayout(hadoopPropertiesLayout);
    hadoopPropertiesComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    propertiesDialog = new HadoopPropertiesDialog(getShell(), getHadoopProperties()) {

        @Override
        protected boolean isReadOnly() {
            return !isEditable();
        }

        @Override
        protected List<Map<String, Object>> getLatestInitProperties() {
            return getHadoopProperties();
        }

        @Override
        public void applyProperties(List<Map<String, Object>> properties) {
            getConnection().setHadoopProperties(HadoopRepositoryUtil.getHadoopPropertiesJsonStr(properties));
        }
    };
    propertiesDialog.createPropertiesFields(hadoopPropertiesComposite);
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) GridData(org.eclipse.swt.layout.GridData) List(java.util.List) HadoopPropertiesDialog(org.talend.metadata.managment.ui.dialog.HadoopPropertiesDialog) HashMap(java.util.HashMap) Map(java.util.Map)

Example 4 with HadoopPropertiesDialog

use of org.talend.metadata.managment.ui.dialog.HadoopPropertiesDialog in project tbd-studio-se by Talend.

the class DataBricksInfoForm method addHadoopPropertiesFields.

private void addHadoopPropertiesFields() {
    hadoopPropertiesComposite = new Composite(propertiesComposite, SWT.NONE);
    GridLayout hadoopPropertiesLayout = new GridLayout(1, false);
    hadoopPropertiesLayout.marginWidth = 0;
    hadoopPropertiesLayout.marginHeight = 0;
    hadoopPropertiesComposite.setLayout(hadoopPropertiesLayout);
    hadoopPropertiesComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL));
    propertiesDialog = new HadoopPropertiesDialog(getShell(), getHadoopProperties()) {

        @Override
        protected boolean isReadOnly() {
            return !isEditable();
        }

        @Override
        protected List<Map<String, Object>> getLatestInitProperties() {
            return getHadoopProperties();
        }

        @Override
        public void applyProperties(List<Map<String, Object>> properties) {
            getConnection().setHadoopProperties(HadoopRepositoryUtil.getHadoopPropertiesJsonStr(properties));
        }
    };
    propertiesDialog.createPropertiesFields(hadoopPropertiesComposite);
}
Also used : GridLayout(org.eclipse.swt.layout.GridLayout) Composite(org.eclipse.swt.widgets.Composite) GridData(org.eclipse.swt.layout.GridData) ArrayList(java.util.ArrayList) List(java.util.List) HadoopPropertiesDialog(org.talend.metadata.managment.ui.dialog.HadoopPropertiesDialog) Map(java.util.Map)

Example 5 with HadoopPropertiesDialog

use of org.talend.metadata.managment.ui.dialog.HadoopPropertiesDialog in project tbd-studio-se by Talend.

the class AbstractHadoopSubForm method addHadoopPropertiesFields.

protected void addHadoopPropertiesFields() {
    T connection = getConnection();
    HadoopClusterConnection hcConnection = HCRepositoryUtil.getRelativeHadoopClusterConnection(connection);
    String hadoopPropertiesOfCluster = StringUtils.trimToEmpty(hcConnection.getHadoopProperties());
    List<Map<String, Object>> hadoopPropertiesListOfCluster = HadoopRepositoryUtil.getHadoopPropertiesList(hadoopPropertiesOfCluster);
    propertiesDialog = new HadoopPropertiesDialog(getShell(), hadoopPropertiesListOfCluster, getHadoopProperties()) {

        @Override
        protected boolean isReadOnly() {
            return !isEditable();
        }

        @Override
        protected List<Map<String, Object>> getLatestInitProperties() {
            return getHadoopProperties();
        }

        @Override
        public void applyProperties(List<Map<String, Object>> properties) {
            getConnection().setHadoopProperties(HadoopRepositoryUtil.getHadoopPropertiesJsonStr(properties));
        }
    };
    propertiesDialog.createPropertiesFields(this);
}
Also used : SWT(org.eclipse.swt.SWT) List(java.util.List) HadoopClusterConnection(org.talend.repository.model.hadoopcluster.HadoopClusterConnection) HadoopPropertiesDialog(org.talend.metadata.managment.ui.dialog.HadoopPropertiesDialog) Map(java.util.Map)

Aggregations

List (java.util.List)5 Map (java.util.Map)5 HadoopPropertiesDialog (org.talend.metadata.managment.ui.dialog.HadoopPropertiesDialog)5 GridData (org.eclipse.swt.layout.GridData)4 GridLayout (org.eclipse.swt.layout.GridLayout)4 Composite (org.eclipse.swt.widgets.Composite)4 ArrayList (java.util.ArrayList)2 HashMap (java.util.HashMap)2 SWT (org.eclipse.swt.SWT)1 ScrolledComposite (org.eclipse.swt.custom.ScrolledComposite)1 HadoopClusterConnection (org.talend.repository.model.hadoopcluster.HadoopClusterConnection)1