Package org.kohsuke.stapler
Interface DataBoundResolvable
public interface DataBoundResolvable
For data-bound class (that has a constructor marked with
DataBoundConstructor
, the
bindResolve(StaplerRequest2, JSONObject)
allows an instance to replace the object
bound from submitted JSON object.
This method is automatically invoked by Stapler during databinding method like
StaplerRequest2.bindJSON(Class, JSONObject)
.
This method definition is inspired by Java serialization's readResolve()
method.
- Author:
- Kohsuke Kawaguchi
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionbindResolve
(StaplerRequest2 request, net.sf.json.JSONObject src) Called after the object is instantiated to allow the object to nominate its replacement.
-
Method Details
-
bindResolve
Called after the object is instantiated to allow the object to nominate its replacement.- Parameters:
request
- Request object that's currently performing databinding. Passed in as a contextual parameter.src
- JSON object that originally constructed the 'this' instance on which this method is being invoked.- Returns:
- Can be any value, including null. Typically, this method would have to return an instance of a type compatible to the caller's expectation.
-