src/de/geofroggerfx/model/CacheList.java
public class CacheList {

  private String name;

  private List<Cache> caches = new ArrayList<>();

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public List<Cache> getCaches() {
    return caches;
  }

  public void setCaches(List<Cache> caches) {
    this.caches = caches;
  }

  public void addCache(Cache cache) {
    if (!getCaches().contains(cache)) {
      getCaches().add(cache);
    }
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    CacheList cacheList = (CacheList) o;

    if (!name.equals(cacheList.name)) return false;

    return true;
  }

  @Override
  public int hashCode() {
    return name.hashCode();
  }

  @Override
  public String toString() {
    return getName();
  }
}
src/de/geofroggerfx/application/ProgressEvent.java
public class ProgressEvent {

  public enum State {INITIALIZED, STARTED, RUNNING, FINISHED}

  ;
  public static final double INDETERMINATE_PROGRESS = -1.0;

  private final String module;
  private final State state;
  private final String message;
  private final Double progress;

  public ProgressEvent(String module, State state, String message) {
    this(module, state, message, INDETERMINATE_PROGRESS);
  }

  public ProgressEvent(String module, State state, String message, Double progress) {
    this.module = module;
    this.state = state;
    this.message = message;
    this.progress = progress;
  }

  public String getModule() {
    return module;
  }

  public State getState() {
    return state;
  }

  public String getMessage() {
    return message;
  }

  public Double getProgress() {
    return progress;
  }
}
src/de/geofroggerfx/application/SessionConstants.java
public static final String CACHE_LISTS = "cache-lists";
src/de/geofroggerfx/model/Cache.java
public class Cache {

  private Long id;
  private boolean available;
  private boolean archived;
  private boolean found;
  private String name;
  private String placedBy;
  @OneToOne(orphanRemoval = true)
  private User owner;
  private Type type;
  private String container;
  private List<Attribute> attributes;
  private String difficulty;
  private String terrain;
  private String country;
  private String state;
  private String shortDescription;
  private boolean shortDescriptionHtml;
  private String longDescription;
  private boolean longDescriptionHtml;
  private String encodedHints;
  @OneToMany(orphanRemoval = true)
  private List<Log> logs;
  @OneToMany(orphanRemoval = true)
  private List<TravelBug> travelBugs;
  @OneToOne(orphanRemoval = true)
  private Waypoint mainWayPoint;

  public Waypoint getMainWayPoint() {
    return mainWayPoint;
  }

  public void setMainWayPoint(Waypoint mainWayPoint) {
    this.mainWayPoint = mainWayPoint;
  }

  public Long getId() {
    return id;
  }

  public void setId(Long id) {
    this.id = id;
  }

  public boolean isAvailable() {
    return available;
  }

  public void setAvailable(boolean available) {
    this.available = available;
  }

  public boolean isArchived() {
    return archived;
  }

  public void setArchived(boolean archived) {
    this.archived = archived;
  }

  public String getName() {
    return name;
  }

  public void setName(String name) {
    this.name = name;
  }

  public String getPlacedBy() {
    return placedBy;
  }

  public void setPlacedBy(String placedBy) {
    this.placedBy = placedBy;
  }

  public User getOwner() {
    return owner;
  }

  public void setOwner(User owner) {
    this.owner = owner;
  }

  public Type getType() {
    return type;
  }

  public void setType(Type type) {
    this.type = type;
  }

  public String getContainer() {
    return container;
  }

  public void setContainer(String container) {
    this.container = container;
  }

  public List<Attribute> getAttributes() {
    return attributes;
  }

  public void setAttributes(List<Attribute> attributes) {
    this.attributes = attributes;
  }

  public String getDifficulty() {
    return difficulty;
  }

  public void setDifficulty(String difficulty) {
    this.difficulty = difficulty;
  }

  public String getTerrain() {
    return terrain;
  }

  public void setTerrain(String terrain) {
    this.terrain = terrain;
  }

  public String getCountry() {
    return country;
  }

  public void setCountry(String country) {
    this.country = country;
  }

  public String getState() {
    return state;
  }

  public void setState(String state) {
    this.state = state;
  }

