Class Env

java.lang.Object
glair.vision.util.Env

public class Env extends Object
The `Env` class provides access to configuration properties loaded from a file. It allows retrieving specific properties such as usernames, passwords, API keys, and various document-related values.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Env()
    Constructs an `Env` instance and loads configuration properties from the default file.
    Env(String propertiesPath, boolean debug)
    Constructs an `Env` instance with the option to print the absolute path of the properties file.
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves the api key from the configuration properties.
    Retrieves the BPKB image path from the configuration properties.
    Retrieves the Face image path from the configuration properties.
    Retrieves the General Document image path from the configuration properties.
    Retrieves the Identity verification data from the configuration properties.
    Retrieves the Identity face image path from the configuration properties.
    Retrieves the Invoice image path from the configuration properties.
    Retrieves the KK image path from the configuration properties.
    Retrieves the KTP image path from the configuration properties.
    Retrieves the License Plate image path from the configuration properties.
    Retrieves the NPWP image path from the configuration properties.
    Retrieves the Passport image path from the configuration properties.
    Retrieves the password from the configuration properties.
    Retrieves the Receipt image path from the configuration properties.
    Retrieves the STNK image path from the configuration properties.
    Retrieves the username from the configuration properties.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • Env

      public Env() throws Exception
      Constructs an `Env` instance and loads configuration properties from the default file.
      Throws:
      Exception - If an error occurs while loading the properties file.
    • Env

      public Env(String propertiesPath, boolean debug) throws Exception
      Constructs an `Env` instance with the option to print the absolute path of the properties file.
      Parameters:
      propertiesPath - Set the file path of the properties file.
      debug - Set to `true` to print the absolute path of the properties file.
      Throws:
      Exception - If an error occurs while loading the properties file.
  • Method Details

    • getUsername

      public String getUsername()
      Retrieves the username from the configuration properties.
      Returns:
      The username.
    • getPassword

      public String getPassword()
      Retrieves the password from the configuration properties.
      Returns:
      The password.
    • getApiKey

      public String getApiKey()
      Retrieves the api key from the configuration properties.
      Returns:
      The api key.
    • getKtp

      public String getKtp()
      Retrieves the KTP image path from the configuration properties.
      Returns:
      The KTP image path.
    • getNpwp

      public String getNpwp()
      Retrieves the NPWP image path from the configuration properties.
      Returns:
      The NPWP image path.
    • getKk

      public String getKk()
      Retrieves the KK image path from the configuration properties.
      Returns:
      The KK image path.
    • getStnk

      public String getStnk()
      Retrieves the STNK image path from the configuration properties.
      Returns:
      The STNK image path.
    • getBpkb

      public String getBpkb()
      Retrieves the BPKB image path from the configuration properties.
      Returns:
      The BPKB image path.
    • getPassport

      public String getPassport()
      Retrieves the Passport image path from the configuration properties.
      Returns:
      The Passport image path.
    • getLicensePlate

      public String getLicensePlate()
      Retrieves the License Plate image path from the configuration properties.
      Returns:
      The License Plate image path.
    • getGeneralDocument

      public String getGeneralDocument()
      Retrieves the General Document image path from the configuration properties.
      Returns:
      The General Document image path.
    • getInvoice

      public String getInvoice()
      Retrieves the Invoice image path from the configuration properties.
      Returns:
      The Invoice image path.
    • getReceipt

      public String getReceipt()
      Retrieves the Receipt image path from the configuration properties.
      Returns:
      The Receipt image path.
    • getIdentityBasicVerification

      public String getIdentityBasicVerification()
      Retrieves the Identity verification data from the configuration properties.
      Returns:
      The Identity verification data.
    • getIdentityFaceVerification

      public String getIdentityFaceVerification()
      Retrieves the Identity face image path from the configuration properties.
      Returns:
      The Identity face image path.
    • getFace

      public String getFace()
      Retrieves the Face image path from the configuration properties.
      Returns:
      The Face image path.