Administer managed applications 

Communities supports integration with several applications from independent software vendors, such as Confluence Wiki and IBM Lotus Quickr . You can use managed application commands to administer these applications when they are installed on community servers.


Before you begin

To use administrative commands, use the wsadmin client. See Starting the wsadmin client for details.


About this task

You use the createLink method to create an association between a list of communities (typically a list of 1) and a managed application. This association between a community and a managed application is called a link.

You use the various fetch methods to obtain a list of hash maps that represents a link (list with 1 element) or links. This list of links can be assigned to a variable and used as input in other commands to change link settings.


Procedure

To administer the managed applications configured on community servers...

  1. From the dmgr host:

      cd $DMGR_PROFILE/bin
      ./wsadmin.sh -jython
      execfile("communitiesAdmin.py")

      If prompted to specify a service to connect to, type 1 to pick the first node in the list. Most commands can run on any node. If the command writes or reads information to or from a file using a local file path, pick the node where the file is stored.

  2. Use the following commands to administer managed applications:

      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 true

        Changing the configuration settings of an application does not change the status reported by this command unless the server is restarted.

      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:

        1. Create a list of the communities that will have their links deleted.

        2. Create a list of the link information for the list of communities generated in step a.

        3. 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.fetchAllLink()

        Returns a list of all the links configured on the server.

      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.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.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.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.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>")

      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.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.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")


Parent topic

Work with managed applications


   

 

});