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:
-
ScmServiceScmStatusChangedEvent
-
Method Summary
Modifier and TypeMethodDescriptioncom.atlassian.bitbucket.i18n.KeyedMessageRetrieves a message describing the SCM's status.booleanRetrieves 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-nullmessage 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
nullif the SCM is available
-
isAvailable
boolean isAvailable()Retrieves a flag indicating whether the SCM is available to process requests.When
true, theScmis expected to support its full, normal functionality. This means, at a minimum, thecommand factoryand otherScmmethods must work correctly. If the plugin does not supportcommand buildersorpull requests, whether the SCM is available or not is not expected to be relevant.When
false,ScmServicewill 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:
trueif the SCM is available and functioning normally; otherwise,falseif
-