  public String getShortDescription() {
    return shortDescription;
  }

  public void setShortDescription(String shortDescription) {
    this.shortDescription = shortDescription;
  }

  public boolean isShortDescriptionHtml() {
    return shortDescriptionHtml;
  }

  public void setShortDescriptionHtml(boolean shortDescriptionHtml) {
    this.shortDescriptionHtml = shortDescriptionHtml;
  }

  public String getLongDescription() {
    return longDescription;
  }

  public void setLongDescription(String longDescription) {
    this.longDescription = longDescription;
  }

  public boolean isLongDescriptionHtml() {
    return longDescriptionHtml;
  }

  public void setLongDescriptionHtml(boolean longDescriptionHtml) {
    this.longDescriptionHtml = longDescriptionHtml;
  }

  public String getEncodedHints() {
    return encodedHints;
  }

  public void setEncodedHints(String encodedHints) {
    this.encodedHints = encodedHints;
  }

  public List<Log> getLogs() {
    return logs;
  }

  public void setLogs(List<Log> logs) {
    this.logs = logs;
  }

  public List<TravelBug> getTravelBugs() {
    return travelBugs;
  }

  public void setTravelBugs(List<TravelBug> travelBugs) {
    this.travelBugs = travelBugs;
  }

  public boolean isFound() {
    return found;
  }

  public void setFound(final boolean found) {
    this.found = found;
  }

  @Override
  public boolean equals(Object o) {
    if (this == o) return true;
    if (o == null || getClass() != o.getClass()) return false;

    Cache cache = (Cache) o;

    if (id != null ? !id.equals(cache.id) : cache.id != null) return false;

    return true;
  }

  @Override
  public int hashCode() {
    return id != null ? id.hashCode() : 0;
  }

  @Override
  public String toString() {
    return "Cache{"
        + "name='" + name + '\''
        + '}';
  }
}
src/de/geofroggerfx/service/CacheService.java
public interface CacheService {

  /**
   * Store the whole list of caches
   * @param caches list of caches
   */
  void storeCaches(List<Cache> caches);

  /**
   * find a single cache by id
   * @param id id of the cache
   * @return single cache
   */
  Cache findCacheById(Long id);

  /**
   * Receive all caches from the database
   * @param sortField sort the list based on the field
   * @param direction sort direction (ASC/DESC)
   * @return sorted list of caches
   */
  List<Cache> getAllCaches(CacheSortField sortField, SortDirection direction);

  /**
   * Add a ProgressListener to inform about loading/storing progress.
   * @param listener progress listener
   */
  void addListener(ProgressListener listener);

  /**
   * Receive all cache lists
   * @return list of available cachelists
   */
  List<CacheList> getAllCacheLists();

  /**
   * Test if a cache list with the given name already exists
   * @param name of the cache list
   * @return true if a list with the given name exists
   */
  boolean doesCacheListNameExist(String name);

  /**
   * Stores a cache list
   * @param list list of caches
   */
  void storeCacheList(CacheList list);

  /**
   * Deletes a cache list
   * @param cacheList deletes the given cache list
   */
  void deleteCacheList(CacheList cacheList);
}
src/de/geofroggerfx/gpx/GPXReader.java
public interface GPXReader {
  List<Cache> load(final String fileName) throws IOException;

  void addListener(ProgressListener listener);
}
src/de/geofroggerfx/application/SessionConstants.java
public static final String CACHE_LIST = "cache-list";
src/de/geofroggerfx/plugins/PluginService.java
public interface PluginService {

    List<Plugin> getAllPlugins();

    void executePlugin(Plugin plugin);


}
src/de/geofroggerfx/application/SessionConstants.java
public class SessionConstants {
  public static final String CURRENT_CACHE = "current-cache";
  public static final String CACHE_LIST = "cache-list";
  public static final String CACHE_LISTS = "cache-lists";
}
src/de/geofroggerfx/plugins/Plugin.java
public interface Plugin {

    /**
     * @return name
     */
    String getName();

    /**
     * @return version
     */
    String getVersion();

