* @throws IOException
*/
public void doIndex(SearchResourceContext parentResourceContext, Object businessObj, OlatFullIndexer indexWriter) throws IOException,InterruptedException {
if (!(businessObj instanceof BusinessGroup) )
throw new AssertException("businessObj must be BusinessGroup");
BusinessGroup businessGroup = (BusinessGroup)businessObj;
NarrowedPropertyManager npm = NarrowedPropertyManager.getInstance(businessGroup);
ForumManager fom = ForumManager.getInstance();
Property forumKeyProperty = npm.findProperty(null, null, CollaborationTools.PROP_CAT_BG_COLLABTOOLS, CollaborationTools.KEY_FORUM);
// Check if forum-property exist
if (forumKeyProperty != null) {
Long forumKey = forumKeyProperty.getLongValue();
Forum forum = fom.loadForum(forumKey);
SearchResourceContext forumSearchResourceContext = new SearchResourceContext(parentResourceContext);
forumSearchResourceContext.setBusinessControlFor(BusinessGroupMainRunController.ORES_TOOLFORUM);
forumSearchResourceContext.setDocumentType(TYPE);
forumSearchResourceContext.setDocumentContext(businessGroup.getKey() + " " + forumKey);
forumSearchResourceContext.setParentContextType(GroupDocument.TYPE);
forumSearchResourceContext.setParentContextName(businessGroup.getName());
doIndexAllMessages(forumSearchResourceContext, forum, indexWriter );
}
}