final String id,
final String config) throws GenieException {
if (StringUtils.isBlank(id)) {
throw new GeniePreconditionException("No application id entered. Unable to remove configuration.");
}
final Application app = this.applicationRepo.findOne(id);
if (app != null) {
if (StringUtils.isNotBlank(config)) {
app.getConfigs().remove(config);
}
return app.getConfigs();
} else {
throw new GenieNotFoundException("No application with id " + id + " exists.");
}
}