com.google.appengine.api.utils

## Class SystemProperty

- java.lang.Object
- - com.google.appengine.api.utils.SystemProperty

- Direct Known Subclasses:
    SystemProperty.Environment

      public class SystemProperty
      extends java.lang.Object

  Global system properties which are set by App Engine.

  Example code:

       if (SystemProperty.environment.value() == SystemProperty.Environment.Value.Production) {
         // do something that's production-only
       }
       String version = SystemProperty.version.get();

- - ### Nested Class Summary

    Nested Classes
    Modifier and Type | Class and Description
    --- | ---
    `static class` | `SystemProperty.Environment` The current executing environment.

  - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static SystemProperty` | `applicationId` The application identifier for the current application.
    `static SystemProperty` | `applicationVersion` The version identifier for the current application version.
    `static SystemProperty.Environment` | `environment` The current executing environment.
    `static SystemProperty` | `instanceReplicaId` Deprecated. Use `com.google.appengine.api.servers.ServerService#getCurrentInstance()`
    `static SystemProperty` | `version` The current executing runtime version.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `java.lang.String` | `get()` Gets the value of the system property.
    `java.lang.String` | `key()` The key for the system property.
    `void` | `set(java.lang.String value)` Sets the value of the system property.

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

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

- - ### Field Detail

    - #### environment

          public static final SystemProperty.Environment environment

      The current executing environment. Has the key, `"com.google.appengine.runtime.environment"`. Has the values `"Production"` and `"Development"`.

    - #### version

          public static final SystemProperty version

      The current executing runtime version. Has the key, `"com.google.appengine.runtime.version"`. A Version value is composed of period-separated integers, for example, "1.2.8".

    - #### applicationId

          public static final SystemProperty applicationId

      The application identifier for the current application. Has the key, `"com.google.appengine.application.id"`.

    - #### applicationVersion

          public static final SystemProperty applicationVersion

      The version identifier for the current application version. Result is of the form <major>.<minor> where <major> is the version name supplied at deploy time and <minor> is a timestamp value maintained by App Engine. Has the key `"com.google.appengine.application.version"`.

    - #### instanceReplicaId

          @Deprecated
          public static final SystemProperty instanceReplicaId

      Deprecated. Use `com.google.appengine.api.servers.ServerService#getCurrentInstance()`

  - ### Method Detail

    - #### key

          public java.lang.String key()

      The key for the system property.

    - #### get

          public java.lang.String get()

      Gets the value of the system property. Equivalent to `System.getProperty(key())`.

    - #### set

          public void set(java.lang.String value)

      Sets the value of the system property. Equivalent to `System.setProperty(key(), value)`.