Class Application.Environment

  • Enclosing class:
    Application

    @OpenApiAll
    public static class Application.Environment
    extends java.lang.Object
    Contains application environment specific constants and utility methods.
    • Constructor Summary

      Constructors 
      Constructor Description
      Environment()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getConfigDir()
      Returns directory where configuration files for each user are stored.
      java.lang.String getDataDirectory()
      Returns install root directory + data folder.
      java.io.File getDefaultsDataDirectory()
      Directory in installation root where defaults are saved (custom diagrams, user modes etc).
      java.lang.String getExamplesDirectory()
      Gets directory of examples.
      java.lang.String getInstallRoot()
      Gets application installation root.
      java.lang.String getProfilesDirectory()
      Gets directory of profiles.
      java.lang.String getResourceDirectory()
      Returns directory of resources.
      java.io.File getTempDir​(java.lang.String path)
      Gets a temp directory which is unique for this application instance.
      java.lang.String getTemplatesDirectory()
      Returns install root directory + templates folder.
      java.io.File getUserDataDirectory()
      Directory in user home where config files are saved (custom diagrams, user modes etc).
      java.lang.String getUserHomeDirectory()
      Returns user home directory.
      • Methods inherited from class java.lang.Object

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

      • Environment

        public Environment()
    • Method Detail

      • getDataDirectory

        public java.lang.String getDataDirectory()
        Returns install root directory + data folder.
        Returns:
        the data folder.
      • getInstallRoot

        public java.lang.String getInstallRoot()
        Gets application installation root.
        Returns:
        application installation root.
      • getConfigDir

        public java.lang.String getConfigDir()
        Returns directory where configuration files for each user are stored. Creates config dirs if missing.
        Returns:
        path to configuration directory.
      • getTemplatesDirectory

        public java.lang.String getTemplatesDirectory()
        Returns install root directory + templates folder.
        Returns:
        templates directory.
      • getUserHomeDirectory

        public java.lang.String getUserHomeDirectory()
        Returns user home directory.
        Returns:
        user home directory.
      • getExamplesDirectory

        public java.lang.String getExamplesDirectory()
        Gets directory of examples.
        Returns:
        examples directory.
      • getProfilesDirectory

        public java.lang.String getProfilesDirectory()
        Gets directory of profiles.
        Returns:
        profiles directory.
      • getResourceDirectory

        public java.lang.String getResourceDirectory()
        Returns directory of resources.
        Returns:
        resources directory.
      • getDefaultsDataDirectory

        public java.io.File getDefaultsDataDirectory()
        Directory in installation root where defaults are saved (custom diagrams, user modes etc).
        Returns:
        defaults data directory.
      • getUserDataDirectory

        public java.io.File getUserDataDirectory()
        Directory in user home where config files are saved (custom diagrams, user modes etc).
        Returns:
        user data directory.
      • getTempDir

        public java.io.File getTempDir​(@CheckForNull
                                       java.lang.String path)
        Gets a temp directory which is unique for this application instance.
        Parameters:
        path - path in the temp folder. Returns temp folder root if path is empty.
        Returns:
        application unique temporary folder.