{
Hashtable<String, Hashtable<String, Object>> result = new Hashtable<String, Hashtable<String, Object>>();
log.info( "metaWeblog.getRecentPosts() called");
WikiPage page = m_context.getEngine().getPage( blogid );
checkPermissions( page, username, password, "view" );
try
{
WeblogPlugin plugin = new WeblogPlugin();
List<WikiPage> changed = plugin.findBlogEntries(m_context.getEngine().getPageManager(),
blogid,
new Date(0L),
new Date());
Collections.sort( changed, new PageTimeComparator() );
int items = 0;
for( Iterator i = changed.iterator(); i.hasNext() && items < numberOfPosts; items++ )
{
WikiPage p = (WikiPage) i.next();
result.put( "entry", makeEntry( p ) );
}
}