Package hudson.model

Interface ReconfigurableDescribable<T extends ReconfigurableDescribable<T>>

    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      T reconfigure​(org.kohsuke.stapler.StaplerRequest req, net.sf.json.JSONObject form)
      When a parent/owner object of a Describable gets a config form submission and instances are recreated, this method is invoked on the existing instance (meaning the 'this' reference points to the existing instance) to create a new instance to be added to the parent/owner object.
    • Method Detail

      • reconfigure

        @CheckForNull
        T reconfigure​(@NonNull
                      org.kohsuke.stapler.StaplerRequest req,
                      @CheckForNull
                      net.sf.json.JSONObject form)
               throws Descriptor.FormException
        When a parent/owner object of a Describable gets a config form submission and instances are recreated, this method is invoked on the existing instance (meaning the 'this' reference points to the existing instance) to create a new instance to be added to the parent/owner object.

        The default implementation of this should be the following:

         return form==null ? null : getDescriptor().newInstance(req, form);
         
        Parameters:
        req - The current HTTP request being processed.
        form - JSON fragment that corresponds to this describable object. If the newly submitted form doesn't include a fragment for this describable (meaning the user has de-selected your descriptor), then this argument is null.
        Returns:
        The new instance. To not to create an instance of a describable, return null.
        Throws:
        Descriptor.FormException