public List<ValidationError> validate() {
List<ValidationError> errors = new ArrayList<ValidationError>();
if (hasPluginConfig()) {
try {
Version newV = new Version(_pluginVersion);
newV.setBuildVersion(_pluginBuild);
_csConfig.getPluginConfig().getId().setVersion(newV);
}
catch (RuntimeException e) {
// unparsable version
errors.add(new ValidationError("Invalid version format.", new String[] { "pluginVersion" }));
}
try {
Version newV = new Version(_pluginWGAVersion);
_csConfig.getPluginConfig().setMinimumWGAVersion(newV);
}
catch (RuntimeException e) {
// unparsable version
errors.add(new ValidationError("Invalid version format.", new String[] { "pluginWGAVersion" }));
}
try {
Version newV = new Version(_pluginJavaVersion);
_csConfig.getPluginConfig().setMinimumJavaVersion(newV);
}
catch (RuntimeException e) {
// unparsable version
errors.add(new ValidationError("Invalid version format.", new String[] { "pluginJavaVersion" }));