Retrieve forum content 

Use administrative commands to retrieve forum topics by date, by creator, and by topic UUID. You do not need to check the Forums configuration file in and out, or restart the Forums server when using these commands.


Before you begin

To use administrative commands, use the wsadmin client. See Starting the wsadmin client for details.


Procedure

To retrieve forum content...

  1. From the dmgr host:

      cd $DMGR_PROFILE/bin
      ./wsadmin.sh -jython
      execfile("forumsAdmin.py")

      If prompted to specify a service to connect to, type 1 to pick the first node in the list. Most commands can run on any node. If the command writes or reads information to or from a file using a local file path, pick the node where the file is stored.

  2. Use the following commands as needed.

      ForumsTopicsService.fetchTopics()

        Gets a list of all forum topics, except those that have been moved to the trash.

        Returns a java.util.Vector object. Each object in the vector is a java.util.Hashtable object that describes one forum topic.

      ForumsTopicsService.fetchTopicsByDate(String type, String begindate, String enddate)

        Gets a list of forum topics that were created or modified in a specified date range. The maximum number of topics in the returned list is 50. To obtain all the topics that match the criteria if the number is greater than 50, call this method in a loop, providing the UUID of the 50th activity from the previous list as the lastUUID parameter.

        Returns a java.util.Vector object. Each object in the vector is a java.util.Hashtable object that describes one activity.

        This command takes the following parameters:

        type

          Specifies the date type of interest. The following values are valid:

          • created

          • modified

        begindate

          Start timestamp of the date range, specified in a yyyy.mm.dd format.

        enddate

          Finish timestamp of the date range, specified in a yyyy.mm.dd format.

        For example:

        ForumsTopicsService.fetchTopicsByDate("created","2010.05.21","2010.05.22")

        ForumsTopicsService.fetchTopicsByDate("modified","2010.05.21","2010.05.22")

      ForumsTopicsService.fetchTopicsCreatedByMember(String extId, String type)

        Gets a list of forum topics created by the specified member, except those that are in the trash.

        Returns a java.util.Vector object. Each object in the vector is a java.util.Hashtable object that describes one forum topic.

        This command takes the following parameters:

        extId

          The external ID of the specified member whose topics you want to retrieve.

        type

          The type of external ID specified. The following values are valid:

          • uuid

          • email

        For example:

        ForumsTopicsService.fetchTopicsCreatedByMember("778CE573-78A5-2ECF-8525-7346003DB078","uuid")

        ForumsTopicsService.fetchTopicsCreatedByMember("ajones10@example.com","email")

      ForumsTopicsService.fetchTopicById(String topicuuid)

        Gets the forum topic identified by the specified universal identifier.

        Returns a java.util.Hashtable object that describes the forum topic.

        This command takes the following parameter:

        topicuuid

          The unique identifier of the forum topic.

        For example:

        ForumsTopicsService.fetchTopicById("15279c53-7bb2-43dd-96ad-2eee2c7f10f8")


Parent topic

Administer Forums


   

 

});