Uploaded image for project: 'OptaPlanner'
  1. OptaPlanner
  2. PLANNER-1168

Conference Scheduling example: add button to import from a Devoxx CFP website REST API

XMLWordPrintable

      Devoxx is a set of major Java conferences around the globe.
      Take a look at http://www.devoxx.com.

      The biggest one is Devoxx Belgium (AKA Devoxxhttps://issues.jboss.org/browse/PLANNER-1168 BE), arguably the biggest or second biggest Java conference on this planet (only rivaled by JavaOne).

      Every Devoxx uses their CFP application, such as https//cfp.devoxx.be
      That CFP has a REST API: https://dvbe18.confinabox.com/api
      Source code: https://github.com/nicmarti/cfp-devoxx

      Add a button that imports all the talks from that REST api.

      0) The user needs to pick which url which defines the conference (and which year of that conference) that he's loading.
      For example:

      1) You'll want to create instances of these domain objects:
      https://github.com/kiegroup/optaplanner/tree/master/optaplanner-examples/src/main/java/org/optaplanner/examples/conferencescheduling/domain

      For inspiration, take a look at the generator, which generates a random conference:
      https://github.com/kiegroup/optaplanner/blob/master/optaplanner-examples/src/main/java/org/optaplanner/examples/conferencescheduling/persistence/ConferenceSchedulingGenerator.java#L243

      In the end, you'll have a ConferenceSolution instance, that contains Room instances, Speaker instances, etc.

      2) Here's the old optaconf code that reads the Devox CFP REST API and creates pojo's with it:
      https://github.com/ge0ffrey/optaconf/blob/master/optaconf-bridge-devoxx/src/main/java/org/optaconf/bridge/devoxx/DevoxxImporter.java#L102
      This does: import javax.json.Json;
      That needs dependency javax.json-api 1.1.2
      http://mvnrepository.com/artifact/javax.json/javax.json-api
      which is cool to add to optaplanner-examples/pom.xml:
      https://github.com/kiegroup/optaplanner/blob/master/optaplanner-examples/pom.xml#L153

      3) Add a simple button in this swing screen to start reading the devoxx CFP:
      https://github.com/kiegroup/optaplanner/blob/master/optaplanner-examples/src/main/java/org/optaplanner/examples/conferencescheduling/swingui/ConferenceSchedulingPanel.java#L35

      Once you have a ConferenceSolution instance, in that panel, call
      getSolverAndPersistenceFrame().loadNewSolution(solution) and implement that method on SolverAndPersistenceFrame.
      https://github.com/kiegroup/optaplanner/blob/master/optaplanner-examples/src/main/java/org/optaplanner/examples/common/swingui/SolverAndPersistenceFrame.java#L232

      Note: no need to write to an XLS file and then read that - it can just open in the UI (and the user can then click on "save as" to get an xlsx version).

            mtalluzi@redhat.com Musa Talluzi (Inactive)
            gdesmet@redhat.com Geoffrey De Smet (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: