Class PropertyFileManager

java.lang.Object
com.shaft.properties.internal.PropertyFileManager

public final class PropertyFileManager extends Object
Utility class for loading property files and resolving Appium desired capabilities. Handles discovery of custom and default property files, and maps mobile-prefixed properties into MutableCapabilities for Appium sessions.
  • Method Details

    • getAppiumDesiredCapabilities

      public static Map<String,String> getAppiumDesiredCapabilities()
    • getCustomWebDriverDesiredCapabilities

      public static org.openqa.selenium.MutableCapabilities getCustomWebDriverDesiredCapabilities()
    • getLog4jConfigPath

      public static String getLog4jConfigPath()
      Resolves the Log4j2 configuration path, preferring the copied/custom properties file and falling back to the bundled default file when the custom file has not been created yet.
      Returns:
      the Log4j2 configuration file path to use during logger initialization
    • resolveBundledDefaultPropertiesFolderPath

      public static String resolveBundledDefaultPropertiesFolderPath()
      Resolves the bundled default properties folder from the runtime classpath.
      Returns:
      an absolute filesystem path when running from compiled classes, a jar URL for external runs, or the module-relative default folder when the resource is absent
    • resolveCustomPropertiesTemplatePath

      public static String resolveCustomPropertiesTemplatePath()
      Resolves the bundled custom.properties template used during engine bootstrap.
      Returns:
      the preferred on-disk template path when present, otherwise the classpath location
    • resolveClasspathResourceLocation

      public static String resolveClasspathResourceLocation(URL resourceUrl)
      Converts a classpath resource URL into a filesystem or jar location string.
      Parameters:
      resourceUrl - classpath resource URL
      Returns:
      resolved location suitable for FileActions copy helpers
    • getLogFilePath

      public static String getLogFilePath()
      Resolves the effective Log4j file-appender path using the typed Log4j properties.
      Returns:
      the effective log file path for retry diagnostics and full-log attachments
    • getCustomBrowserstackCapabilities

      public static HashMap<String,Object> getCustomBrowserstackCapabilities()
    • readCustomPropertyFiles

      public static void readCustomPropertyFiles()