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 sections define the commands that you can use when working with Communities. Each section describes the commands for a specific service. The commands are listed in alphabetical order.
- CommunitiesListService
- CommunitiesMemberService
- CommunitiesQEventService
- CommunitiesScheduler
- CommunitiesService
- ManagedAppService
CommunitiesListService commands
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, 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")
CommunitiesListService.filterListById(List list, String filter)
Returns a new list containing only the communities and subcommunities whose ID matches the regular expression filter.
For example:
wwsadmin>all=CommunitiesService.fetchAllComm() wsadmin>CommunitiesListService.filterListById(all, "c6a2c680-5933-4efa-9a14-be1723445d30")This example returns a list of all the communities and subcommunities and then filters the results by ID to list only the communities and subcommunities where the ID matches the one specified.
CommunitiesListService.filterListByName(List list, String filter)
Returns a new list containing only the communities and subcommunities 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 and subcommunities 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 or subcommunity.
CommunitiesListService.filterListByType(List list, String filter)
Returns a new list containing only the communities and subcommunities 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 and subcommunities for a particular user (in this case Jane Smith) and then filters that list to display all the user's communities and subcommunities that are publicInviteOnly. The fetch command is set to a variable that will be used in the listService command.
CommunitiesMemberService commands
CommunitiesMemberService.getMemberExtIdByEmail("email")See Synchronize user data using administrative commands for details.
CommunitiesMemberService.getMemberExtIdByLogin("login")
See Synchronize user data using administrative commands for details.
CommunitiesMemberService.inactivateMemberByEmail("email")
See Synchronize user data using administrative commands for details.
CommunitiesMemberService.inactivateMemberByExtId("externalID")
See Synchronize user data using administrative commands for details.
CommunitiesMemberService.syncAllMembersByExtId( {"updateOnEmailLoginMatch": ["true" | "false"] } )
See Synchronize user data using administrative commands for details.
CommunitiesMemberService.syncBatchMemberExtIdsByEmail("emailFile" [, {"allowInactivate" : ["true" | "false"] } ])
See Synchronize user data using administrative commands for details.
CommunitiesMemberService.syncBatchMemberExtIdsByLogin("loginFile" [, {"allowInactivate" : ["true" | "false"] } ])
See Synchronize user data using administrative commands for details.
CommunitiesMemberService.syncMemberByExtId("currentExternalId"[, {"newExtId" : "id-string" [, "allowExtIdSwap" : ["true" | "false"] ] } ] )
See Synchronize user data using administrative commands for details.
CommunitiesMemberService.syncMemberExtIdByEmail("email" [, { "allowInactivate" : ["true" | "false"] } ])
See Synchronize user data using administrative commands for details.
CommunitiesMemberService.syncMemberExtIdByLogin("name" [, { "allowInactivate" : ["true" | "false"] } ])
See Synchronize user data using administrative commands for details.
CommunitiesQEventService commands
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")
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, Forum, Wiki. The first character of the string must be formatted in uppercase.
The return value is the number of events that were cleared.
For example:
CommunitiesQEventService.clearQueuedEventsByRemoteAppDefId("Wiki")
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 are not processed.
The resourceType parameter is always set to "community". The resourceId parameter is a value that can be obtained using one of the CommunitiesQEventService.viewQueuedEvents commands.
The return value is the number of events that were cleared.
For example:
CommunitiesQEventService.clearQueuedEventsByResourceId("community", "e952cf0c-a86c-4e26-b1e0-f8bf40a75804")
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 are not processed.
The resourceType parameter is always "community".
The return value is the number of events that were cleared.
For example:
CommunitiesQEventService.clearQueuedEventsByResourceType("community")
CommunitiesQEventService.retryQueuedEventsByRemoteAppDefId(String remoteAppDefId)
Retries queued life-cycle replay events with the specified associated application ID, where remoteAppDefId is one of the following: Activities, Blog, Files, Forum, 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.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 resourceType parameter is always set to "community". The resourceId parameter is a value that can be obtained using one of the CommunitiesQEventService.viewQueuedEvents commands.
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.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.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, Forum, Wiki. The first character in 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.viewQueuedEventsByRemoteAppDefId("Blog", None, 100)Thus, to display all queued events of resourceType "community" in batches of 10, when there are 200 entries, you might code in Jython:
lastRow = CommunitiesQEventService.viewQueuedEventsByRemoteAppDefId(“Activities”, None, 10) while (lastRow != None) lastRow = CommunitiesQEventService. viewQueuedEventsByRemoteAppDefId(“Activities”, lastRow, 10)
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)For example, you might use the following Jython code to display all queued events of resourceType "community" and resourceId b46300c7-7837-4ba3-b26b-3fcf67a75bba, in batches of 10 when there are 200 entries:
lastRow = CommunitiesQEventService.viewQueuedEventsByResourceId(“community”, "b46300c7-7837-4ba3-b26b-3fcf67a75bba", None, 10) while (lastRow != None) lastRow = CommunitiesQEventService.viewQueuedEventsByResourceId(“community”, "b46300c7-7837-4ba3-b26b-3fcf67a75bba", None, 10)
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.
For example:
CommunitiesQEventService.viewQueuedEventsByResourceType("community", None, 100)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 rows at a time.
For example, you might use the following Jython code to display all queued events of resourceType community in batches of 10 when there are 200 events:
lastRow = CommunitiesQEventService.viewQueuedEventsByResourceType(“community”, None, 10) while (lastRow != None) lastRow = CommunitiesQEventService.viewQueuedEventsByResourceType(“community”, lastRow, 10)
CommunitiesQEventService.viewQueuedEventsSummary()
Lists a summary of all of the life-cycle replay events that are currently queued for processing.
CommunitiesScheduler commands
CommunitiesScheduler.getTaskDetails(String taskName)Returns information about the scheduled task specified by taskName. The task names are LifecycleRetryQueuedEvents and EventLogCleanup.
The values returned in the HashMap are the next scheduled fire time, server time, status (SCHEDULED, RUNNING, SUSPENDED), and task name. SUSPENDED means that the task is not scheduled to run.
CommunitiesScheduler.pauseSchedulingTask(String taskName)
Puts the task in the suspended state. When you pause a scheduled task, that task remains in the suspended state even after you stop and restart Communities or the WAS. The task names are LifecycleRetryQueuedEvents and EventLogCleanup. Run the CommunitiesScheduler.resumeSchedulingTask command to get the scheduled task running again.
If the task is currently running when you use this command, the task 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.
CommunitiesScheduler.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 task names are LifecycleRetryQueuedEvents and EventLogCleanup.
The return value is either 1 or 0. 1 indicates success; 0 indicates failure.
CommunitiesService commands
CommunitiesService.addAlternateOwner(String directoryUuid, String alternateDirectoryUuid, Boolean removeOriginal)Adds the user with the specified alternateDirectoryUuid as an owner to every community and subcommunity owned by the user with the specified directoryUuid (external ID).
This command takes the following parameters:
directoryUuid
A string that specifies the directory UUID (external ID) of an existing community or subcommunity owner.
alternateDirectoryUuid
A string that specifies the directory UUID (external ID) of the person who you want to add as the alternate owner.
removeOriginal
A Boolean value that determines whether the person specified using the directoryUuid (external ID) parameter is removed from the membership of their communities and subcommunities. When set to true, the user with the specified directoryUuid is removed from their community and subcommunity membership. When set to false, the user with the specified directoryUuid remains listed as an owner of their communities and subcommunities.
For example:
CommunitiesService.addAlternateOwner("193F1CE8-E10A-4B9A-B933-C8ECD6C072E4", "EC8A89C0-F41D-102C-9B60-F225BC6C4AF4", "true")To obtain the value to use for the directoryUuid and alternateDirectoryUuid parameters, you can use the following command:
CommunitiesMemberService.getMemberExtIdByEmail("email_address")In the following example, for any community (or subcommunity) where Paul Smith is an owner, user Alice Lee is added to the membership list with owner access, and Paul Smith is removed from the membership list:
wsadmin>CommunitiesMemberService.getMemberExtIdByEmail("paul_smith@example.com") 510b99c0-0123-1010-8989-f78755f7e0ed wsadmin> wsadmin>CommunitiesMemberService.getMemberExtIdByEmail("alice_lee@example.com") 510b99c0-0101-102e-8934-f78755f7e0ed wsadmin> wsadmin>CommunitiesService.addAlternateOwner("510b99c0-0123-1010-8989-f78755f7e0ed", "510b99c0-0101-102e-8934-f78755f7e0ed", "true")
CommunitiesService.addMembersToCommunityByEmail(String communityName, Integer memberRole, List emailAddresses)
Adds members to an existing community or subcommunity.
Note: When you use this command to add owners or members to a subcommunity, the users that you are adding must belong to the parent community in order for them to be added to the subcommunity.
You use this command in two steps. First, create a comma-separated list of users (using their email addresses) that you want to add to an existing community or subcommunity and assign this list to a variable. This variable is then used as input into the addMembersToCommunity command.
Note that communityName is a string and must be enclosed in quotation marks ("). This parameter is case-sensitive, so be sure to specify the name of the community or subcommunity exactly.
memberRole. Valid settings are 0 (member) or 1 (owner). Do not enclose this setting in quotation marks.
For example:
wsadmin>threemembers= ["alex_jones@example.com", "mary_smith@example.com", "paul_henderson@example.com"] wsadmin>CommunitiesService.addMembersToCommunityByEmail("Ski Club Community",0,threemembers)Note: When you use this command, if the community or subcommunity name that you provide as input to the command is not unique, an error similar to the following displays:
WASX7015E: Exception running command: "CommunitiesService.addMembersToCommunityByEmail("My community",0,threemembers)"; exception information: javax.management.RuntimeMBeanException java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: CLFRM0091E: Multiple communities found with name: My communityWhen you see an error like the above, instead of entering the name of the community or subcommunity in the command, enter the UUID instead. For example:
wsadmin>CommunitiesService.addMembersToCommunityByEmail("5742c4c8-0010-4e6e-abdb-65015e8a22e1", 0,threemembers)You can obtain the UUID for a community or subcommunity by doing one of the following:
- Use a browser, open the community or subcommunity that you want and copy the UUID from the URL.
- Run the CommunitiesService.fetchAllComm() wsadmin command to fetch all communities and subcommunities on the server. Copy the UUID from the output.
CommunitiesService.addMembersToCommunityByMemberUuid(String communityName, Integer memberRole, List UUID of member)
Adds members to an existing community or subcommunity. Use this command when you want to add users to a community's membership list, but they don't have an email address. The users that you are adding must belong to the parent community in order for them to be added to the subcommunity.
Note: The member's UUID is the external LDAP identifier for a specific user. Use one of the following commands to return the user's external ID for use in the command above:
- CommunitiesMemberService.getMemberExtIdByEmail("email")
- CommunitiesMemberService.getMemberExtIdByLogin("login")
You use 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 or subcommunity and assign this list to a variable. This variable is then used as input into the addMembersToCommunity command.
Note that communityName is a string and must be enclosed in quotation marks ("). This parameter is case-sensitive, so be sure to specify the name of the community or subcommunity exactly.
memberRole: Valid settings are 0 (member) or 1 (owner). Do not enclose this setting in quotation marks.
For example:
wsadmin>onemember= ["84b4897d-b4f8-4d95-9621-50bcaa2fd3ca"] wsadmin>CommunitiesService.addMembersToCommunityByMemberUuid("Ski Club Community",0,onemember)Note: When you use this command, if you get an error telling you that the community or subcommunity name is not unique, instead of entering the name of the community or subcommunity in the command input, enter the UUID instead.
You can obtain the UUID for a community or subcommunity by doing one of the following:
- Use a browser, open the community or subcommunity that you want and copy the UUID from the URL.
- Run the CommunitiesService.fetchAllComm() wsadmin command to fetch all communities and subcommunities on the server. Copy the UUID from the output.
CommunitiesService.createCommunityWithEmail(String community name, String ownerName, int memberRole, String dsmlFile)
Creates a public community whose membership list is initialized from a Directory Services Markup Language (DSML) file exported from the LDAP directory. The DSML file must be local to the system running the script. The script parses the DSML file and extracts the mail values. These values are used to populate the membership list of the community. For more information about how to create DSML files from your LDAP directory, see http://www.dsmltools.org/
.
A typical mail attribute in a DSML file looks like the following:
<attr name="mail"> <value>john_doe@example.com</value> </attr>The command takes the following parameters:
communityName
A string value that specifies the name of the community that you are creating.
ownerName
A string value that specifies the name of the new community's owner. Enter the email address of the user who will be the owner of the community.
memberRole
An integer that specifies the role of the users added to the new community. This property can be set to 0 to specify the member role or 1 to specify the owner role. Do not enclose this setting in quotation marks.
dsmlFile
A string value that specifies that name of the DSML file containing the mail values used to populate the community membership.
In the following example, a community named AJ's Community is created with Ann Jones as the community owner/creator. The command parses the file /opt/myDSML.xml, looks for each of the mail attributes, and then adds those email addresses to the new community with member access.
CommunitiesService.createCommunityWithEmail("AJ's Community", "ann_jones@example.com", 0, "/opt/myDSML.xml")Notes:
- This command only creates top-level communities; it cannot be used to create subcommunities.
- This command creates a public community by default. To change the visibility of the community, the community owner must edit the community from the user interface and change the access level to moderated or restricted as needed.
CommunitiesService.createCommunityWithLoginName(String communityName, String ownerName, int memberRole, String dsmlFile)
Creates a public community whose membership list is initialized from a DSML file exported from the LDAP directory. The DSML file must be local to the system running the script. 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. For more information about how to create DSML files from your LDAP directory, see http://www.dsmltools.org/
.
The command takes the following parameters:
communityName
A string value that specifies the name of the community that you are creating.
ownerName
A string value that specifies the name of the new community's owner. Enter the loginName of the user who will be the owner of the community.
memberRole
An integer that specifies the role of the users added to the new community. This property can be set to 0 to specify the member role or 1 to specify the owner role. Do not enclose this setting in quotation marks.
dsmlFile
A string value that specifies the name of the DSML file containing the loginName values used to populate the community membership.
In the following example, a community named AJ's Community is created with Ann Jones as the community owner/creator. The command parses the file /opt/myDSML.xml and looks for each of the login attributes and adds those login names to the new community with member access.
CommunitiesService.createCommunityWithLoginName("AJ's Community", "ann_jones", 0, "/opt/myDSML.xml")Notes:
- This command only creates top-level communities; it cannot be used to create subcommunities.
- This command creates a public community by default. To change the visibility of the community, the community owner must edit the community from the user interface and change the access level to moderated or restricted as needed.
CommunitiesService.fetchAllComm()
Returns a vector of hash maps of all communities and subcommunities. There is no way to distinguish from the information returned whether the object is a community or subcommunity.
CommunitiesService.fetchCommById(string communityUUID)
Returns the community or subcommunity with the specified UUID.
You can obtain the UUID for a community or subcommunity by doing one of the following:
- Use a browser, open the community or subcommunity that you want and copy the UUID from the URL.
- Run the CommunitiesService.fetchAllComm() wsadmin command to fetch all communities and subcommunities on the server. Copy the UUID from the output.
For example:
wsadmin>CommunitiesService.fetchCommById("59d8e5a7-ba0e-488f-8bcd-1f79a994e419") [{createdBy= [Andy Jones, 2BC32FEF-E736-4C81-986C-30780C5EF8C3], lastMod=6/18/09 3:09:02 PM EDT, description= Community of developers working on JAVA projects in our company. This is a community to share ideas., name=JAVA Developers community, uuid=59d8e5a7-ba0e-488f-8bcd-1f79a994e419, memberSize=6, type=publicInviteOnly, tags= [developers, java], created=6/18/09 3:08:48 PM EDT, lastModBy= [Andy Jones, 2BC32FEF-E736-4C81-986C-30780C5EF8C3]}] wsadmin>
CommunitiesService.fetchCommByMemberEmail(String email)
Returns all the communities and subcommunities that the user of the specified email address is a member of. There is no way to distinguish from the information returned whether the object is a community or subcommunity.
For example:
CommunitiesService.fetchCommByMember("john_doe@company.com")
CommunitiesService.fetchCommByMemberUuid(String uuid)
Returns all the communities and subcommunities that the user with the specified UUID is a member of. There is no way to distinguish from the information returned whether the object is a community or subcommunity.
For example:
CommunitiesService.fetchCommByMemberUuid("193F1CE8-E10A-4B9A-B933-C8ECD6C072E4")Note: The Member's UUID is the External LDAP identifier for a specific user. Use one of the following commands to return the user's external ID for use in the command above.
- CommunitiesMemberService.getMemberExtIdByEmail("email")
- CommunitiesMemberService.getMemberExtIdByLogin("login")
CommunitiesService.fetchCommByName(String name)
Returns the community or subcommunity with the specified name.
Note: 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:
wsadmin>CommunitiesService.fetchCommByName("Test Community")If the name of the community or subcommunity that you enter in this command is not unique, the command fails with an error. If the command fails, use the following command instead:
CommunitiesService.fetchCommById(string communityUUID)
CommunitiesService.fetchMember(List list)
Returns the input list of communities or subcommunities 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 or subcommunities in the list passed into this command and returns a new list with references.
This command is run in two steps. First, use the fetchAllComm command to gather the list of communities and assign the list to a variable. The variable is then used as input into the fetchReference command.
For example:
wsadmin>allComm=CommunitiesService.fetchAllComm() wsadmin>CommunitiesService.fetchReference(allComm)The results that are returned include any feeds or bookmarks for a community or subcommunity. 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]]
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 or subcommunities 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 or subcommunities in the list input to the specified file using an easy-to-read format. The directory 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.removeAllMembershipByDirectoryUuid(String directoryUuid)
Removes the specified user from any communities and subcommunities to which they belong.
The command takes a single parameter:
directoryUuid
A string that specifies the directory UUID (external ID) of the user whose membership you want to remove.
If the user is the last owner of a community or subcommunity, they are not removed, and the community or subcommunity is included in the return value for this call. The command returns a vector of hash maps of all the communities and subcommunities where the user was not removed because they are the last owner.
To obtain the directory UUID to use as input into this command, use one of the commands below. Both commands return the user's external ID.
- CommunitiesMemberService.getMemberExtIdByEmail("email")
- CommunitiesMemberService.getMemberExtIdByLogin("login")
For example:
CommunitiesService.removeAllMembershipByMemberUuid("91b3897d-b4f8-4d05-3621-50bcaa22d300")
CommunitiesService.updateCommunityName(String communityName, String newName)
Allows you to update an existing community or subcommunity name where:
- communityName refers to the existing community or subcommunity name, which must be specified exactly.
- newName is the new name of the community or subcommunity.
Both communityName and newName must be enclosed in double quotes (").
For example:
CommunitiesService.updateCommunityName("JDs Community", "JDs New Name")Note: When you use this command, if you get an error telling you that the community or subcommunity name is not unique, enter the UUID instead.
You can obtain the UUID for a community or subcommunity by doing one of the following:
- Use a browser, open the community or subcommunity that you want and copy the UUID from the URL.
- Run the CommunitiesService.fetchAllComm() wsadmin command to fetch all communities and subcommunities on the server. Copy the UUID from the output.
CommunitiesService.updateCommunityDescription(String communityName, String newDescription)
Allows you to update (overwrite) the description field in an existing community or subcommunity. 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.
For example:
CommunitiesService.updateCommunityDescription("Ski Community", "The purpose of this community is to bring together people interested in skiing.")
CommunitiesService.removeReferencesByUri(String communityName, List referenceURIs)
Allows you to remove all references to one or more existing bookmarks (URIs) from a specified community or subcommunity.
The command requires a two-step process: First, create a comma-separated list of the bookmarks (URIs) that you want to remove. 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 list, 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 subcommunity, otherwise the command fails.
The communityName parameter 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, List tagNames)
Allows you to remove tags from an existing community or subcommunity. This command is a two-step process. First, create a comma-separated list of the tags that you want to remove. This list of tags is saved to a variable and the variable is used as input for the removeTagsFromCommunity command.
Note: You can remove tags on a community or subcommunity, but you cannot remove tags associated with bookmarks or feeds within a community.
Because the tags are specified as a list, each tag must be enclosed in double quotes and separated by commas. All tags must be enclosed within square brackets.
The communityName parameter is a string and must be enclosed in double quotes.
For example:
wsadmin>tags= ["snowboard", "mountain"] wsadmin>CommunitiesService.removeTagsFromCommunity("Ski Club Community", tags)
ManagedAppService commands
ManagedAppService.addLinkProperty(Link link, String key, String value)Adds or updates the key property for the specified link.
Adding or updating the key property for a link is a multi-step process.
For example:
wsadmin>link=ManagedAppService.fetchLinkByApp("application name") wsadmin>link2=link.get(0) // link2=link.elementAt(0) would work as well wsadmin>ManagedAppService.addLinkProperty(link2,"NewKey","NewValue")
ManagedAppService.checkInConfig(String "<app>")
Checks in the configuration file for the specified application.
ManagedAppService.checkOutConfig(String "<app>", String "<working directory>", String "<cell name>")
Checks out the configuration file for the specified application.
The working directory must be a directory that already exists.
ManagedAppService.configHelp(String "<app>")
Prints the help messages for the configuration settings that can be set for the specified application.
ManagedAppService.createLink(List comList, String appName)
Creates a link to the managed application for each community in the community list comList. Depending on how comList is returned, a link can be created for the following:
- All communities, when comList is returned by a fetchAllComm command
- A specific community, when comList (with a single element) is returned by a fetchCommByName command
- The communities that a specific user is a member or owner of, when comList is returned by the fetchCommByMemberEmail or fetchCommByMemberUuid command
The first step is to create a list of communities using one of the CommunitiesService fetch commands mentioned above. When executing the command to fetch the community list, assign the command to a variable. The variable, which contains the output of the fetch command, is used as input for the createLink command. Also, the application name is a string so it must be enclosed in quotes.
For example:
wsadmin>commbymember=CommunitiesService.fetchCommByMemberEmail("jane_smith@example.com") wsadmin>ManagedAppService.createLink(commbymember,"ConfluenceWiki")This example creates links to the managed application for each of the communities associated with a specific user.
ManagedAppService.deleteLink(List linkList)
Removes the links between a community (or communities) and an application (or applications) from the specified list of links. Application properties are deleted from the elements in linkList when the application is removed.
This is a three-step process:
- Create a list of the communities that will have their links deleted.
- Create a list of the link information for the list of communities generated in step a.
- Run the deleteLink command. When executing steps and b, set the command to a variable. The output of the commands is used as input in the next command.
For example:
wsadmin>commbyname=CommunitiesService.fetchCommByName("community name") wsadmin>linkbycomm=ManagedAppService.fetchLinkByComm(commbyname) wsadmin>ManagedAppService.deleteLink(linkbycomm)This example deletes links for a specific community.
ManagedAppService.deleteLinkProperty(Link link, String key)
Removes the key property for the applications in the list.
This is a multi-step process.
For example:
wsadmin>link=ManagedAppService.fetchLinkByApp("application name") wsadmin>link2=link.get(0) // link2=link.elementAt(0) would work as well wsadmin>ManagedAppService.deleteLinkProperty(link2,"NewKey")
ManagedAppService.fetchAllLink()
Returns a list of all the links configured on the server.
ManagedAppService.fetchLinkByApp(String appName)
Returns a list of all the links associated with the specified application.
The application name is a string and must be enclosed in quotes.
For example:
wsadmin>ManagedAppService.fetchLinkByApp("ConfluenceWiki")
ManagedAppService.fetchLinkByComm(List comList)
Returns a list of all the links associated with the specified communities.
This is a two-step process. The first step is to create a list of communities for which you want to get link information. This is done using the CommunitiesService fetch commands. Lists can be created for all communities, a specific community, or the communities that the specified user is a member or owner of. Set the fetch command to a variable. The output from this command is used as input in the fetchLinkByComm command.
For example:
wsadmin>allcomm=CommunitiesService.fetchAllComm() wsadmin>ManagedAppService.fetchLinkByComm(allcomm)This example retrieves the link information for all communities.
ManagedAppService.fetchLinkByCommApp(List comList, String appName)
For each community in the list, returns the link associated with the type.
This is a two-step process. The first step is to create a list of communities for which you want to get the link information. This is done using the CommunitiesService fetch command. Lists can be created for all communities, a specific community, or the communities that the specified user is a member or owner of. Set the fetch command to a variable. The output from this command is used as input in the fetchLinkByCommApp command.
For example:
wsadmin>bycommname=CommunitiesService.fetchCommByName("community name") wsadmin>ManagedAppService.fetchLinkByCommApp(bycommname,"ConfluenceWiki")This example retrieves the link information for a specific community.
ManagedAppService.fetchProperty(List linkList)
Returns a list of the properties set for each link in the list.
The input for this command is a list of links. In the following example, the first step retrieves a list of all the links on the server. The command is set to a variable. The output from the fetch command is the input for the fetchProperty command.
wsadmin>links=ManagedAppService.fetchAllLink() wsadmin>ManagedAppService.fetchProperty(links)
ManagedAppService.listApp()
Lists the names and current enabled status of all the applications installed on the Communities server.
For example, if the IBM Connections Connector for Confluence is installed and enabled, the following output is returned by this command:
ConfluenceWiki trueChanging the configuration settings of an application does not change the status reported by this command unless the server is restarted.
ManagedAppService.listLink(List linkList)
Displays the links specified in the list in a readable format on the screen. The command prints properties for the links if the linkList argument was obtained with the fetchProperties command.
The following example lists all the links in a more easily readable format. The first step is to create the list of links. Set the command to a variable. The variable is used as input in the listLink command.
wsadmin>links=ManagedAppService.fetchAllLink() wsadmin>ManagedAppService.listLink(links)
ManagedAppService.listLinkToFile(List linkList, String fileName)
Prints the links specified in the list in a readable format to a file. The command prints properties for the links if the linkList argument was obtained with the fetchProperties command.
Note: The specified path must already exist. The only difference between this command and ManagedAppService.listLink is that a path and file name to which the data is output needs to be specified.
wsadmin>links=ManagedAppService.fetchAllLink() wsadmin>ManagedAppService.listLinkToFile(links,"/temp/data.txt")
ManagedAppService.showConfig(String "<app>")
Lists the configuration settings for the specified application. This command also displays the settings that can be configured.
ManagedAppService.updateConfig(String "<app>", String "<property>", String "<value>")
Updates a specific property in the configuration file for the specified application.
Note: Each application has its own set of configuration properties. The listApp method lists the properties for an application.
ManagedAppService.updateFeedURI(Link link, String URI)
Updates the feed URI for this link.
Updating the feed URI is a multi-step process. The first step is to fetch the community, the next step is to get the link to the feed the URI is to be updated on, and then issue the command to update the URI.
In the example below, it is assumed that the community either has a single link, or that is has multiple links and the first one in the list is the one (index 0) that you want to update. If a community has multiple links, you need to be careful to select the right one.
wsadmin>byname=CommunitiesService.fetchCommByName("<community name>") wsadmin>bycomm=ManagedAppService.fetchLinkByComm(byname) wsadmin>ManagedAppService.updateFeedURI(bycomm.elementAt(0),"http://<new URI>")
ManagedAppService.updateMainURI(Link link, String URI)
Updates the main URI for this link.
Updating the main URI is a multi-step process. The first step is to get the community. Then you retrieve the link the main URI is updated on, and run the command to update the URI.
For example:
wsadmin>byname=CommunitiesService.fetchCommByName("<community name>") wsadmin>bycomm=ManagedAppService.fetchLinkByComm(byname) wsadmin>ManagedAppService.updateMainURI(bycomm.elementAt(0),"http://<new URI>")
Parent topic
Running Communities administrative commandsRelated concepts
Synchronize user data using administrative commands
Related tasks
Running administrative commandsRelated reference
Activities administrative commands
Error messages
Communities configuration properties