Package com.atlassian.bitbucket.server
Enum Class ApplicationMode
- All Implemented Interfaces:
Serializable
,Comparable<ApplicationMode>
,Constable
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
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Optional<ApplicationMode>
Coerces a string to anApplicationMode
or returns the supplied default value if this is not possiblegetId()
static ApplicationMode
Returns the enum constant of this class with the specified name.static ApplicationMode[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
DEFAULT
Signifies the application should behave in the default mode - a general-purpose code hosting platform -
MIRROR
Signifies the application should behave like a code mirror for projects and repositories hosted in another server
-
-
Method Details
-
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
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 nameNullPointerException
- if the argument is null
-
getId
-
fromId
Coerces a string to anApplicationMode
or returns the supplied default value if this is not possible- Parameters:
value
- the ID of the application mode- Returns:
- the corresponding
ApplicationMode
value
-