Class ApplicationLayout

    • Field Detail

      • applicationRootDirs

        protected java.util.Collection<ResourceFile> applicationRootDirs
      • applicationInstallationDir

        protected ResourceFile applicationInstallationDir
      • modules

        protected java.util.Map<java.lang.String,​GModule> modules
      • userTempDir

        protected java.io.File userTempDir
      • userCacheDir

        protected java.io.File userCacheDir
      • userSettingsDir

        protected java.io.File userSettingsDir
      • extensionArchiveDir

        protected ResourceFile extensionArchiveDir
      • extensionInstallationDirs

        protected java.util.List<ResourceFile> extensionInstallationDirs
    • Constructor Detail

      • ApplicationLayout

        public ApplicationLayout()
    • Method Detail

      • getApplicationProperties

        public final ApplicationProperties getApplicationProperties()
        Gets the application properties from the application layout
        Returns:
        The application properties. Should never be null.
      • getApplicationRootDirs

        public final java.util.Collection<ResourceFile> getApplicationRootDirs()
        Gets the application root directories from the application layout.
        Returns:
        A collection of application root directories (or null if not set).
      • getApplicationInstallationDir

        public final ResourceFile getApplicationInstallationDir()
        Gets the application installation directory from the application layout.
        Returns:
        The application installation directory (or null if not set).
      • getModules

        public final java.util.Map<java.lang.String,​GModule> getModules()
        Gets the application's modules from the application layout.
        Returns:
        The application's modules as a map (mapping module name to module for convenience).
      • getUserTempDir

        public final java.io.File getUserTempDir()
        Gets the user temp directory from the application layout.
        Returns:
        The user temp directory (or null if not set).
      • getUserCacheDir

        public final java.io.File getUserCacheDir()
        Gets the user cache directory from the application layout.
        Returns:
        The user cache directory (or null if not set).
      • getUserSettingsDir

        public final java.io.File getUserSettingsDir()
        Gets the user settings directory from the application layout.
        Returns:
        The user settings directory (or null if not set).
      • getExtensionArchiveDir

        public final ResourceFile getExtensionArchiveDir()
        Returns the directory where archived application Extensions are stored.
        Returns:
        the application Extensions archive directory. Could be null if the ApplicationLayout does not support application Extensions.
      • getExtensionInstallationDirs

        public final java.util.List<ResourceFile> getExtensionInstallationDirs()
        Returns an ordered list of the application Extensions installation directories.
        Returns:
        an ordered list of the application Extensions installation directories. Could be empty if the ApplicationLayout does not support application Extensions.
      • getPatchDir

        public final ResourceFile getPatchDir()
        Returns the location of the application patch directory. The patch directory can be used to modify existing code within a distribution.
        Returns:
        the patch directory; may be null
      • createUserDirs

        public final void createUserDirs()
                                  throws java.io.IOException
        Creates the application's user directories (or ensures they already exist).
        Throws:
        java.io.IOException - if there was a problem creating the application's user directories.
      • inSingleJarMode

        public boolean inSingleJarMode()
        Checks whether or not the application is using a "single jar" layout. Custom application layouts that extend this class can override this method once they determine they are in single jar mode.
        Returns:
        true if the application is using a "single jar" layout; otherwise, false.