Enum Class Repository.State
- All Implemented Interfaces:
Serializable
,Comparable<Repository.State>
,Constable
- Enclosing interface:
- Repository
Enumerates the possible states for a given
repository
. In general, repositories will always
be in the available
state.-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>>
-
Enum Constant Summary
Enum ConstantDescriptionIndicates the repository has been created both in the database and in the associated SCM and may be pulled from or pushed to normally.Indicates the associated SCM was not able to create the repository's SCM-specific storage, such as a bare clone on disk ingit
.Indicates the repository has just been created in the database and the associated SCM is currently in the process of creating its storage.Indicates that the repository is remotely managed and that the node that manages it is currently offline. -
Method Summary
Modifier and TypeMethodDescriptionstatic Repository.State
fromId
(int id) Retrieves the state associated with the specifiedID
.int
getId()
Retrieves a unique identifier for this state.Retrieves the status message describing this state.static Repository.State
Returns the enum constant of this class with the specified name.static Repository.State[]
values()
Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
AVAILABLE
Indicates the repository has been created both in the database and in the associated SCM and may be pulled from or pushed to normally. -
INITIALISATION_FAILED
Indicates the associated SCM was not able to create the repository's SCM-specific storage, such as a bare clone on disk ingit
. Repositories in this state exist within the database, but may not be pulled from or pushed to. -
INITIALISING
Indicates the repository has just been created in the database and the associated SCM is currently in the process of creating its storage. Repositories in this state may not be pulled from or pushed to. -
OFFLINE
Indicates that the repository is remotely managed and that the node that manages it is currently offline.- Since:
- 7.12
-
-
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
public int getId()Retrieves a unique identifier for this state. Unlike the enum's ordinal or name, this value will never change for a given entry.- Returns:
- the state's unique identifier
-
getStatusMessage
Retrieves the status message describing this state.- Returns:
- the state's status message
-
fromId
Retrieves the state associated with the specifiedID
.- Parameters:
id
- the ID to retrieve aState
for- Returns:
- the state with the specified ID
- Throws:
IllegalArgumentException
- if no state exists with the specified ID
-