* FIXME This is a very simple implementation of some text-based attachment, mainly used for testing.
* This should be replaced /moved to Attachment search providers or some other 'pluggable' wat to search attachments
*/
protected String getAttachmentContent( Attachment att )
{
AttachmentManager mgr = m_engine.getAttachmentManager();
//FIXME: Add attachment plugin structure
String filename = att.getFileName();
boolean searchSuffix = false;
for( String suffix : SEARCHABLE_FILE_SUFFIXES )
{
if( filename.endsWith( suffix ) )
{
searchSuffix = true;
}
}
String out = null;
if( searchSuffix )
{
InputStream attStream = null;
StringWriter sout = new StringWriter();
try
{
attStream = mgr.getAttachmentStream( att );
FileUtil.copyContents( new InputStreamReader(attStream), sout );
out = sout.toString();
}
catch (ProviderException e)
{