    /**
     * Run the main method of the plugin. All the logic is done in this method.
     * Every run method will get a context map, with all the services inside,
     * to use them.
     *
     * @param context services and data
     */
    void run(Map context);

}
src/de/geofroggerfx/application/SessionContext.java
@Singleton
public class SessionContext {

  private final Map<String, Object> map = new ConcurrentHashMap<>();
  private final Map<String, List<SessionContextListener>> sessionListeners = new HashMap<>();

  public void setData(String key, Object value) {
    if (value == null && map.containsKey(key)) {
      map.remove(key);
    } else if (value != null) {
      map.put(key, value);
    }
    fireSessionEvent(key);
  }

  public Object getData(String key) {
    if (map.containsKey(key)) {
      return map.get(key);
    } else {
      return null;
    }
  }

  public void addListener(String key, SessionContextListener sessionListener) {

    List<SessionContextListener> listenerList;
    if (sessionListeners.containsKey(key)) {
      listenerList = sessionListeners.get(key);
    } else {
      listenerList = new ArrayList<>();
      sessionListeners.put(key, listenerList);
    }

    if (!listenerList.contains(sessionListener)) {
      listenerList.add(sessionListener);
    }
  }

  private void fireSessionEvent(String key) {
    if (sessionListeners.containsKey(key)) {
      sessionListeners.
          get(key).
          stream().
          forEach(SessionContextListener::sessionContextChanged);
    }
  }
}


Question: import de.geofroggerfx.application.ProgressEvent;
import de.geofroggerfx.application.SessionConstants;
import de.geofroggerfx.application.SessionContext;
import de.geofroggerfx.gpx.GPXReader;
import de.geofroggerfx.model.Cache;
import de.geofroggerfx.model.CacheList;
import de.geofroggerfx.plugins.Plugin;
import de.geofroggerfx.plugins.PluginService;
import de.geofroggerfx.service.CacheService;
import javafx.application.Platform;
import javafx.beans.property.ObjectProperty;
import javafx.beans.property.SimpleObjectProperty;
import javafx.concurrent.Service;
import javafx.concurrent.Task;
import javafx.event.ActionEvent;
import javafx.fxml.FXML;
import javafx.fxml.Initializable;
import javafx.scene.control.*;
import javafx.scene.layout.BorderPane;
import javafx.stage.FileChooser;
import org.controlsfx.dialog.Dialog;
import org.controlsfx.dialog.Dialogs;
import org.scenicview.ScenicView;
import javax.inject.Inject;
import java.io.File;
import java.io.IOException;
import java.net.URL;
import java.util.List;
import java.util.Optional;
import java.util.ResourceBundle;
import java.util.logging.Level;
import java.util.logging.Logger;
import static de.geofroggerfx.application.SessionConstants.CACHE_LIST;
import static de.geofroggerfx.application.SessionConstants.CACHE_LISTS;
import static de.geofroggerfx.service.CacheSortField.NAME;
import static de.geofroggerfx.service.SortDirection.ASC;
import static java.util.logging.Level.SEVERE;
/*
 * Copyright (c) 2013, Andreas Billmann <abi@geofroggerfx.de>
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * * Redistributions of source code must retain the above copyright notice, this
 *   list of conditions and the following disclaimer.
 * * Redistributions in binary form must reproduce the above copyright notice,
 *   this list of conditions and the following disclaimer in the documentation
 *   and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */
package de.geofroggerfx.fx.geofrogger;




/**
 * FXML Controller class
 *
 * @author Andreas
 */
public class GeofroggerController implements Initializable {

  private static final String LICENSE = "/*\n" +
      " * Copyright (c) 2013-2014, Andreas Billmann <abi@geofroggerfx.de>\n" +
      " * All rights reserved.\n" +
      " *\n" +
      " * Redistribution and use in source and binary forms, with or without\n" +
      " * modification, are permitted provided that the following conditions are met:\n" +
      " *\n" +
      " * * Redistributions of source code must retain the above copyright notice, this\n" +
      " *   list of conditions and the following disclaimer.\n" +
      " * * Redistributions in binary form must reproduce the above copyright notice,\n" +
      " *   this list of conditions and the following disclaimer in the documentation\n" +
      " *   and/or other materials provided with the distribution.\n" +
      " *\n" +
      " * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\n" +
      " * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\n" +
      " * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE\n" +
      " * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE\n" +
      " * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR\n" +
      " * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF\n" +
      " * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS\n" +
      " * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN\n" +
      " * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)\n" +
      " * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\n" +
      " * POSSIBILITY OF SUCH DAMAGE.\n" +
      " */";

