Class PluginConfigurationStatusService

java.lang.Object
com.xebialabs.xlrelease.service.PluginConfigurationStatusService
All Implemented Interfaces:
com.xebialabs.xlrelease.service.ConfigurationStatusService

@Component @Order(0) public class PluginConfigurationStatusService extends Object implements com.xebialabs.xlrelease.service.ConfigurationStatusService
The ConfigurationStatusService implementation for OSGi plugin configurations: backs the Test Connection button for a bundle-declared configuration type with a plugin-supplied ConnectionTestExtension, without modifying SharedConfigurationStatusService's own dispatch mechanism.

SharedConfigurationStatusService.checkStatus(com.xebialabs.xlrelease.domain.Configuration) resolves variables and decrypts the configuration before calling checkStatus(com.xebialabs.xlrelease.domain.Configuration).

supports(com.xebialabs.xlrelease.domain.Configuration) is a lenient existence check (at least one registered extension), so the button's mere presence never depends on the stricter "exactly one" rule; checkStatus(com.xebialabs.xlrelease.domain.Configuration) re-resolves strictly and turns zero or more-than-one matches - and any exception the extension itself throws - into an ordinary failed SharedConfigurationStatusResponse, never an uncaught exception, so a plugin bug degrades to a readable failure message instead of a 500.

@Order(0) rather than relying on classpath/registration order: our configuration types declare no script and are never a BaseScmConnectorConfig, so DefaultConfigurationStatusService/ScmConfigurationStatusService should already return false for them - asserted by a test, not just assumed - but an explicit low order value means this service is tried first regardless, rather than trusting that assumption to keep holding as more ConfigurationStatusService beans are added over time.

  • Constructor Details

    • PluginConfigurationStatusService

      public PluginConfigurationStatusService(PluginExtensionRegistry pluginExtensionRegistry)
  • Method Details

    • supports

      public boolean supports(com.xebialabs.xlrelease.domain.Configuration configuration)
      Specified by:
      supports in interface com.xebialabs.xlrelease.service.ConfigurationStatusService
    • checkStatus

      public com.xebialabs.xlrelease.views.SharedConfigurationStatusResponse checkStatus(com.xebialabs.xlrelease.domain.Configuration configuration)
      Specified by:
      checkStatus in interface com.xebialabs.xlrelease.service.ConfigurationStatusService