Home

 

Retrieving discussion forum information

Use administrative commands to retrieve information relating to community discussion forums. You do not need to check the configuration file in and out, or restart the Communities server when using these commands.


To use administrative commands, use wsadmin. See Start wsadmin for details.

You need to start the wsadmin tool from the IBM WebSphere Application Server profile where Communities is installed.


The CommForumTopicsService commands allow you to administer a community's discussion forum.

To manage a discussion forum...

  1. Start wsadmin so that you can access the Communities configuration files.

    1. Access the Communities configuration files:

      If you are asked to select a server, you can select any server.

  2. Use the following command to import the Java™ Hashtable object for using later:

    from java.util import Hashtable

  3. Before you run the discussion forum administration commands that require an input of Hashtable community, you need to use the CommunitiesService commands to fetch some communities.

    For example:

      commHashMap=CommunitiesService.fetchCommByName("<community-name>")
         commHashtable=Hashtable(commHashMap.get(0))
         CommForumTopicsService.fetchTopics(commHashtable)
      

    The sample commands above fetch the community with the specified name, with the output results in the form of a vector of hashmaps. You can store those results as a variable, such as commHashMap. Next, you need to extract the community that you're working with from that vector of hashmaps and save that to a hashtable variable (commHashtable). You use that variable (commHashtable) as the input to the commands that require the Hashtable community.

  4. Use the following commands to retrieve information relating to discussion forums:


    CommForumTopicsService commands

    Option Description
    CommForumTopicsService.fetchTopics(Hashtable community) Returns a vector of all the discussion topics in the specified community. An individual topic is a Hashtable, that is, a set of properties, and a community is a vector with one element.
    CommForumTopicsService.fetchDeletedTopics(Hashtable community) Returns a vector of all the topics in the specified community that are soft-deleted. The objects returned by this command are Hashtables.
    CommForumTopicsService.fetchTopicsByDate(Hashtable community, String dateType, String start, String end) Returns a vector of all the discussion topics in the specified community from the range of dates given. The dateType can be either created or modified.Parameters:

      dateType

      Date field of interest. Options are created or modified.

      start

      Start timestamp of the range, using a yyyy.mm.dd format.

      end

      Finish timestamp of the range, using a yyyy.mm.dd format.

    CommForumTopicsService.fetchTopicsCreatedByMember(Hashtable community, String email) Returns a vector of all the discussion topics in the community created by the member associated with the specified e-mail address.
    CommForumTopicsService.fetchTopicById(String uuid) Retrieves the topic identified by the UUID. The UUID is the value that is displayed in the Hashtable as topicId. The topic that is returned is in the form of a Hashtable.


Administer discussion forums


+

Search Tips   |   Advanced Search