    importPackage(Packages.de.elo.ix.client);
    importPackage(Packages.de.elo.client.scripting.interfaces);
    importPackage(org.apache.commons.io);

    importClass(Packages.de.elo.client.scripting.constants.CONSTANTS);

    //@include lib_Class.js
    //@include lib_moment.js
    //@include lib_sol.common.Cache.js
    //@include lib_sol.common.Config.js
    //@include lib_sol.common.JsonUtils.js
    //@include lib_sol.common.SordUtils.js
    //@include lib_sol.common.StringUtils.js
    //@include lib_sol.common.DateUtils.js
    //@include lib_sol.common.IxUtils.js
    //@include lib_sol.common.AsyncUtils.js
    //@include lib_sol.common.RepoUtils.js
    //@include lib_sol.common.SordTypeUtils.js
    //@include lib_sol.common.WfUtils.js
    //@include lib_sol.common.FileUtils.js
    //@include lib_sol.common.HttpUtils.js
    //@include lib_sol.common.ZipUtils.js
    //@include lib_sol.common.ExecUtils.js
    //@include lib_sol.common.UserUtils.js
    //@include lib_sol.common.UserProfile.js
    //@include lib_sol.common.jc.CommonDialogs.js
    //@include lib_sol.dev.jc.GotoId.js
    //@include lib_sol.dev.jc.BuildPackages.js
    //@include lib_sol.dev.jc.Versions.js
    //@include lib_sol.dev.jc.ExecuteRf.js
    //@include lib_sol.dev.jc.DownloadBranches.js
    //@include lib_sol.dev.install.Installer.js

    sol.ns("sol.dev");
    sol.dev.extraTabNo = 99;
    sol.dev.extraTabName = "TAB_SOL_DEV";
    sol.dev.bandBaseNo = 10;

    /**
     * @class sol.dev.jc.Main
     * @singleton
     *
     * Contructs the JavaClient script.
     * Contains all necessary includes.
     *
     * # Registered buttons
     *
     * |Name|
     * |:------|
     * |Build setup package|
     * |Build debug setup package|
     * |Reload forms|
     * |Reload IX scripts|
     * |GotoId|
     * |Execute RF|
     * |Download Branches|
     * |Generate report|
     * |Validate report|
     *
     * @author ELO Digital Office GmbH
     *
     * @requires sol.common.JsonUtils
     * @requires sol.common.SordUtils
     * @requires sol.common.StringUtils
     * @requires sol.common.IxUtils
     * @requires sol.common.AsyncUtils
     * @requires sol.common.RepoUtils
     * @requires sol.common.WfUtils
     * @requires sol.common.FileUtils
     * @requires sol.common.ZipUtils
     * @requires sol.common.jc.CommonDialogs
     * @requires sol.dev.jc.GotoId
     * @requires sol.dev.jc.BuildPackages
     * @requires sol.dev.jc.Versions
     * @requires sol.dev.jc.ExecuteRf
     * @requires sol.dev.jc.DownloadBranches
     */

    /**
     * @member global.dev.JavaClientEvents
     * For ribbon extensions with the RibbonAdapter.
     * These can only be applied during this event. Ribbon extensions
     * cannot be taken into account later on.
     */
    function eloExpandRibbon() {
      var tab, bandNo, bandSetup, bandReload, bandTools, bandVersionsReport, btnBuildSetupPackage,
          btnTransportPackage, btnReloadForms, btnReloadIXScripts, btnGoToId, btnExecuteRF,
          btnDownloadBranches, btnGenerateReport, btnValidateReport;

      if (!workspace.userRights.hasAdminRight()) {
        return "";
      }

      tab = ribbon.addTab(sol.dev.extraTabNo, null, sol.dev.extraTabName);
      tab.setTitle("Development");

      bandNo = sol.dev.bandBaseNo;
      bandSetup = ribbon.addBand(tab.getId(), bandNo++, "bandSetup");

      bandSetup.setTitle("Setup");
      bandReload = ribbon.addBand(tab.getId(), bandNo++, "bandReload");
      bandReload.setTitle("Reload");
      bandTools = ribbon.addBand(tab.getId(), bandNo++, "bandTools");
      bandTools.setTitle("Tools");
      bandVersionsReport = ribbon.addBand(tab.getId(), bandNo++, "bandVersionsReport");
      bandVersionsReport.setTitle("Versions report");

      btnBuildSetupPackage = ribbon.addButton(tab.getId(), bandSetup.getId(), "btnBuildSetupPackage");
      btnBuildSetupPackage.title = "Build setup package";
      btnBuildSetupPackage.setIconName("ScriptButton650");
      btnBuildSetupPackage.setCallback(function () {
        buildSetupPackage();
      }, this);

      btnTransportPackage = ribbon.addButton(tab.getId(), bandSetup.getId(), "btnTransportPackage");
      btnTransportPackage.title = "Build transport package";
      btnTransportPackage.setIconName("ScriptButton651");
      btnTransportPackage.setCallback(function () {
        transportPackage();
      }, this);

      btnReloadForms = ribbon.addButton(tab.getId(), bandReload.getId(), "btnReloadForms");
      btnReloadForms.title = "Reload forms";
      btnReloadForms.setIconName("ScriptButton652");
      btnReloadForms.setCallback(function () {
        reloadForms();
      }, this);

      btnReloadIXScripts = ribbon.addButton(tab.getId(), bandReload.getId(), "btnReloadIXScripts");
      btnReloadIXScripts.title = "Reload IX scripts";
      btnReloadIXScripts.setIconName("ScriptButton653");
      btnReloadIXScripts.setCallback(function () {
        reloadIXScripts();
      }, this);

      btnGoToId = ribbon.addButton(tab.getId(), bandTools.getId(), "btnGoToId");
      btnGoToId.title = "GotoId";
      btnGoToId.setIconName("ScriptButton655");
      btnGoToId.setCallback(function () {
        goToId();
      }, this);

      btnExecuteRF = ribbon.addButton(tab.getId(), bandTools.getId(), "btnExecuteRF");
      btnExecuteRF.title = "Execute RF";
      btnExecuteRF.setIconName("ScriptButton656");
      btnExecuteRF.setCallback(function () {
        executeRF();
      }, this);

      btnDownloadBranches = ribbon.addButton(tab.getId(), bandTools.getId(), "btnDownloadBranches");
      btnDownloadBranches.title = "Download branches";
      btnDownloadBranches.setIconName("ScriptButton657");
      btnDownloadBranches.setCallback(function () {
        downloadBranches();
      }, this);

      btnGenerateReport = ribbon.addButton(tab.getId(), bandVersionsReport.getId(), "btnGenerateReport");
      btnGenerateReport.title = "Generate report";
      btnGenerateReport.setIconName("ScriptButton658");
      btnGenerateReport.setCallback(function () {
        generateReport();
      }, this);

      btnValidateReport = ribbon.addButton(tab.getId(), bandVersionsReport.getId(), "btnValidateReport");
      btnValidateReport.title = "Validate report";
      btnValidateReport.setIconName("ScriptButton659");
      btnValidateReport.setCallback(function () {
        validateReport();
      }, this);
    }

    function buildSetupPackage() {
      var packageBuilder = sol.create("sol.dev.jc.BuildPackages", {});
      packageBuilder.execute();
    }

    function transportPackage() {
      var packageBuilder = sol.create("sol.dev.jc.BuildPackages", { transport: true });
      packageBuilder.execute();
    }

    function reloadForms() {
      sol.common.HttpUtils.sendRequest({ url: "{{eloWfBaseUrl}}/wf/edit.jsp?reload=1&lang=en&ticket={{ticket}}", resolve: true });
      workspace.setFeedbackMessage("Forms reloaded");
    }

    function reloadIXScripts() {
      var connFact, conn, timeoutSeconds;

      timeoutSeconds = 300;

      connFact = sol.common.RepoUtils.createConnFact(ixConnect.connProperties, ixConnect.sessionOptions, {
        timeoutSeconds: timeoutSeconds
      });
      conn = connFact.createFromTicket(ixConnect.loginResult.clientInfo);
      conn.ix().reloadScripts();
      conn.close();
      connFact.done();

      workspace.setFeedbackMessage("IX scripts reloaded");
    }

    function goToId() {
      sol.dev.jc.GotoId.execute();
    }

    function executeRF() {
      sol.dev.jc.ExecuteRf.execute();
    }

    function downloadBranches() {
      sol.dev.jc.DownloadBranches.execute();
    }

    function generateReport() {
      sol.dev.jc.Versions.generateReport();
    }

    function validateReport() {
      sol.dev.jc.Versions.validateReport();
    }