  private static final String MASTHEAD_TEXT = "GeoFroggerFX by Andreas Billmann <abi@geofroggerfx.de>";
  private static final String ABOUT_TEXT = "Used libs:\n"
      + "\t- JFXtras 8.0 r1\n"
      + "\t- ControlsFX 8.0.6\n"
      + "\t- jdom 2.x\n"
      + "\t- H2 1.3.173\n"
      + "\t- Icons by http://iconmonstr.com/\n";

  @Inject
  private SessionContext sessionContext;
  private final LoadCachesFromFileService loadService = new LoadCachesFromFileService();
  private final LoadCachesFromDatabaseService loadFromDBService = new LoadCachesFromDatabaseService();
  private final LoadCacheListsFromDatabaseService loadListsFromDBService = new LoadCacheListsFromDatabaseService();
  private ResourceBundle resourceBundle;

  @Inject
  private GPXReader gpxReader;

  @Inject
  private CacheService cacheService;

  @Inject
  private PluginService pluginService;

  @FXML
  private Label leftStatus;

  @FXML
  private ProgressBar progress;

  @FXML
  private Menu pluginsMenu;

  @FXML
  private BorderPane mainPane;

  @FXML
  private SplitPane contentPane;


  /**
   * Initializes the controller class.
   *
   * @param url
   * @param rb
   */
  @Override
  public void initialize(URL url, ResourceBundle rb) {

    resourceBundle = rb;

    List<Plugin> plugins = pluginService.getAllPlugins();
    for (Plugin plugin: plugins) {
      MenuItem menuItem = new MenuItem(plugin.getName()+" ("+plugin.getVersion()+")");
      menuItem.setOnAction(actionEvent -> pluginService.executePlugin(plugin));
      pluginsMenu.getItems().add(menuItem);
    }

    gpxReader.addListener((ProgressEvent event) -> updateStatus(event.getMessage(), event.getProgress()));
    cacheService.addListener((ProgressEvent event) -> updateStatus(event.getMessage(), event.getProgress()));
    loadListsFromDBService.start();
    loadFromDBService.start();
  }

  @FXML
  public void importGpx(ActionEvent actionEvent) {
    final FileChooser fileChooser = new FileChooser();

    //Set extension filter
    final FileChooser.ExtensionFilter extFilter = new FileChooser.ExtensionFilter("GPX files (*.gpx)", "*.gpx");
    fileChooser.getExtensionFilters().add(extFilter);

    //Show open file dialog
    final File file = fileChooser.showOpenDialog(null);
    loadService.setFile(file);
    loadService.restart();
  }

  @FXML
  public void showAboutDialog(ActionEvent actionEvent) {
    Dialog dialog = new Dialog(null, resourceBundle.getString("dialog.title.about"));
    dialog.setMasthead(MASTHEAD_TEXT);
    dialog.setContent(ABOUT_TEXT);
    dialog.setExpandableContent(new TextArea(LICENSE));
    dialog.show();
  }

  @FXML
  public void showSettings(ActionEvent actionEvent) {
//    mainPane.setCenter();

//    FXMLLoader.load()
  }

  @FXML
  public void newList(ActionEvent actionEvent) {
    final Optional<String> listNameOption = Dialogs.
        create().
        title(resourceBundle.getString("dialog.title.new_list")).
        message(resourceBundle.getString("dialog.label.listname")).
        showTextInput();
    if (hasValue(listNameOption)) {
      final String listName = listNameOption.get().trim();
      if (cacheService.doesCacheListNameExist(listName)) {
        Dialogs.
            create().
            message(resourceBundle.getString("dialog.msg.list.does.exist")).
            showError();
      } else {
Answer:         CacheList list = new CacheList();