Home

 

Communities administrative commands

Use the commands listed to perform administrative tasks for Communities. No file checkout or server restart is needed when using these commands. The following tables define the administrative commands that you can use to administer Communities.


CommunitiesService commands

Command Description
CommunitiesService.fetchAllComm() Returns a vector of hash maps of all communities.
CommunitiesService.fetchCommById(string communityUUID) Returns the community with the specified UUID.You can obtain the UUID for a community by doing one of the following:

  • Using a browser, open the community that you want and copy the UUID from the URL.

  • Use the CommunitiesService.fetchAllComm() wsadmin command to return all the communities on the server and copy the UUID from the output.

CommunitiesService.fetchCommByMemberEmail(String email) Returns all the communities that the user of the specified e-mail address is a member of.For example:

    CommunitiesService.fetchCommByMember("john_doe@company.com")
    

This command replaces the older command, CommunitiesService.fetchCommByMember(String email), which has been deprecated for IBM Lotus Connections 2.5.

CommunitiesService.fetchCommByMemberUuid(String uuid) Returns all the communities that the user with the specified UUID is a member of.For example:

    CommunitiesService.fetchCommByMemberUuid("193F1CE8-E10A-4B9A
    -B933-C8ECD6C072E4")
    

The Member's UUID is the External LDAP identifier for a specific user. The UUID can be found by looking at the SNCOMM.MEMBERPROFILE Communities database table and looking in the DIRECTORY_UUID column. Alternatively, you can use the CommunitiesService.fetchMember(list_of_comm) Mbean command to list out the membership list (with each user's UUID) for each of the communities specified by the list.

CommunitiesService.fetchCommByName(String name) Returns the community with the specified name.

There is a maximum of one community in the list, but that list can be used in the other methods that use a list input. If no match is found, the list will be empty. For example:

    CommunitiesService.fetchCommByName("Test Community")
    

CommunitiesService.fetchMember(List list) Returns the input list of communities with an additional property for each community that is the member list for that community.

This command is run in two steps. First, generate a list of data to input into the fetchMember command and assign the list to a variable. The variable is then used as input into the fetchMember command. For example:

    wsadmin>allComm=CommunitiesService.fetchAllComm() wsadmin>CommunitiesService.fetchMember(allComm)
    

CommunitiesService.fetchReference(List list) Adds references (feeds and bookmarks) to communities in the list passed into this command and returns a new list with references.

