de.vc.jfo.env

## Class Environment

- java.lang.Object
- - de.vc.jfo.env.Environment

-     public class Environment
      extends java.lang.Object

  This class provides information about the environment of JFO.

- - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `static java.net.URL` | `findFile(java.lang.String path)` Finds a file relative to current working directory or classpath.
    `static java.net.URL` | `findFile(java.lang.String path, java.lang.String systemProperty, boolean updateProperty)` Finds a file thats location might be stored in a system property.
    `static java.net.URL` | `findFile(java.lang.String file, java.net.URL baseFile)` Finds a file thats location might be relative to directory of another file.
    `java.lang.String` | `getFullVersionText()` Gets a long version text containing version number and release date.
    `java.lang.String` | `getReleaseDateAsString()` Gets the release date of JFO.
    `java.lang.String` | `getVersion()` Gets the current version of JFO.
    `static Environment` | `instance()`
    `boolean` | `isLicensed()` Returns true, if this copy is licensed.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Method Detail

    - #### instance

          public static Environment instance()

    - #### getVersion

          public java.lang.String getVersion()

      Gets the current version of JFO.
      Returns:
        String

    - #### getReleaseDateAsString

          public java.lang.String getReleaseDateAsString()

      Gets the release date of JFO.
      Returns:
        String

    - #### isLicensed

          public boolean isLicensed()

      Returns true, if this copy is licensed.
      Returns:
        boolean

    - #### getFullVersionText

          public java.lang.String getFullVersionText()

      Gets a long version text containing version number and release date.
      Returns:
        String

    - #### findFile

          public static java.net.URL findFile(java.lang.String path)

      Finds a file relative to current working directory or classpath. Locations of files are checked in the following order:
      1. path is relative to working directory
      2. path is an URL
      3. path points to file in classpath
      4. path points to file in classpath relative to Environment.class
      Parameters:
        `path` - Path of file.
      Returns:
        URL of file or null if not found.

    - #### findFile

          public static java.net.URL findFile(java.lang.String path,
                              java.lang.String systemProperty,
                              boolean updateProperty)

      Finds a file thats location might be stored in a system property.
      Parameters:
        `path` - URL or relative path to working directory or classpath.
        `systemProperty` - Key of system property.
        `updateProperty` - Update system property.
      Returns:
        URL of file or null if not found.

    - #### findFile

          public static java.net.URL findFile(java.lang.String file,
                              java.net.URL baseFile)

      Finds a file thats location might be relative to directory of another file. If a configuration for example file references to another file, the location of the referenced file can be relative to the configuration file. The configuration file is the `baseFile`.
      Parameters:
        `file` - URL or relative path to working directory or classpath.
        `baseFile` - URL
      Returns:
        URL of file or null if not found.

© 2003-2011 by Sascha Schmidt (vision-cloud.de). All Rights Reserved.