3 Replies Latest reply on Nov 19, 2014 9:36 AM by Ryan Rutan

    Creating an addon using Jive Java sdk

    hemamalini

      I created the sample addon using the instructions in the jivesoftware/jive-sdk-java-jersey · GitHub. Now i am trying to create to new tile which should fetch two columns from a database.  I could see the contents of the tile are hardcoded in definition.json. i have a Java class that connects to that db and fetches two column . Now how can i add that in the table tile?What does getBogusPush method in MyExampleTableTile.java do? Do i have to override there?  Can somebody please tell me how can i do that. .How to understand the API

        • Re: Creating an addon using Jive Java sdk
          Ryan Rutan

          getBogusPush is simply a method that pulls fake data and pushes it to the tile in question.  Since it is a locally scoped method, you are welcome to rename it and change its implementation, but it is worthwhile knowing that it has all the components needed to push the data to the Tile.  To update, simply check where the Tile is being populated in the method, and replace it with your values and you should be good to go with the rest of the code.

           

          Hope that helps.

            • Re: Creating an addon using Jive Java sdk
              hemamalini

              I could see the information being hardcorded in definition.json. I am just trying to understand the flow of the addon service . I have added a service like the one like Health Service where i have added my logic and push the data . Do i have to the give the url of that service to the table tile while configuring?  I could see Tile is populated in getBogusPush method in MyExampleTableTile  method. Please correct me if i am wrong.

                • Re: Creating an addon using Jive Java sdk
                  Ryan Rutan

                  In the definition.json, it tells Jive where the Tile implementations exist.  On install, Jive reads this file, and adds the necessary Tiles to the catalog rendered in the Place Settings > Configure UI. 

                   

                  When a person drops a Tile onto a place and clicks configure, Jive reaches out to the designated configure screen (see: definition.json) and renders the configure experience.  When the "Save" button is pressed, Jive saves the configuration and then calls the "register" end-point (see: definition.json) for that Tile to inform your Add-On service that a Tile has been configured with specific values and for a specific place, and provides an API tile data end-point to push data to that instance of the Tile.

                   

                  At the point, it is up to your Add-On... to push data to Jive to the tile data end-point that honors the configuration parameters that were sent down by Jive.

                   

                  Does that help explain the flow?

                  1 person found this helpful