The results that are returned include any feeds and bookmarks for a community. The Name that the user enters when creating the feed or bookmark is also displayed as part of the reference information. For example, reference=[[Cooking, http://www.cuisineathome.com]]

Like the fetchMember command, obtaining the reference information is also a two step process. You must first run a fetch command to gather the list of communities and then run the fetchReference command to get the feeds and bookmark information for each of the communities. The information is listed out in the wsadmin command window. For example:

    wsadmin>allComm=CommunitiesService.fetchAllComm() wsadmin>CommunitiesService.fetchReference(allComm)
    

Here are sample results from running the command:

    {createdBy=alex_jones@MyCompany.com, lastMod=2/22/08  8:43:48 AM EST, description=Community with one bookmark one feed,  name=Jones Community, uuid=3395f15e-bde7-4151-80ed-ed538d12d00e,  memberSize=2, reference=[[CNN, http://www.cnn.com], [Ghirardelli  Chocolate, http://www.ghirardelli.com]], type=publicInviteOnly,  tags=[chocolate], created=2/22/08 8:42:53 AM EST, lastModBy= bsmith@MyCompany.com}
    

CommunitiesService.listComm(List list) Prints the information associated with the communities in the list input to the wsadmin command window in an easy-to-read format. The data printed includes community name, UUID, type, who created it, creation date, last person who modified it, date of last modification, membership list size, and description. If the list includes members, then this command also prints the membership list. If the list includes references, the command also prints the reference information.

This command is run in two steps. First, generate the data to input into the listComm command and assign the list to a variable. The variable is then used as input into the listComm command. For example:

    wsadmin>byMember=CommunitiesService.fetchCommByMember
    ("jane_doe@company.com") wsadmin>CommunitiesService.listComm(byMember)
    

CommunitiesService.listCommToFile(List list, String filename) Prints the information associated with the communities in the list input to the specified file using an easy-to-read format. The to which the file is to be output must already exist. The data printed includes community name, UUID, type, who created it, creation date, last person who modified it, date of last modification, membership list size, and description. If the list includes members, then this command also prints the membership list. If the list includes references, the command also prints the reference information.

This command is run in two steps. First, generate the data to input into the listCommToFile command and assign the list to a variable. The variable is then used as input into the listCommToFile command. For example:

    wsadmin>byMember=CommunitiesService.fetchCommByMember
    ("jane_doe@company.com") wsadmin>CommunitiesService.listCommToFile(bymember,
    "/temp/CommMembers.txt")
    

CommunitiesService.createCommunityWithEmail(String communityName, String ownerName, int memberRole, String dsmlFile) Creates a new community whose membership list is initialized from a DSML file exported from LDAP. The DSML file must be local to the system running the script. For more information about how to create DSML files from your LDAP directory, see http://www.dsmltools.org/.

The script parses the DSML XML file and extracts the e-mail values. These values are used to populate the membership list of the community.

community name, ownerName, and dsmlFile are strings and must be enclosed in double quotes (").

memberRole can be set to 0 (member) or 1 (owner). Do not enclose this setting in quotes. For example:

    CommunityService.createCommunityWithEmail("AJ's Community", 
    "ann_jones@company.com", 0, "/opt/myDSML.xml")
    

CommunitiesService.createCommunityWithLoginName(String communityName, String ownerName, int memberRole, String dsmlFile) Creates a new community whose membership list is initialized from a DSML file exported from the LDAP The DSML file must be local to the system running the script. For more information about how to create DSML files from your LDAP directory, see http://www.dsmltools.org/.

The script parses the DSML XML file and extracts the login name values. These values are used to populate the membership list of the community. The command uses a login name for the ownerName.

community name, ownerName, and dsmlFile are strings and must be enclosed in double quotes (").

memberRole can be set to 0 (member) or 1 (owner). Do not enclose this setting in quotes. For example:

    CommunityService.createCommunityWithLoginName("AJ's Community", 
    "ann_jones", 0, "/opt/myDSML.xml")
    

CommunitiesService.updateCommunityName(String communityName, String newName) Allows you to update an existing community's name as follows:

  • communityName. refers to the existing community name, which must be specified exactly

  • newName. is the new name of the community

Both communityName and newName must be enclosed in double quotes (").

CommunitiesService.updateCommunityDescription(String communityName, String newDescription) Allows you to update (overwrite) the description field in an existing community. Any existing description is overwritten by the new text that you enter into this command.

Both communityName and newDescription must be enclosed in double quotes (").

CommunitiesService.addMembersToCommunityByEmail(String communityName, String memberRole, String emailAddresses) Adds members to an existing community.

You run this command in two steps. First, create a comma-separated list of users (using their e-mail addresses) that you want to add to an existing community and assign this list to a variable. This variable is then used as input into the addMembersToCommunity command.

You must specify the name of the community exactly. Note that communityName is a string and must be enclosed in double quotes (").

memberRole: Valid settings are 0 (member) or 1 (owner). Do not enclose this setting in quotes. For example:

    wsadmin>threemembers=["alex_jones@MyCompany.com", 
    "mary_smith@MyCompany.com, "paul_henderson@MyCompany.com"] wsadmin>CommunitiesService.addMembersToCommunityByEmail
    ("Ski Club Community",0,threemembers)
    

The CommunitiesService.addMembersToCommunity(String communityName, String memberRole, String emailAddresses) command was deprecated in release 2.5. Use this command or the CommunitiesService.addMembersToCommunityByMemberUuid(String communityName, String memberRole, String UUID of member) command instead.

CommunitiesService.addMembersToCommunityByMemberUuid(String communityName, String memberRole, String UUID of member) Adds members to an existing community. Use this command when you want to add users to a community's membership list, but they don't have an e-mail address.

You run this command in two steps. First, create a comma-separated list of users (using their UUID, the external LDAP ID) that you want to add to an existing community and assign this list to a variable. This variable is then used as input into the addMembersToCommunity command.

You must specify the name of the community exactly. Note that communityName is a string and must be enclosed in double quotes (").

memberRole: Valid settings are 0 (member) or 1 (owner). Do not enclose this setting in quotes. For example:

    wsadmin>onemember=["84b4897d-b4f8-4d95-9621-50bcaa2fd3ca"] wsadmin>CommunitiesService.addMembersToCommunityByMemberUuid
    ("Ski Club Community",0,onemember)
    

The CommunitiesService.addMembersToCommunity(String communityName, String memberRole, String emailAddresses) command was deprecated in release 2.5. Use this command or the CommunitiesService.addMembersToCommunityByEmail(String communityName, String memberRole, String emailAddresses) command instead.

CommunitiesService.removeReferencesByUri(String communityName, String referenceURIs) Allows you to remove all references to one or more existing bookmarks (URIs) from a specified community.

The command requires a two step process: First, create a comma-separated list of the bookmarks (URIs) that you want to remove from a community. These URIs are saved to a variable and this variable is used as input for the removeReferencesByUri command.

Because the URIs are specified as a string, each URI must be enclosed in double quotes and separated by commas. All URIs must be enclosed within square brackets. The URI that is listed must match exactly the URI that is saved in the community or else this command fails.

communityName is a string and must be enclosed in double quotes ("). For example:

    wsadmin>delete=["http://valid1.url.com", 
    "http://valid2.url.com", "http://valid3.url.com"] wsadmin>CommunitiesService.removeReferencesByUri
    ("Ski Club Community",delete)
    

CommunitiesService.removeTagsFromCommunity(String communityName, String tagNames) Allows you to remove tags from an existing community. This command is a two step process. First, create a comma-separated list of tags to remove from a community. This list of tags is saved to a variable and the variable is used as input for the removeTagsFromCommunity command.

You can remove tags on a community. You cannot remove tags associated with bookmarks or feeds within a community.

Because the tags are specified as a string, each tag must be enclosed in double quotes and separated by commas. All tags must be enclosed within square brackets.

communityName is a string and must be enclosed in double quotes. For example:

    wsadmin>tags=["snowboard", "mountain"] wsadmin>CommunitiesService.removeTagsFromCommunity
    ("Ski Club Community",tags)
    


CommunitiesMemberService commands

Command Description
CommunitiesMemberService.syncAllMemberExtIds() Synchronizes all member IDs in the Communities member database table with the LDAP ID. For each member, this service queries the LDAP server by login name (or names) stored as part of the Communities member profile to retrieve the updated ID (unique inter-application identifier). In addition, the member's login names, display name, and e-mail address are updated if necessary.

This command is used when a change occurs in the deployment LDAP system. For example, if people have been deleted from the LDAP or personal information has changed.

Update time varies depending on the number of people in the Community database. On average, it takes eight minutes to update 500 users. For large databases, run this process overnight.

This command does not take any parameters. For example:

    CommunitiesMemberService.syncAllMemberExtIds()
    

The CommunitiesService.updateAllMemberIds() command was deprecated in release 2.5. Use this command instead.

CommunitiesMemberService.syncMemberExtIdByLogin(String loginName) Synchronizes a single member's ID in the Communities member database table. This command is essentially the same as syncAllMemberExtIds() but applied to a single member. Thus, the member's login names, display name, and e-mail address are updated if necessary.

This command takes loginName as a parameter. This is a single, valid user login name. For example:

    CommunitiesMemberService.syncMemberExtIdByLogin("John Smith")
    

The CommunitiesService.updateMemberId("[email]") command was deprecated in release 2.5. Use this command or the CommunitiesMemberService.syncMemberExtIdByEmail(String emailAddr) command instead.

CommunitiesMemberService.syncBatchMemberExtIdsByLogin(String loginFile) Synchronizes a list of member's IDs in the Communities member database table. The list is specified in a text file specified by the parameter. This command is essentially the same as syncAllMemberExtIds() but applied to a list of members, and the LDAP server is queried by the specified login names. Thus, the member's login names, display name, and e-mail address are updated if necessary.

This command takes loginFile as a parameter. This is a text file name with a single, valid login name per line. Create this text file and save it in a local to the server where you are running the wsadmin processor. For example:

    CommunitiesMemberService.syncBatchMemberExtIdsByLogin
    ("/opt/Communities/update.txt")
    

The CommunitiesService.updateMemberIdBatch("fileName") command was deprecated in release 2.5. Use this command or the CommunitiesMemberService.syncBatchMemberExtIdsByEmail(String emailFile) command instead.

CommunitiesMemberService.syncMemberExtIdByEmail(String emailAddr) Synchronizes a single member's ID in the Communities member database table. The command is essentially the same as syncAllMemberExtIds(), but applied to a single member, who is identified by the specified e-mail address. In addition, the member's login names and display name are updated if necessary.

This command is used when a change occurs in the deployment LDAP system or when a person identifier in the LDAP changes in some respect. This change might occur when an LDAP record is updated.

This command takes a string as a parameter, emailAddr. This string is a valid e-mail address. For example:

    CommunitiesMemberService.syncMemberExtIdByEmail(
    "jdoe@company.com")
    

The CommunitiesService.updateMemberId("[email]") command was deprecated in release 2.5. Use this command or the CommunitiesMemberService.syncMemberExtIdByLogin(String loginName) command instead.

CommunitiesMemberService.syncBatchMemberExtIdsByEmail(String emailFile) Synchronizes a list of members' IDs in the Communities member database table. The list is specified in a text file specified by the parameter. This command is essentially the same as syncAllMemberExtIds() but applied to a list of members, and the LDAP server is queried by the specified e-mail addresses. Thus, the member's login names and display name are updated if necessary.

This command takes emailFile as a parameter. This is a text file name with a single, valid e-mail address per line. You must create this text file and save it in a that is local to the server where you are running the wsadmin processor. For example:

    CommunitiesMemberService.syncBatchMemberExtIdsByEmail
    ("c:/Communities/email_file.txt")
    

The CommunitiesService.updateMemberIdBatch("fileName") command was deprecated in release 2.5. Use this command or the CommunitiesMemberService.syncBatchMemberExtIdsByLogin(String loginFile) command instead.


CommunitiesQEventService commands

Command Description
CommunitiesQEventService.viewQueuedEventsSummary() Lists a summary of all of the life-cycle replay events that are currently queued for processing.
CommunitiesQEventService.viewQueuedEventsByResourceType(String resourceType, HashMap lastEvent, int maxRows) Lists the queued life-cycle replay events with the specified resource type, where:

  • resourceType is the string "community".

  • lastEvent specifies the last row of the previous batch. This is a HashMap object. To obtain the first batch, specify None.

  • maxRows is the number of rows to be retrieved and viewed with a single command. Use maxRows when there is a large number of rows, 200, for example, to break up both the database reads and the display into batches.

This command returns a HashMap that is the last viewed row. Where there are no more rows, the value None is returned. This makes it straightforward to loop over all rows a few rows at a time. For example:

    CommunitiesQEventService.viewQueuedEventsByResourceType
    ("community", None, 100)
    

CommunitiesQEventService.viewQueuedEventsByResourceId(String resourceType, String resourceId, HashMap lastEvent, int maxRows) Lists the queued life-cycle replay events with the specified resource type and resource ID, where:

  • resourceType is the string "community".

  • resourceId is the communityUuid. This is a string.

  • lastEvent is a HashMap object.

  • maxRows is the number of rows to be retrieved and viewed with a single command. Use maxRows when there is a large number of rows, 200, for example, to break up both the database reads and the display into batches.

This command returns a HashMap, which is the last viewed row. When there are no more rows, the value None is returned. This makes it straightforward to loop over all rows a few at a time. For example:

    CommunitiesQEventService.viewQueuedEventsByResourceId
    ("community", "e952cf0c-a86c-4e26-b1e0-f8bf40a75804", None, 100)
    

CommunitiesQEventService.viewQueuedEventsByRemoteAppDefId(String remoteAppDefId, HashMap lastEvent, int maxRows) Lists the queued life-cycle replay events associated with the specified remote application ID, where:

  • remoteAppDefId is one of the following: Activities, Blog, Files, or Wiki. The first character of the string must be formatted in uppercase.

  • lastEvent specifies the last row of the previous batch. This is a HashMap object. To obtain the first batch, specify None.

  • maxRows is the number of rows to be retrieved and viewed with a single command. Use maxRows when there is a large number of rows, 200, for example, to break up both the database reads and the display into batches.

This command returns a HashMap that is the last viewed row. When there are no more rows, the value None is returned. This makes it straightforward to loop over all rows a few at a time. For example:

    CommunitiesQEventService.viewQueuedEventsByRemoteAppId
    ("Blog", None, 100)
    

CommunitiesQEventService.retryQueuedEventsByResourceType(String resourceType) Retries queued life-cycle replay events with the specified resource type, where resourceType is a string. The value of resourceType is always "community".

The return value is either 1 or 0. 1 indicates success; 0 indicates failure. For example:

    CommunitiesQEventService.retryQueuedEventsByResourceType
    ("community")
    

CommunitiesQEventService.retryQueuedEventsByResourceId(String resourceType, String resourceId) Retries queued life-cycle replay events with the specified resource type and resource ID, where resourceType and resourceId are both strings.

The return value is either 1 or 0. 1 indicates success; 0 indicates failure. For example:

    CommunitiesQEventService.retryQueuedEventsByResourceId
    ("community", "e952cf0c-a86c-4e26-b1e0-f8bf40a75804")
    

CommunitiesQEventService.retryQueuedEventsByRemoteAppDefId(String remoteAppId) Retries queued life-cycle replay events with the specified associated application ID, where remoteAppDefId is one of the following: Activities, Blog, Files, or Wiki. The first character of the string must be formatted in uppercase.

The return value is either 1 or 0. 1 indicates success; 0 indicates failure. For example:

    CommunitiesQEventService.retryQueuedEventsByRemoteAppDefId
    ("Wiki")
    

CommunitiesQEventService.clearQueuedEventsByResourceType(String resourceType) Clears queued life-cycle replay events with the specified resource type, where resourceType is a string. The events are removed from the queue and they are not processed.

The return value is the number of events that were cleared. For example:

    CommunitiesQEventService.clearQueuedEventsByResourceType
    ("community")
    

CommunitiesQEventService.clearQueuedEventsByResourceId(String resourceType, String resourceId) Clears queued life-cycle replay events with the specified resource ID, where resourceType and resourceId are both strings. The events are removed from the queue and they are not processed.

The return value is the number of events that were cleared. For example:

    CommunitiesQEventService.clearQueuedEventsByResourceId
    ("community", "e952cf0c-a86c-4e26-b1e0-f8bf40a75804")
    

CommunitiesQEventService.clearQueuedEventsByRemoteAppDefId(String remoteAppDefId) Clears queued life-cycle replay events with the specified associated application ID, where remoteAppDefId is one of the following: Activities, Blog, Files, or Wiki. The first character of the string must be formatted in uppercase. Using this command removes the events from the queue and they are not processed.

The return value is the number of events that were cleared. For example:

    CommunitiesQEventService.clearQueuedEventsByRemoteAppId
    ("Wiki")
    

CommunitiesQEventService.clearQueuedEventByEventId(String eventId) Clears queued life-cycle replay events with the specified event ID, where eventId is a string. The events are removed from the queue and are not processed.

The return value is the number of events that were cleared. For example:

    CommunitiesQEventService.clearQueuedEventsByEventId
    ("2d93497d-065a-4022ae25-a4b52598d11a")
    


CommunitiesListService commands

Command Description
CommunitiesListService.filterListByName(List list, String filter) Returns a new list containing only the communities whose names match the regular expression filter.For example:

    wsadmin>allComm=CommunitiesService.fetchAllComm() wsadmin>CommunitiesListService.filterListByName
    (allComm,"My Community Name")
    

This example returns a list of all communities using the fetchAllComm command (command is set to a variable that will be used in the next command) and then filters the results to get the information for a particular community.

CommunitiesListService.filterListByType(List list, String filter) Returns a new list containing only the communities whose type (private, public, or publicInviteOnly) matches the regular expression filter.For example:

    wsadmin>commByMember=CommunitiesService.fetchCommByMember
    ("jane_smith@company.com") wsadmin>CommunitiesListService.filterListByType
    (commByMember,"publicInviteOnly")
    

This example retrieves a list of all the communities for a particular user (in this case Jane Smith) and then filters that list to display all the user's communities that are publicInviteOnly. The fetch command is set to a variable that will be used in the listService command.

CommunitiesListService.filterListById(List list, String filter) Returns a new list containing only the communities whose ID matches the regular expression filter.For example:

    wsadmin>all=CommunitiesService.fetchAllComm() wsadmin>CommunitiesListService.filterListById
    (all, "c6a2c680-5933-4efa-9a14-be1723445d30")
    

This example returns a list of all the communities and then filters the results by ID to list only the communities where the ID matches the one specified.

CommunitiesListService.filterListByApp(List list, String filter) Returns a new list containing only the communities where the application type matches the regular expression filter. Examples of applications include Confluence Wiki, IBM Lotus Quickrâ„¢ Wiki, and Lotus Quickr Teamspace. Depending on how the list is returned, you can filter an application from:

  • All links, when the list is returned by the ManagedAppService.fetchAllLink command.

  • A specific community, when the list is returned by the CommunitiesService.fetchCommByName command.

  • The communities that a specific user is a member or owner of, when the list is returned by the CommunitiesService.fetchCommByMember command.

The following example gets a list of all the communities that the specified user is a member or owner of, and then gets a list of all the links associated with that user. The filter command then filters that list by the application name specified. A list of communities associated with the specified application is returned.

    wsadmin>bymember=CommunitiesService.fetchCommByMember
    ("users_email_address") wsadmin>links=ManagedAppService.fetchLinkByComm
    (bymember) wsadmin>CommunitiesListService.filterListByApp
    (links,"application_name")
    


CommunitiesSchedulerService commands

Command Description
CommunitiesSchedulerService.getTaskDetails(String taskName) Returns information about the scheduled task specified by taskName. The task names are LifecycleRetryQueuedEvents, ForumPurgeTrash, and EventLogCleanup.

The values returned in the HashMap are next scheduled fire time, server time, status ( SCHEDULED, RUNNING, SUSPENDED), and task name. SUSPENDED means that the task will not be scheduled to be run.

CommunitiesSchedulerService.pauseSchedulingTask(String taskName) Puts the task in the suspended state. When you pause a scheduled task, that task will remain in the suspended state even after you stop and restart Communities or the IBM WebSphere Application Server. You need to run the CommunitiesSchedulerService.resumeSchedulingTask command to get the scheduled 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.

The return value is either 1 or 0. 1 indicates success; 0 indicates failure.

CommunitiesSchedulerService.resumeSchedulingTask(String taskName) If the task is suspended, puts the task in the scheduled stated. If the task is not suspended, this command has no effect.

The return value is either 1 or 0. 1 indicates success; 0 indicates failure.


Running administrative commands

 

Related tasks

Running administrative commands

 

Related reference


Activities administrative commands

Error messages


+

Search Tips   |   Advanced Search