public String getOutputName(String name) throws Exception { for (DataObject output : outputs) { if (output.getId().equals(name)) return output.getName(); } throw new Exception("This template does not contain an output property called " + name); }