Forums administrative commands
Use the commands listed to perform administrative tasks for Forums. No file checkout or server restart is needed when using these commands.The following sections define the commands that you can use when working with Forums. Each section describes the commands for a specific service. The commands are listed in alphabetical order.
- ForumsConfigService
- ForumsMemberService
- ForumsScheduler
- ForumsService
- ForumsTopicsService
- ForumsTrashService
ForumsConfigService commands
ForumsConfigService.checkOutConfig("<working_directory>", "<cell_name>")Checks out the Forums configuration files.
This command takes the following parameters:
<working_directory>
Temporary working directory to which the configuration files are copied. The files are kept in this working directory while you make changes to them.
<cell_name>
Name of the IBM WAS cell hosting the IBM Connections application. To obtain the cell name:
print AdminControl.getCell()
For example:
- AIX/Linux:
ForumsConfigService.checkOutConfig("/opt/my_temp_dir", "CommServerNode01Cell")
Microsoft Windows™: ForumsConfigService.checkOutConfig("c:/temp","foo01Cell01")
ForumsConfigService.checkInConfig()
ForumsMemberService commands
ForumsMemberService.getMemberExtIdByEmail("email")See Synchronize user data using administrative commands for details.
ForumsMemberService.getMemberExtIdByLogin("login")
See Synchronize user data using administrative commands for details.
ForumsMemberService.inactivateMemberByEmail("email")
See Synchronize user data using administrative commands for details.
ForumsMemberService.inactivateMemberByExtId("externalID")
See Synchronize user data using administrative commands for details.
ForumsMemberService.syncAllMembersByExtId( {"updateOnEmailLoginMatch": ["true" | "false"] } )
See Synchronize user data using administrative commands for details.
ForumsMemberService.syncBatchMemberExtIdsByEmail("emailFile" [, {"allowInactivate" : ["true" | "false"] } ] )
See Synchronize user data using administrative commands for details.
ForumsMemberService.syncBatchMemberExtIdsByLogin("loginFile" [, {"allowInactivate" : ["true" | "false"] } ] )
See Synchronize user data using administrative commands for details.
ForumsMemberService.syncMemberByExtId("currentExternalId"[, {"newExtId" : "id-string" [, "allowExtIdSwap" : ["true" | "false"] ] } ] )
See Synchronize user data using administrative commands for details.
ForumsMemberService.syncMemberExtIdByEmail("email" [, { "allowInactivate" : ["true" | "false"] } ])
See Synchronize user data using administrative commands for details.
ForumsMemberService.syncMemberExtIdByLogin("name" [, {"allowInactivate": ["true" | "false"] } ])
ForumsScheduler commands
ForumsScheduler.getTaskDetails(String taskName)Returns information about the scheduled task specified by taskName. Forums currently has a single managed task – TrashAutoPurgeJob.
The values returned are server time, next scheduled run time, status (SCHEDULED, RUNNING, SUSPENDED), and task name. When the task has been paused, then the status parameter shows as SUSPENDED instead of SCHEDULED. SUSPENDED means that the task is not scheduled to run.
For example:
ForumsScheduler.getTaskDetails("TrashAutoPurgeJob")The resulting output looks similar to the following:
{currentServerTime=Wed Feb 03 14:21:47 EST 2010, nextFireTime=Sun Feb 07 02:00:00 EST 2010, status=SCHEDULED, taskName=TrashAutoPurgeJob}
ForumsScheduler.pauseSchedulingTask(String taskName)
Temporarily pauses the specified task and stops it from running.
When you pause a scheduled task, the task remains in the suspended state even after you stop and restart Forums or the IBM WAS. You need to run the ForumsScheduler.resumeSchedulingTask(String taskName) command to get the task running again.
If the task is currently running, it continues to run but is not scheduled to run again. If the task is already suspended, this command has no effect.
For example:
ForumsScheduler.pauseSchedulingTask("TrashAutoPurgeJob")When a task is paused, a status message similar to the following is written to the SystemOut.log file:
[2/3/10 14:28:10:782 EST] 0000002f ForumsNotific I CLFWY0134I: Forums scheduled task 'TrashAutoPurgeJob' fired event 'TaskNotificationInfo.SUSPENDED'
ForumsScheduler.resumeSchedulingTask(String taskName)
If the task is suspended, puts the task in the scheduled state. If the task is not suspended, this command has no effect.
When a task is resumed, it does not run immediately; it runs at the time when it is next scheduled to run.
For example:
ForumsScheduler.resumeSchedulingTask("TrashAutoPurgeJob")Resuming a paused task causes the following status message to be written to the SystemOut.log file:
[2/3/10 14:28:25:407 EST] 00000051 ForumsNotific I CLFWY0134I: Forums scheduled task 'TrashAutoPurgeJob' fired event 'TaskNotificationInfo.RESUMED'
ForumsService commands
ForumsService.deleteForums(java.util.Vector forums)Moves the specified forums to the Trash view. Forums in the Trash view can be restored as long as they are restored before the trash is emptied. The command returns a java.util.Vector, where each object in the vector is a java.util.Hashtable that describes a forum that could not be deleted. A returned empty vector indicates complete success.
ForumsService.exportSyncedResourceInfo(java.lang.String filePath, java.lang.String eventType)
Writes a report that lists all the community forums and identifies their associated communities. The file is saved to the directory path that you specify.
You can use this command to restore backed-up data. See Comparing remote application data with the Communities database for more information.
Parameters:
filePath
A string that specifies the full directory path in which to store the file that is returned by the command. Include the file name in the file path and use forward slashes. For example, C:/temp/forum_output.xml.
eventType
Identifies the type of synchronization events to report about. The only supported value for this parameter is community. Specify this value as a singular community and in lower case.
For example:
ForumsService.exportSyncedResourceInfo("C:/temp/forum_output.xml","community")
ForumsService.fetchForums()
ForumsService.fetchForumsByName(java.lang.String forumName)
Retrieves the forum with the specified name.
For example:
ForumsService.fetchForumsByName("My Forum")
ForumsTopicsService commands
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
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")
ForumsTopicsService.deleteTopics(Vector <forumtopics>)
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:
forumtopics
Vector of hash tables describing the forum topics to be deleted.
For example:
ForumsTopicsService.deleteTopics(janetstopics)
ForumsTrashService commands
ForumsTrashService.fetchForumsTrash()Retrieves a list of the deleted forums currently in the trash
ForumsTrashService.fetchTopicsTrash()
Retrieves a list of the deleted forum topics currently in the trash.
ForumsTrashService.purgeForumsTrash(vector <hashtable>)
Purges the specified forums from the trash, where you specify the forums that you want to delete using the <hashtable> parameter.
For example:
ForumsTrashService.purgeForumsTrash(forumtrash)
ForumsTrashService.purgeTopicsTrash(vector <hashtable>)
Purges the specified forum topics from the trash, where you specify the topics that you want to delete using the <hashtable> parameter.
For example:
ForumsTrashService.purgeTopicsTrash(topictrash)
ForumsTrashService.undeleteForumsTrash(vector <hashtable>)
Restores a deleted forum or forums, where you specify the forum or forums that you want to restore using the <hashtable> parameter.
For example:
ForumsTrashService.undeleteForumsTrash(forumsTrash)
ForumsTrashService.undeleteTopicTrash(vector <hashtable>)
Restores a deleted forum topic or topics, where you specify the topic or topics that you want to restore using the <hashtable> parameter.
For example:
ForumsTrashService.undeleteTopicTrash(topictrash)
Parent topic
Running Forums administrative commandsRelated concepts
Synchronize user data using administrative commands
Related tasks
Running administrative commands
Comparing remote application data with the Communities database
});