Enum Class ApplicationMode

java.lang.Object
java.lang.Enum<ApplicationMode>
com.atlassian.bitbucket.server.ApplicationMode
All Implemented Interfaces:
Serializable, Comparable<ApplicationMode>, Constable

public enum ApplicationMode extends Enum<ApplicationMode>
Identifies what mode the application is in. Currently there are only two modes: the default mode which causes the product to behave like a general-purpose code hosting platform and the mirror mode which causes the product to behave like a code mirror for projects and repositories hosted in another server.
Since:
4.1
  • Enum Constant Details

    • DEFAULT

      public static final ApplicationMode DEFAULT
      Signifies the application should behave in the default mode - a general-purpose code hosting platform
    • MIRROR

      public static final ApplicationMode MIRROR
      Signifies the application should behave like a code mirror for projects and repositories hosted in another server
  • Method Details

    • values

      public static ApplicationMode[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static ApplicationMode valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • getId

      @Nonnull public String getId()
    • fromId

      public static Optional<ApplicationMode> fromId(@Nullable String value)
      Coerces a string to an ApplicationMode or returns the supplied default value if this is not possible
      Parameters:
      value - the ID of the application mode
      Returns:
      the corresponding ApplicationMode value