responseHelper.checkBundleInstallConfiguration();
if (file != null) {
if (file.getFilename().endsWith(".jar")) {
try {
final Bundle installedBundle = bundleHelper.installBundleInRepository(file);
responseHelper.setFlashVariable(Variables.INSTALLED_BUNDLE, new TemplateBundle(installedBundle));
} catch (final Exception e) {
responseHelper.flashErrorMessage(String.format("Error installing Bundle: %s", e.getMessage()));
}
} else {
responseHelper.flashErrorMessage(String.format("Not a JAR file: %s", file.getFilename()));