Author: adietish
Date: 2012-03-26 04:38:59 -0400 (Mon, 26 Mar 2012)
New Revision: 39821
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
Log:
[JBIDE-11335] validating jenkins name to not contain uppercase letters
Modified:
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java
===================================================================
---
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-03-26
07:44:12 UTC (rev 39820)
+++
trunk/openshift/plugins/org.jboss.tools.openshift.express.ui/src/org/jboss/tools/openshift/express/internal/ui/wizard/ApplicationConfigurationWizardPage.java 2012-03-26
08:38:59 UTC (rev 39821)
@@ -572,9 +572,12 @@
private static class JenkinsApplicationDialog extends InputDialog {
public JenkinsApplicationDialog(Shell shell) {
- super(shell, "New Jenkins application",
- "To embed jenkins into your application, you'd first have to create a
jenkins application.\n"
- + "Please provide a name for your jenkins application:", null, new
JenkinsNameValidator());
+ super(
+ shell,
+ "New Jenkins application",
+ "To embed Jenkins into your application, you first have to create a separate
Jenkins application. "
+ + "Please provide a name for this new Jenkins application (lower-case letters
and digits only):"
+ , null, new JenkinsNameValidator());
}
private static class JenkinsNameValidator implements IInputValidator {
@@ -584,6 +587,10 @@
if (StringUtils.isEmpty(input)) {
return "You have to provide a name for the jenkins application";
}
+
+ if (!StringUtils.isAlphaNumeric(input)) {
+ return "The name may only contain lower-case letters and digits.";
+ }
return null;
}
}