Class SepiaRoutingKeyProviderConfigurator

  • All Implemented Interfaces:
    io.jenkins.plugins.casc.Configurator<SepiaRoutingKeyProvider>

    @Extension(optional=true)
    public class SepiaRoutingKeyProviderConfigurator
    extends io.jenkins.plugins.casc.BaseConfigurator<SepiaRoutingKeyProvider>
    A Configurator implementation that takes care of CasC serialization/deserialization of SepiaRoutingKeyProvider objects. CasC tries very hard to not serialize any default values or empty objects, so unless you've set the optional Tag field to a non-empty value it won't serialize the SepiaRoutingKeyProvider object at all, causing us to lose information about which class was chosen as the routing key provider. This configurator works around this by always adding a dummy key/value pair during serialization.
    • Constructor Detail

      • SepiaRoutingKeyProviderConfigurator

        public SepiaRoutingKeyProviderConfigurator()
    • Method Detail

      • instance

        protected SepiaRoutingKeyProvider instance​(io.jenkins.plugins.casc.model.Mapping mapping,
                                                   io.jenkins.plugins.casc.ConfigurationContext context)
                                            throws io.jenkins.plugins.casc.ConfiguratorException
        Specified by:
        instance in class io.jenkins.plugins.casc.BaseConfigurator<SepiaRoutingKeyProvider>
        Throws:
        io.jenkins.plugins.casc.ConfiguratorException
      • canConfigure

        public boolean canConfigure​(Class clazz)
      • describe

        @CheckForNull
        public io.jenkins.plugins.casc.model.CNode describe​(SepiaRoutingKeyProvider instance,
                                                            io.jenkins.plugins.casc.ConfigurationContext context)
                                                     throws Exception
        Throws:
        Exception
      • getConfigurators

        @NonNull
        public List<io.jenkins.plugins.casc.Configurator<SepiaRoutingKeyProvider>> getConfigurators​(io.jenkins.plugins.casc.ConfigurationContext context)