throws ProviderException
{
WikiPage page = m_engine.getPage( entryid );
WikiPage firstVersion = m_engine.getPage( entryid, 1 );
Entry entry = SyndicationFactory.newSyndicationEntry();
String pageText = m_engine.getText(page.getName());
String title = "";
int firstLine = pageText.indexOf('\n');
if( firstLine > 0 )
{
title = pageText.substring( 0, firstLine );
}
if( title.trim().length() == 0 ) title = page.getName();
// Remove wiki formatting
while( title.startsWith("!") ) title = title.substring(1);
entry.setTitle( title );
entry.setCreated( firstVersion.getLastModified() );
entry.setModified( page.getLastModified() );
entry.setAuthor( SyndicationFactory.createPerson( page.getAuthor(),
null,
null ) );
entry.addContent( SyndicationFactory.createEscapedContent(pageText) );
return entry;
}