Package com.jsql.util

Class GitUtil

java.lang.Object
com.jsql.util.GitUtil

public class GitUtil extends Object
Utility class used to connect to GitHub Rest webservices. It uses jsql-robot profile to post data to GitHub.
  • Constructor Details

  • Method Details

    • checkUpdate

      public void checkUpdate(GitUtil.ShowOnConsole displayUpdateMessage)
      Verify if application is up-to-date against the version on GitHub.
      Parameters:
      displayUpdateMessage - YES for manual update verification, hidden otherwise
    • sendUnhandledException

      public void sendUnhandledException(String threadName, Throwable throwable)
      Define the body of an issue to send to GitHub for an unhandled exception. It adds different system data to the body and remove sensible data like injection URL.
      Parameters:
      threadName - name of thread where the exception occurred
      throwable - unhandled exception to report to GitHub
    • sendReport

      public void sendReport(String reportBody, GitUtil.ShowOnConsole showOnConsole, String reportTitle)
      Connect to GitHub webservices and create an Issue on the repository. Used by translation protocol, unhandled exception detection and manual Issue reporting.
      Parameters:
      reportBody - text of the Issue
      showOnConsole - in case of manual Issue reporting. Hidden in case of automatic reporting of unhandled exception.
      reportTitle - title of the Issue
    • showNews

      public void showNews()
      Displays news information on the console from GitHub web service. Infos concern the general roadmap for the application, current development status and other useful statements for the community.
    • getJSONObject

      public org.json.JSONObject getJSONObject()
      Instantiate the jsonObject from json data if not already set.
      Returns:
      jsonObject describing json data