@Override public boolean checkFieldsValue() { checkConnectionBtn.setEnabled(false); if (enableGroup) { if (!validText(userNameText.getText())) { updateStatus(IStatus.ERROR, Messages.getString("OozieForm.nameInvalid")); // $NON-NLS-1$ return false; } } if (validText(userNameText.getText()) && !HadoopParameterValidator.isValidUserName(userNameText.getText())) { updateStatus( IStatus.ERROR, Messages.getString("OozieForm.nameInvalid.invalid")); // $NON-NLS-1$ return false; } if (!validText(endPonitText.getText())) { updateStatus(IStatus.ERROR, Messages.getString("OozieForm.endPointInvalid")); // $NON-NLS-1$ return false; } if (!HadoopParameterValidator.isValidOozieEndPoint(endPonitText.getText())) { updateStatus( IStatus.ERROR, Messages.getString("OozieForm.endPointInvalid.invalid")); // $NON-NLS-1$ return false; } checkConnectionBtn.setEnabled(true); updateStatus(IStatus.OK, null); return true; }
private void addConnectionFields() { Group connectionGroup = Form.createGroup(this, 1, Messages.getString("OozieForm.connectionSetting")); // $NON-NLS-1$ connectionGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); Composite connectionPartComposite = new Composite(connectionGroup, SWT.NULL); connectionPartComposite.setLayout(new GridLayout(2, false)); connectionPartComposite.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); endPonitText = new LabelledText( connectionPartComposite, Messages.getString("OozieForm.endPoint"), 1); // $NON-NLS-1$ }
private void addOozieAuthenticationFields() { Group authGroup = Form.createGroup(this, 1, "Authentication Settings"); authGroup.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); kerbBtn = new Button(authGroup, SWT.CHECK); kerbBtn.setText("Enable oozie kerberos security"); kerbBtn.setLayoutData(new GridData(SWT.LEFT, SWT.CENTER, true, false, 1, 1)); userNameText = new LabelledText(authGroup, Messages.getString("OozieForm.userName"), 1); // $NON-NLS-1$ }
private void addCheckFields() { Composite checkGroup = new Composite(this, SWT.NONE); GridLayout checkGridLayout = new GridLayout(1, false); checkGroup.setLayout(checkGridLayout); GridData checkGridData = new GridData(GridData.FILL_HORIZONTAL); checkGridData.minimumHeight = 5; checkGroup.setLayoutData(checkGridData); Composite checkButtonComposite = Form.startNewGridLayout(checkGroup, 1, false, SWT.CENTER, SWT.BOTTOM); GridLayout checkButtonLayout = (GridLayout) checkButtonComposite.getLayout(); checkButtonLayout.marginHeight = 0; checkButtonLayout.marginTop = 0; checkButtonLayout.marginBottom = 0; checkButtonLayout.marginLeft = 0; checkButtonLayout.marginRight = 0; checkButtonLayout.marginWidth = 0; checkConnectionBtn = new UtilsButton( checkButtonComposite, Messages.getString("OozieForm.check"), WIDTH_BUTTON_PIXEL, HEIGHT_BUTTON_PIXEL); //$NON-NLS-1$ checkConnectionBtn.setEnabled(false); }