Home

 

Filtering community lists

Use the CommunitiesListService commands to filter the information in community lists and to generate smaller lists containing more specific information.


To use administrative commands, use wsadmin. See Start wsadmin for details.


To filter community lists, perform the following steps:

  1. Start wsadmin so that you can access the Communities configuration files.

    1. Access the Communities configuration files:

      If you are asked to select a server, you can select any server.

  2. Filter the information in community lists and generate new lists:

    The commands can also be used on application lists.


    CommunitiesListService commands

    Option Description
    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 theCommunitiesService.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.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:

      wwsadmin>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.


Administer Communities


+

Search Tips   |   Advanced Search