Class Application.Environment

java.lang.Object
com.nomagic.magicdraw.core.Application.Environment
Enclosing class:
Application

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

    • Environment

      public Environment()
  • Method Details

    • getDataDirectory

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

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

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

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

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

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

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

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

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

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

      public File getTempDir(@CheckForNull 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.