Package utility.application
Class ApplicationUtilities
- java.lang.Object
-
- utility.application.ApplicationUtilities
-
public class ApplicationUtilities extends java.lang.Object
Utility class for default application things.
-
-
Constructor Summary
Constructors Constructor Description ApplicationUtilities()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.util.Collection<ResourceFile>
findDefaultApplicationRootDirs()
Searches for default application root directories.static java.io.File
getDefaultUserCacheDir(ApplicationProperties applicationProperties)
Gets the default application's user cache directory.static java.io.File
getDefaultUserSettingsDir(ApplicationProperties applicationProperties, ResourceFile installationDirectory)
Gets the default application's user settings directory.static java.io.File
getDefaultUserTempDir(ApplicationProperties applicationProperties)
Gets the default application's user temp directory.
-
-
-
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.
-
-