Package org.kohsuke.stapler
Interface DataBoundResolvable
-
public interface DataBoundResolvable
For data-bound class (that has a constructor marked withDataBoundConstructor
, thebindResolve(StaplerRequest, JSONObject)
allows an instance to replace the object bound from submitted JSON object.This method is automatically invoked by Stapler during databinding method like
StaplerRequest.bindJSON(Class, JSONObject)
.This method definition is inspired by Java serialization's
readResolve()
method.- Author:
- Kohsuke Kawaguchi
- See Also:
- JENKINS-201262
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Object
bindResolve(StaplerRequest request, net.sf.json.JSONObject src)
Called after the object is instantiated to allow the object to nominate its replacement.
-
-
-
Method Detail
-
bindResolve
Object bindResolve(StaplerRequest request, net.sf.json.JSONObject src)
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.
-
-