Class ApplicationUtilities


  • public class ApplicationUtilities
    extends java.lang.Object
    Utility class for default application things.
    • Constructor Detail

      • ApplicationUtilities

        public ApplicationUtilities()
    • Method Detail

      • findDefaultApplicationRootDirs

        public static java.util.Collection<ResourceFile> findDefaultApplicationRootDirs()
        Searches for default application root directories.
        Returns:
        A collection of discovered application root directories (could be empty).
      • getDefaultUserTempDir

        public static java.io.File getDefaultUserTempDir​(ApplicationProperties applicationProperties)
                                                  throws java.io.FileNotFoundException
        Gets the default application's user temp directory.
        Parameters:
        applicationProperties - The application properties.
        Returns:
        The default application's user temp directory.
        Throws:
        java.io.FileNotFoundException - if the user temp directory could not be determined.
      • getDefaultUserCacheDir

        public static java.io.File getDefaultUserCacheDir​(ApplicationProperties applicationProperties)
                                                   throws java.io.FileNotFoundException
        Gets the default application's user cache directory.
        Parameters:
        applicationProperties - The application properties.
        Returns:
        The default application's user cache directory.
        Throws:
        java.io.FileNotFoundException - if the user cache directory could not be determined.
      • getDefaultUserSettingsDir

        public static java.io.File getDefaultUserSettingsDir​(ApplicationProperties applicationProperties,
                                                             ResourceFile installationDirectory)
                                                      throws java.io.FileNotFoundException
        Gets the default application's user settings directory.
        Parameters:
        applicationProperties - The application properties.
        installationDirectory - The application installation directory.
        Returns:
        The application's user settings directory.
        Throws:
        java.io.FileNotFoundException - if the user settings directory could not be determined.