public boolean typeExists(String type) { List<ConsumerType> types = consumerTypeResource.list(); boolean found = false; for (ConsumerType aType : types) { found = type.equals(aType.getLabel()); if (found) { break; } } return found; }