Example of browsing forums spaces.
public void server_getForumSpaces( IForumModule module, IContext context ) throws Exception
{
// retrieving the connected user organization
IOrganization organization = context.getUser().getOrganization();
// retrieving all the organization forum spaces
Collection forumSpaces = module.getForumSpaces( context, organization );
for ( Iterator iterator = forumSpaces.iterator() ; iterator.hasNext() ; )
{
IForumSpace forumSpace = (IForumSpace)iterator.next();
System.out.println( "Espace forum : " + forumSpace.getName() );
}
}
Example of recovering a forum space.
public void server_getForumSpace( IForumModule module, IContext context, String forumName ) throws Exception
{
// retrieving the connected user organization
IOrganization organization = context.getUser().getOrganization();
// retrieving a forum space by its system name
IForumSpace forumSpace = module.getForumSpace( context, organization, forumName );
System.out.println( "Espace forum : " + forumSpace.getName() );
}