Interface ScmStatus
status
of an Scm
plugin.
SCMs which can change their status at runtime are encouraged to raise
events
when their
status changes.
- See Also:
-
ScmService
ScmStatusChangedEvent
-
Method Summary
Modifier and TypeMethodDescriptioncom.atlassian.bitbucket.i18n.KeyedMessage
Retrieves a message describing the SCM's status.boolean
Retrieves a flag indicating whether the SCM is available to process requests.
-
Method Details
-
getMessage
@Nullable com.atlassian.bitbucket.i18n.KeyedMessage getMessage()Retrieves a message describing the SCM's status.When
isAvailable()
returnstrue
, implementations of this method may returnnull
. However, they are encouraged to return a message describing the SCM implementation instead. For example, they might return a message indicating the version of the SCM being used.When
isAvailable()
returnsfalse
, implementations are this are required to return a non-null
message describing the issue or issues affecting the SCM. The message should be as detailed and thorough as possible to aid administrators in resolving the issue.- Returns:
- a message describing the SCM's current status, which may be
null
if the SCM is available
-
isAvailable
boolean isAvailable()Retrieves a flag indicating whether the SCM is available to process requests.When
true
, theScm
is expected to support its full, normal functionality. This means, at a minimum, thecommand factory
and otherScm
methods must work correctly. If the plugin does not supportcommand builders
orpull requests
, whether the SCM is available or not is not expected to be relevant.When
false
,ScmService
will prevent the system, or other plugins, from accessing the SCM, and the SCM's normal functionality is not expected to be usable. Note that plugins may directly access the SCM, bypassing theScmService
, and, when so doing, may not perform their own status checks. As a result, SCM implementations are encouraged to guard against such misuse internally, as the system cannot prevent it.- Returns:
true
if the SCM is available and functioning normally; otherwise,false
if
-