use of org.onebusaway.enterprise.webapp.actions.status.model.StatusItem in project onebusaway-application-modules by camsys.
the class StatusUpdateAction method setAgencyMessages.
private void setAgencyMessages(List<SyndEntry> entries, String baseUrl) {
// Add Agency Messages
SyndEntry agencyMsgEntry = new SyndEntryImpl();
agencyMsgEntry.setTitle("General Notices");
agencyMsgEntry.setLink(baseUrl + "/rss/agency-messages-update");
entries.add(agencyMsgEntry);
StatusGroup agencyMsgGroup = _statusProvider.getAgencyMetadataStatus();
if (agencyMsgGroup.getItems().size() == 0) {
agencyMsgEntry = new SyndEntryImpl();
agencyMsgEntry.setTitle("No Agency Messages");
entries.add(agencyMsgEntry);
} else {
for (StatusItem agencyMsgItem : agencyMsgGroup.getItems()) {
agencyMsgEntry = new SyndEntryImpl();
agencyMsgEntry.setTitle(agencyMsgItem.getTitle());
entries.add(agencyMsgEntry);
}
}
}
Aggregations