public void init(Map initData) throws WebloggerException {
// we expect the init data to contain a weblogRequest object
WeblogRequest weblogRequest = (WeblogRequest) initData.get("parsedRequest");
if(weblogRequest == null) {
throw new WebloggerException("expected weblogRequest from init data");
}
// PageModel only works on page requests, so cast weblogRequest
// into a WeblogPageRequest and if it fails then throw exception
if(weblogRequest instanceof WeblogFeedRequest) {
this.feedRequest = (WeblogFeedRequest) weblogRequest;
} else {
throw new WebloggerException("weblogRequest is not a WeblogFeedRequest."+
" FeedModel only supports feed requests.");
}
// look for url strategy
urlStrategy = (URLStrategy) initData.get("urlStrategy");