@Override protected List<Entry> buildFeedEntries(Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) { List<Entry> entries = new ArrayList<>(); for (String name : model.keySet()) { Entry entry = new Entry(); entry.setTitle(name); Content content = new Content(); content.setValue((String) model.get(name)); entry.setSummary(content); entries.add(entry); } return entries; } }
@Override protected List<Entry> buildFeedEntries(Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception { log.info("In buildFeedEntries: " + model); Vets vets = (Vets) model.get("vets"); List<Vet> vetList = vets.getVetList(); List<Entry> entries = new ArrayList<Entry>(vetList.size()); for (Vet vet : vetList) { Entry entry = new Entry(); // see // http://diveintomark.org/archives/2004/05/28/howto-atom-id#other entry.setId(String.format("tag:springsource.org,%s", vet.getId())); entry.setTitle(String.format("Vet: %s %s", vet.getFirstName(), vet.getLastName())); entry.setUpdated(new Date()); Content summary = new Content(); summary.setValue(vet.getSpecialties().toString()); entry.setSummary(summary); entries.add(entry); } response.setContentType("blabla"); return entries; } }
@Override protected List<Entry> buildFeedEntries(Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception { List<Entry> entries = new ArrayList<Entry>(); List<Customer> customerlist = (List<Customer>) model.get("customers"); for (Customer o : customerlist) { Entry entry = new Entry(); entry.setId("https://github.com/mploed/event-driven-spring-boot/customer/" + Long.toString(o.getId())); entry.setUpdated(o.getUpdated()); entry.setTitle("Customer " + o.getId()); List<Content> contents = new ArrayList<Content>(); Content content = new Content(); content.setSrc(baseUrl(request) + "customer/rest/" + Long.toString(o.getId())); content.setType("application/json"); contents.add(content); entry.setContents(contents); Content summary = new Content(); summary.setValue("This is the customer " + o.getId()); entry.setSummary(summary); entries.add(entry); } return entries; } }
@Override protected List<Entry> buildFeedEntries(Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception { List<Entry> entries = new ArrayList<Entry>(); ObjectMapper mapper = new ObjectMapper(); for (PersonRating personRating : personRatingRepository.findAll(new Sort(Sort.Direction.DESC, "lastUpdated"))) { Entry entry = new Entry(); entry.setId("https://github.com/mploed/ddd-with-spring/person-rating/" + personRating.getId()); entry.setUpdated(personRating.getLastUpdated()); entry.setTitle("Person Rating " + personRating.getId()); List<Content> contents = new ArrayList<Content>(); Content content = new Content(); content.setSrc(baseUrl(request) + "rating/rest/" + personRating.getId()); content.setType("application/json"); contents.add(content); entry.setContents(contents); Content summary = new Content(); summary.setValue(mapper.writeValueAsString(personRating)); entry.setSummary(summary); entries.add(entry); } return entries; } }
@Override protected List<Entry> buildFeedEntries(Map<String, Object> model, HttpServletRequest request, HttpServletResponse response) throws Exception { List<Entry> entries = new ArrayList<Entry>(); List<DecisionMemo> decisionMemos = (List<DecisionMemo>) model.get("approvedDecisions"); for (DecisionMemo o : decisionMemos) { Entry entry = new Entry(); entry.setId("https://github.com/mploed/event-driven-spring-boot/decision-memo/" + o.getId()); entry.setUpdated(o.getLastUpdate()); entry.setTitle("Approved Decision " + o.getId()); List<Content> contents = new ArrayList<Content>(); Content content = new Content(); content.setSrc(baseUrl(request) + "credit-decision/rest/" + o.getId()); content.setType("application/json"); contents.add(content); entry.setContents(contents); Content summary = new Content(); summary.setValue(o.getApplicationNumber()); entry.setSummary(summary); entries.add(entry); } return entries; } }
content.setValue(sContent.getValue()); content.setMode(Content.ESCAPED); aEntry.setSummary(content);
summary.setType(Content.HTML); summary.setValue(entry.getSummary()); atomEntry.setSummary(summary);
content.setValue(sContent.getValue()); content.setMode(Content.ESCAPED); aEntry.setSummary(content);
summary.setType(sDescription.getType()); summary.setValue(sDescription.getValue()); aEntry.setSummary(summary);
summary.setType(sDescription.getType()); summary.setValue(sDescription.getValue()); aEntry.setSummary(summary);
entry.setSummary(parseContent(summary));
entry.setSummary(parseContent(summary));
entry.setSummary(parseContent(summary));
entry.setSummary(parseContent(summary));