+

Search Tips   |   Advanced Search

Remove unwanted or inappropriate content

Use administrative commands to update or remove inappropriate information stored in the Communities database.

To use administrative commands, use wsadmin.sh.

The following commands can also be used to remove unwanted or inappropriate content from subcommunities.

We can edit basic community information using wsadmin commands. For example, we can change a community's name, update a community's description, and remove tags or bookmarks from a community.

The following commands can only be used to manage community content. To remove data from the applications that can be integrated with Communities, such as Activities, Blogs, Files, and Wikis, refer to the application documentation for each specific application. See the links at the end of this topic for more information.

When using the commands, if the community name that you provide as input to the command is not unique, an error similar to the following displays:

WASX7015E: Exception running command: "CommunitiesService.updateCommunityDescription("My community", "updated by wsadmin cmd")"; exception information:
 javax.management.RuntimeMBeanException
java.lang.IllegalArgumentException: java.lang.IllegalArgumentException: CLFRM0091E: Multiple communities found with name: My community 
When we see an error like this, instead of entering the name of the community in the command, we must enter the UUID of the community instead. For example:

We can obtain the UUID for a community or subcommunity by doing one of the following:

To control community content using Communities administrative commands.

  1. Start the Communities Jython script interpreter

      cd app_server_root/profiles/Dmgr01/bin
      ./wsadmin.sh -lang jython
      execfile("communitiesAdmin.py")

  2. Make changes to content in various fields of a community or subcommunity to which you do not have owner access. We can use the commands to remove unwanted or inappropriate content.

    CommunitiesService.updateCommunityName(String communityName, String newName)

    Allow 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 quotation marks (").

    For example:

      CommunitiesService.updateCommunityName("JDs Community", "JDs New Name")

    When using this command, if you get an error telling you the community or subcommunity name is not unique, enter the UUID instead.

    We can obtain the UUID for a community or subcommunity by doing one of the following:

    • Use a browser, open the community or subcommunity 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)

    Allow you to update (overwrite) the description field in an existing community or subcommunity. Any existing description is overwritten by the new text entered into this command.

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

    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)

    Allow 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) 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 quotation marks and separated by commas. All URIs must be enclosed within brackets. The URI 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 quotation marks (").

    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)

    Allow 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 to remove. This list of tags is saved to a variable and the variable is used as input for the removeTagsFromCommunity command.

    We can remove tags on a community or subcommunity, but we 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 quotation marks and separated by commas. All tags must be enclosed within brackets.

    The communityName parameter is a string and must be enclosed in double quotation marks (").

    For example:

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


Parent topic:
Remove unwanted community content


Related:

Delete user files from the system

Delete wikis from the system

Administer Blogs users

Delete activities