@Override
public Result execute(UIExecutionContext context) throws Exception
{
Map<String, ConnectionProfile> connectionProfiles = provider.getConnectionProfileManager()
.loadConnectionProfiles();
ConnectionProfile connectionProfile = new ConnectionProfile();
connectionProfile.setName(name.getValue());
connectionProfile.setDialect(hibernateDialect.getValue().getClassName());
connectionProfile.setDriver(driverClass.getValue().getName());
connectionProfile.setPath(driverLocation.getValue().getFullyQualifiedName());
connectionProfile.setUrl(jdbcUrl.getValue());
connectionProfile.setUser(userName.getValue());
connectionProfile.setSavePassword(saveUserPassword.getValue());
connectionProfile.setPassword(userPassword.getValue());
connectionProfiles.put(name.getValue(), connectionProfile);
provider.getConnectionProfileManager().saveConnectionProfiles(connectionProfiles.values());
return Results.success("Connection profile " + connectionProfile.getName() + " has been saved successfully");
}