class FeedSeedJob {
def quoteService
def cronExpression = "1 0 0 * * ?"
def group = "QotdGroup"
def execute() {
def qotd = quoteService.getQotdQuote()
println "QOTD is ${qotd.content}"
}
}
I honestly don't know how it could be any easier.
class FeedSeedJob {
def quoteService
def cronExpression = "1 0 0 * * ?"
def group = "QotdGroup"
def execute() {
def qotd = quoteService.getQotdQuote()
println "QOTD is ${qotd.content}"
}
}
class FeedsController {
def rss = {
render(feedType:"rss", feedVersion:"2.0") {
title = "Q2OH >> Quote of Tomorrow"
link = "http://host:port/app/rss/feed"
description = "The Quote of Tomorrow"
Quote.findAllByQotdIsNotNull().each() { quote ->
entry("Quote for ${quote.qotd + 1}") {
link = "http://host:port/app/quote/display/${quote.id}"
author = quote.author
publishedDate = (java.util.Date) quote.qotd
quote.content // return the content
}
}
}
}
}
entry("Quote for ${quote.qotd}") {