Deleting topics from forumsAdded by IBM on February 11, 2013 | Version 1 (Original)
|Use administrative commands to remove unwanted or inappropriate topics from the Forums application.
Before you begin
To use administrative commands, you must use the wsadmin client. See Starting the wsadmin client
About this task
When you remove topics from a forum, the topics are soft-deleted. To remove forum topics from the database completely, you need to purge the forum trash. For more information about purging the trash, see Purging forum trash on a schedule
To delete forum topics, complete the following steps.
Parent topic: Managing forum trash
Starting the wsadmin client
Purging forum trash on a schedule
Purging specific forum content from the trash
Restoring deleted forum content
- Start the wsadmin client from the following directory of the system on which you installed the Deployment Manager:
is the WebSphere
® Application Server installation directory and dm_profile_root
is the Deployment Manager profile directory, typically dmgr01.
You must start the client from this directory or subsequent commands that you enter do not execute correctly. For more information, see Starting the wsadmin client
- Start the Forums Jython script interpreter using the following command:
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, you must pick the node where the file is stored.
- If you have not yet created a variable that contains the forum topics that you want to delete, create one now. You can get a list of forum topics in hash table format by using one of the ForumsTopicsService fetch commands. For more information about these commands and how to use them, see Getting a list of forum topics.
When an employee leaves the organization, for example, and you want to delete all of the forum topics that they created, you can use the following command to identify the forum topics to delete:
ForumsTopicsService.fetchTopicsCreatedByMember(String extId, String type)
You can also fetch the topics using the employee's member uuid. For example:
- Use the following command to delete forum topics:
Moves the specified forum topics to the trash. Forum topics in the Trash view can be restored as long as they are restored before the trash is emptied.
Returns a java.util.Vector. Each object in the vector is a java.util.Hashtable that describes a forum topic that could not be deleted. A returned empty vector indicates complete success.
This command takes the following parameter:
Vector of hash tables describing the forum topics to be deleted.