java.lang.Object
org.noise_planet.noisemodelling.webserver.utilities.PgPassUtilities

public class PgPassUtilities extends Object
Utility class to handle PostgreSQL .pgpass file. See PostGIS help
  • Field Details

  • Constructor Details

    • PgPassUtilities

      public PgPassUtilities()
  • Method Details

    • getCredentials

      public static PgPassUtilities.PgPassEntry getCredentials(File pgPassFile, String hostname, String port, String database, String username)
      Fetch credentials from a specific file. See PostGIS help page
      Parameters:
      pgPassFile - The file to read
      hostname - Hostname to match
      database - Database name to match
      Returns:
      PgPassEntry if found, null otherwise
    • getPgPassFile

      public static File getPgPassFile()
      Returns the .pgpass file path.
      Returns:
      File containing the PostGIS database credentials