Class RequestImpl

java.lang.Object
javax.servlet.ServletRequestWrapper
javax.servlet.http.HttpServletRequestWrapper
org.kohsuke.stapler.RequestImpl
All Implemented Interfaces:
javax.servlet.http.HttpServletRequest, javax.servlet.ServletRequest, StaplerRequest

public class RequestImpl extends javax.servlet.http.HttpServletRequestWrapper implements StaplerRequest
StaplerRequest implementation.
Author:
Kohsuke Kawaguchi
  • Nested Class Summary

    Nested classes/interfaces inherited from interface org.kohsuke.stapler.StaplerRequest

    StaplerRequest.RenderOnDemandParameters
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final List<org.kohsuke.stapler.AncestorImpl>
    Ancestor nodes traversed so far.
    final Stapler
     
    final TokenList
    Tokenized URLs and consumed tokens.

    Fields inherited from interface javax.servlet.http.HttpServletRequest

    BASIC_AUTH, CLIENT_CERT_AUTH, DIGEST_AUTH, FORM_AUTH
  • Constructor Summary

    Constructors
    Constructor
    Description
    RequestImpl(Stapler stapler, javax.servlet.http.HttpServletRequest request, List<org.kohsuke.stapler.AncestorImpl> ancestors, TokenList tokens)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    <T> T
    bindJSON(Class<T> type, net.sf.json.JSONObject src)
    Data-bind from a JSONObject to the given target type, by using introspection or constructor parameters injection.
    void
    bindJSON(Object bean, net.sf.json.JSONObject src)
    Data-binds from JSONObject to the given object.
    bindJSON(Type type, Class erasure, Object json)
    Data-bind from one of the JSON object types (JSONObject, JSONArray, String, Integer, and so on) to the expected type given as an argument.
    <T> List<T>
    bindJSONToList(Class<T> type, Object src)
    Data-bind from either JSONObject or JSONArray to a list, by using StaplerRequest.bindJSON(Class, JSONObject) as the lower-level mechanism.
    <T> T
    bindParameters(Class<T> type, String prefix)
    Instantiates a new object by injecting constructor parameters from the form parameters.
    <T> T
    bindParameters(Class<T> type, String prefix, int index)
    Works like StaplerRequest.bindParameters(Class, String) but uses n-th value of all the parameters.
    void
    Binds form parameters to a bean by using introspection.
    void
    bindParameters(Object bean, String prefix)
    Binds form parameters to a bean by using introspection.
    <T> List<T>
    bindParametersToList(Class<T> type, String prefix)
    Binds collection form parameters to beans by using introspection or constructor parameters injection.
    boolean
    checkIfModified(long lastModified, StaplerResponse rsp)
    Checks "If-Modified-Since" header and returns false if the resource needs to be served.
    boolean
    checkIfModified(long lastModified, StaplerResponse rsp, long expiration)
     
    boolean
    checkIfModified(Calendar timestampOfResource, StaplerResponse rsp)
     
    boolean
    checkIfModified(Date timestampOfResource, StaplerResponse rsp)
     
    Exports the given Java object as a JavaScript proxy and returns a JavaScript expression to create a proxy on the client side.
    Exports the given Java object as a JavaScript proxy and returns the parameters needed to call makeStaplerProxy.
    Finds the nearest ancestor that has the object of the given type, or null if not found.
    Finds the nearest ancestor whose Ancestor.getObject() matches the given object.
    <T> T
    Short for findAncestor(type).getObject(), with proper handling for null de-reference.
    Returns a list of ancestor objects that lead to the "it" object.
    Gets the BindInterceptor set for this request.
    Short cut for obtaining BoundObjectTable associated with this webapp.
    Deprecated.
    org.apache.commons.fileupload2.core.FileItem
    Obtains a commons-fileupload2 object that represents an uploaded file.
    Gets the request URI of the original request, so that you can access the value even from JSP.
    Returns the same thing as StaplerRequest.getRestOfPath() but in the pre-decoded form, so all "%HH"s as present in the request URL is intact.
     
     
     
     
    Gets the referer header (like "http://foobar.com/zot") or null.
    HttpServletRequest.getRequestURI() plus additional query string part, if it exists.
    HttpServletRequest.getRequestURL() plus additional query string part, if it exists.
    Returns the additional URL portion that wasn't used by the stapler, excluding the query string.
    Gets the part of the request URL from protocol up to the context path.
    javax.servlet.ServletContext
    Returns the ServletContext object given to the stapler dispatcher servlet.
    Gets the Stapler instance that this belongs to.
    net.sf.json.JSONObject
    Gets the content of the structured form submission.
    javax.servlet.RequestDispatcher
    getView(Class clazz, String viewName)
    Convenience method to call StaplerRequest.getView(Klass, String) with Class.
    javax.servlet.RequestDispatcher
    getView(Object it, String viewName)
    Gets the RequestDispatcher that represents a specific view for the given object.
    javax.servlet.RequestDispatcher
    getView(Klass<?> clazz, Object it, String viewName)
     
    javax.servlet.RequestDispatcher
    getView(Klass<?> clazz, String viewName)
    Gets the RequestDispatcher that represents a specific view for the given class.
    Short for getStapler().getWebApp()
    boolean
    Short for getParameter(name)!=null
    boolean
    Returns true if this request represents a server method call to a JavaScript proxy object.
     
     
     

    Methods inherited from class javax.servlet.http.HttpServletRequestWrapper

    authenticate, changeSessionId, getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getHttpServletMapping, getIntHeader, getMethod, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getTrailerFields, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isTrailerFieldsReady, isUserInRole, login, logout, newPushBuilder, upgrade

    Methods inherited from class javax.servlet.ServletRequestWrapper

    getAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequest, getRequestDispatcher, getScheme, getServerName, getServerPort, isAsyncStarted, isAsyncSupported, isSecure, isWrapperFor, isWrapperFor, removeAttribute, setAttribute, setCharacterEncoding, setRequest, startAsync, startAsync

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface javax.servlet.http.HttpServletRequest

    authenticate, changeSessionId, getAuthType, getContextPath, getCookies, getDateHeader, getHeader, getHeaderNames, getHeaders, getHttpServletMapping, getIntHeader, getMethod, getPart, getParts, getPathInfo, getPathTranslated, getQueryString, getRemoteUser, getRequestedSessionId, getRequestURI, getRequestURL, getServletPath, getSession, getSession, getTrailerFields, getUserPrincipal, isRequestedSessionIdFromCookie, isRequestedSessionIdFromUrl, isRequestedSessionIdFromURL, isRequestedSessionIdValid, isTrailerFieldsReady, isUserInRole, login, logout, newPushBuilder, upgrade

    Methods inherited from interface javax.servlet.ServletRequest

    getAsyncContext, getAttribute, getAttributeNames, getCharacterEncoding, getContentLength, getContentLengthLong, getContentType, getDispatcherType, getInputStream, getLocalAddr, getLocale, getLocales, getLocalName, getLocalPort, getProtocol, getReader, getRealPath, getRemoteAddr, getRemoteHost, getRemotePort, getRequestDispatcher, getScheme, getServerName, getServerPort, isAsyncStarted, isAsyncSupported, isSecure, removeAttribute, setAttribute, setCharacterEncoding, startAsync, startAsync
  • Field Details

    • tokens

      public final TokenList tokens
      Tokenized URLs and consumed tokens. This object is modified by Stapler as we parse through the URL.
    • ancestors

      public final List<org.kohsuke.stapler.AncestorImpl> ancestors
      Ancestor nodes traversed so far. This object is modified by Stapler as we parse through the URL.
    • stapler

      public final Stapler stapler
  • Constructor Details

    • RequestImpl

      public RequestImpl(Stapler stapler, javax.servlet.http.HttpServletRequest request, List<org.kohsuke.stapler.AncestorImpl> ancestors, TokenList tokens)
  • Method Details

    • isJavaScriptProxyCall

      public boolean isJavaScriptProxyCall()
      Description copied from interface: StaplerRequest
      Returns true if this request represents a server method call to a JavaScript proxy object.
      Specified by:
      isJavaScriptProxyCall in interface StaplerRequest
    • getBoundObjectTable

      public BoundObjectTable getBoundObjectTable()
      Description copied from interface: StaplerRequest
      Short cut for obtaining BoundObjectTable associated with this webapp.
      Specified by:
      getBoundObjectTable in interface StaplerRequest
    • createJavaScriptProxy

      public String createJavaScriptProxy(Object toBeExported)
      Description copied from interface: StaplerRequest
      Exports the given Java object as a JavaScript proxy and returns a JavaScript expression to create a proxy on the client side. Short cut for getBoundObjectTable().bind(toBeExported).getProxyScript()
      Specified by:
      createJavaScriptProxy in interface StaplerRequest
    • createJavaScriptProxyParameters

      public StaplerRequest.RenderOnDemandParameters createJavaScriptProxyParameters(Object toBeExported)
      Description copied from interface: StaplerRequest
      Exports the given Java object as a JavaScript proxy and returns the parameters needed to call makeStaplerProxy.
      Specified by:
      createJavaScriptProxyParameters in interface StaplerRequest
    • getStapler

      public Stapler getStapler()
      Description copied from interface: StaplerRequest
      Gets the Stapler instance that this belongs to.
      Specified by:
      getStapler in interface StaplerRequest
    • getWebApp

      public WebApp getWebApp()
      Description copied from interface: StaplerRequest
      Short for getStapler().getWebApp()
      Specified by:
      getWebApp in interface StaplerRequest
    • getRestOfPath

      public String getRestOfPath()
      Description copied from interface: StaplerRequest
      Returns the additional URL portion that wasn't used by the stapler, excluding the query string.

      For example, if the requested URL is "foo/bar/zot/abc?def=ghi" and "foo/bar" portion matched bar.jsp, this method returns "/zot/abc".

      If this method is invoked from getters or StaplerProxy.getTarget() during the object traversal, this method returns the path portion that is not yet processed.

      Specified by:
      getRestOfPath in interface StaplerRequest
      Returns:
      can be empty string, but never null.
    • getOriginalRestOfPath

      public String getOriginalRestOfPath()
      Description copied from interface: StaplerRequest
      Returns the same thing as StaplerRequest.getRestOfPath() but in the pre-decoded form, so all "%HH"s as present in the request URL is intact.
      Specified by:
      getOriginalRestOfPath in interface StaplerRequest
    • getServletContext

      public javax.servlet.ServletContext getServletContext()
      Description copied from interface: StaplerRequest
      Returns the ServletContext object given to the stapler dispatcher servlet.
      Specified by:
      getServletContext in interface javax.servlet.ServletRequest
      Specified by:
      getServletContext in interface StaplerRequest
      Overrides:
      getServletContext in class javax.servlet.ServletRequestWrapper
    • getParameter

      public String getParameter(String name)
      Specified by:
      getParameter in interface javax.servlet.ServletRequest
      Overrides:
      getParameter in class javax.servlet.ServletRequestWrapper
    • getParameterMap

      public Map getParameterMap()
      Specified by:
      getParameterMap in interface javax.servlet.ServletRequest
      Overrides:
      getParameterMap in class javax.servlet.ServletRequestWrapper
    • getParameterNames

      public Enumeration getParameterNames()
      Specified by:
      getParameterNames in interface javax.servlet.ServletRequest
      Overrides:
      getParameterNames in class javax.servlet.ServletRequestWrapper
    • getParameterValues

      public String[] getParameterValues(String name)
      Specified by:
      getParameterValues in interface javax.servlet.ServletRequest
      Overrides:
      getParameterValues in class javax.servlet.ServletRequestWrapper
    • getRequestURIWithQueryString

      public String getRequestURIWithQueryString()
      Description copied from interface: StaplerRequest
      HttpServletRequest.getRequestURI() plus additional query string part, if it exists.
      Specified by:
      getRequestURIWithQueryString in interface StaplerRequest
    • getRequestURLWithQueryString

      public StringBuffer getRequestURLWithQueryString()
      Description copied from interface: StaplerRequest
      HttpServletRequest.getRequestURL() plus additional query string part, if it exists.
      Specified by:
      getRequestURLWithQueryString in interface StaplerRequest
    • getView

      public javax.servlet.RequestDispatcher getView(Object it, String viewName) throws IOException
      Description copied from interface: StaplerRequest
      Gets the RequestDispatcher that represents a specific view for the given object. This support both JSP and Jelly.
      Specified by:
      getView in interface StaplerRequest
      viewName - If this name is relative name like "foo.jsp" or "bar/zot.jelly", then the corresponding "side file" is searched by this name.

      For Jelly, this also accepts absolute path name that starts with '/', such as "/foo/bar/zot.jelly". In this case, it.getClass().getClassLoader() is searched for this script.

      Returns:
      null if neither JSP nor Jelly is not found by the given name.
      Throws:
      IOException
    • getView

      public javax.servlet.RequestDispatcher getView(Class clazz, String viewName) throws IOException
      Description copied from interface: StaplerRequest
      Convenience method to call StaplerRequest.getView(Klass, String) with Class.
      Specified by:
      getView in interface StaplerRequest
      Throws:
      IOException
    • getView

      public javax.servlet.RequestDispatcher getView(Klass<?> clazz, String viewName) throws IOException
      Description copied from interface: StaplerRequest
      Gets the RequestDispatcher that represents a specific view for the given class.

      Unlike StaplerRequest.getView(Object, String), calling this request dispatcher doesn't set the "it" variable, so getView(it.getClass(),viewName) and getView(it,viewName) aren't the same thing.

      Specified by:
      getView in interface StaplerRequest
      Throws:
      IOException
    • getView

      public javax.servlet.RequestDispatcher getView(Klass<?> clazz, Object it, String viewName) throws IOException
      Throws:
      IOException
    • getRootPath

      public String getRootPath()
      Description copied from interface: StaplerRequest
      Gets the part of the request URL from protocol up to the context path. So typically it's something like http://foobar:8080/something
      Specified by:
      getRootPath in interface StaplerRequest
    • getReferer

      public String getReferer()
      Description copied from interface: StaplerRequest
      Gets the referer header (like "http://foobar.com/zot") or null. This is just a convenience method.
      Specified by:
      getReferer in interface StaplerRequest
    • getAncestors

      public List<Ancestor> getAncestors()
      Description copied from interface: StaplerRequest
      Returns a list of ancestor objects that lead to the "it" object. The returned list contains Ancestor objects sorted in the order from root to the "it" object.

      For example, if the URL was "foo/bar/zot" and the "it" object was determined as root.getFoo().getBar("zot"), then this list will contain the following 3 objects in this order:

      1. the root object
      2. root.getFoo() object
      3. root.getFoo().getBar("zot") object (the "it" object)

      Specified by:
      getAncestors in interface StaplerRequest
      Returns:
      list of Ancestors. Can be empty, but always non-null.
    • findAncestor

      public Ancestor findAncestor(Class type)
      Description copied from interface: StaplerRequest
      Finds the nearest ancestor that has the object of the given type, or null if not found.
      Specified by:
      findAncestor in interface StaplerRequest
    • findAncestorObject

      public <T> T findAncestorObject(Class<T> type)
      Description copied from interface: StaplerRequest
      Short for findAncestor(type).getObject(), with proper handling for null de-reference. This version is also type safe.
      Specified by:
      findAncestorObject in interface StaplerRequest
    • findAncestor

      public Ancestor findAncestor(Object anc)
      Description copied from interface: StaplerRequest
      Finds the nearest ancestor whose Ancestor.getObject() matches the given object.
      Specified by:
      findAncestor in interface StaplerRequest
    • hasParameter

      public boolean hasParameter(String name)
      Description copied from interface: StaplerRequest
      Short for getParameter(name)!=null
      Specified by:
      hasParameter in interface StaplerRequest
    • getOriginalRequestURI

      public String getOriginalRequestURI()
      Description copied from interface: StaplerRequest
      Gets the request URI of the original request, so that you can access the value even from JSP.
      Specified by:
      getOriginalRequestURI in interface StaplerRequest
    • checkIfModified

      public boolean checkIfModified(long lastModified, StaplerResponse rsp)
      Description copied from interface: StaplerRequest
      Checks "If-Modified-Since" header and returns false if the resource needs to be served.

      This method can behave in three ways.

      1. If timestampOfResource is 0 or negative, this method just returns false.
      2. If "If-Modified-Since" header is sent and if it's bigger than timestampOfResource, then this method sets HttpServletResponse.SC_NOT_MODIFIED as the response code and returns true.
      3. Otherwise, "Last-Modified" header is added with timestampOfResource value, and this method returns false.

      This method sends out the "Expires" header to force browser to re-validate all the time.

      Specified by:
      checkIfModified in interface StaplerRequest
      Parameters:
      lastModified - The time stamp of the resource.
      rsp - This object is updated accordingly to simplify processing.
      Returns:
      false to indicate that the caller has to serve the actual resource. true to indicate that the caller should just quit processing right there (and send back HttpServletResponse.SC_NOT_MODIFIED.
    • checkIfModified

      public boolean checkIfModified(long lastModified, StaplerResponse rsp, long expiration)
      Specified by:
      checkIfModified in interface StaplerRequest
      expiration - The number of milliseconds until the resource will "expire". Until it expires the browser will be allowed to cache it and serve it without checking back with the server. After it expires, the client will send conditional GET to check if the resource is actually modified or not. If 0, it will immediately expire.
      See Also:
    • checkIfModified

      public boolean checkIfModified(Date timestampOfResource, StaplerResponse rsp)
      Specified by:
      checkIfModified in interface StaplerRequest
      See Also:
    • checkIfModified

      public boolean checkIfModified(Calendar timestampOfResource, StaplerResponse rsp)
      Specified by:
      checkIfModified in interface StaplerRequest
      See Also:
    • getBindInterceptor

      public BindInterceptor getBindInterceptor()
      Description copied from interface: StaplerRequest
      Gets the BindInterceptor set for this request.
      Specified by:
      getBindInterceptor in interface StaplerRequest
      See Also:
    • setBindListener

      public BindInterceptor setBindListener(BindInterceptor bindListener)
      Specified by:
      setBindListener in interface StaplerRequest
    • setBindInterceptpr

      public BindInterceptor setBindInterceptpr(BindInterceptor bindListener)
      Specified by:
      setBindInterceptpr in interface StaplerRequest
    • setBindInterceptor

      public BindInterceptor setBindInterceptor(BindInterceptor bindListener)
      Specified by:
      setBindInterceptor in interface StaplerRequest
    • bindParameters

      public void bindParameters(Object bean)
      Description copied from interface: StaplerRequest
      Binds form parameters to a bean by using introspection. For example, if there's a parameter called 'foo' that has value 'abc', then bean.setFoo('abc') will be invoked. This will be repeated for all parameters. Parameters that do not have corresponding setters will be simply ignored.

      Values are converted into the right type. See ConvertUtils.convert(String, Class).

      Specified by:
      bindParameters in interface StaplerRequest
      Parameters:
      bean - The object which will be filled out.
      See Also:
      • BeanUtils.setProperty(Object, String, Object)
    • bindParameters

      public void bindParameters(Object bean, String prefix)
      Description copied from interface: StaplerRequest
      Binds form parameters to a bean by using introspection. This method works like StaplerRequest.bindParameters(Object), but it performs a pre-processing on property names. Namely, only property names that start with the given prefix will be used for binding, and only the portion of the property name after the prefix is used. So for example, if the prefix is "foo.", then property name "foo.bar" with value "zot" will invoke bean.setBar("zot").
      Specified by:
      bindParameters in interface StaplerRequest
    • bindParametersToList

      public <T> List<T> bindParametersToList(Class<T> type, String prefix)
      Description copied from interface: StaplerRequest
      Binds collection form parameters to beans by using introspection or constructor parameters injection.

      This method works like StaplerRequest.bindParameters(Object,String) and StaplerRequest.bindParameters(Class, String), but it assumes that form parameters have multiple-values, and use individual values to fill in multiple beans.

      For example, if getParameterValues("foo")=={"abc","def"} and getParameterValues("bar")=={"5","3"}, then this method will return two objects (the first with "abc" and "5", the second with "def" and "3".)

      Specified by:
      bindParametersToList in interface StaplerRequest
      Parameters:
      type - Type of the bean to be created. This class must have the default no-arg constructor.
      prefix - See StaplerRequest.bindParameters(Object, String) for details.
      Returns:
      Can be empty but never null.
    • bindParameters

      public <T> T bindParameters(Class<T> type, String prefix)
      Description copied from interface: StaplerRequest
      Instantiates a new object by injecting constructor parameters from the form parameters.

      The given class must have a constructor annotated with '@stapler-constructor', and must be processed by the maven-stapler-plugin, so that the parameter names of the constructor is available at runtime.

      The prefix is used to control the form parameter name. For example, if the prefix is "foo." and if the constructor is define as Foo(String a, String b), then the constructor will be invoked as new Foo(getParameter("foo.a"),getParameter("foo.b")).

      Specified by:
      bindParameters in interface StaplerRequest
    • bindParameters

      public <T> T bindParameters(Class<T> type, String prefix, int index)
      Description copied from interface: StaplerRequest
      Works like StaplerRequest.bindParameters(Class, String) but uses n-th value of all the parameters.

      This is useful for creating multiple instances from repeated form fields.

      Specified by:
      bindParameters in interface StaplerRequest
    • bindJSON

      public <T> T bindJSON(Class<T> type, net.sf.json.JSONObject src)
      Description copied from interface: StaplerRequest
      Data-bind from a JSONObject to the given target type, by using introspection or constructor parameters injection.

      For example, if you have a constructor that looks like the following:

       class Foo {
         @DataBoundConstructor
         public Foo(Integer x, String y, boolean z, Bar bar) { ... }
       }
      
       class Bar {
         @DataBoundConstructor
         public Bar(int x, int y) {}
       }
       
      ... and if JSONObject looks like
      { y:"text", z:true, bar:{x:1,y:2}}
      then, this method returns
      new Foo(null,"text",true,new Bar(1,2))

      Sub-typing: In the above example, a new instance of Bar was created, but you can also create a subtype of Bar by having the '$class' property in JSON like this:

       class BarEx extends Bar {
         @DataBoundConstructor
         public BarEx(int a, int b, int c) {}
       }
      
       { y:"text", z:true, bar: { $class:"p.k.g.BarEx", a:1, b:2, c:3 } }
       

      The type that shows up in the constructor (Bar in this case) can be an interface or an abstract class.

      Specified by:
      bindJSON in interface StaplerRequest
    • bindJSON

      public Object bindJSON(Type type, Class erasure, Object json)
      Description copied from interface: StaplerRequest
      Data-bind from one of the JSON object types (JSONObject, JSONArray, String, Integer, and so on) to the expected type given as an argument.
      Specified by:
      bindJSON in interface StaplerRequest
      Parameters:
      type - The generic type of the 'erasure' parameter.
      erasure - The expected type to convert the JSON argument to.
      json - One of the JSON value type.
    • bindJSON

      public void bindJSON(Object bean, net.sf.json.JSONObject src)
      Description copied from interface: StaplerRequest
      Data-binds from JSONObject to the given object.

      This method is bit like StaplerRequest.bindJSON(Class, JSONObject), except that this method populates an existing object, instead of creating a new instance.

      This method is also bit like StaplerRequest.bindParameters(Object, String), in that it populates an existing object from a form submission, except that this method obtains data from JSONObject thus more structured, whereas StaplerRequest.bindParameters(Object, String) uses the map structure of the form submission.

      Specified by:
      bindJSON in interface StaplerRequest
    • bindJSONToList

      public <T> List<T> bindJSONToList(Class<T> type, Object src)
      Description copied from interface: StaplerRequest
      Data-bind from either JSONObject or JSONArray to a list, by using StaplerRequest.bindJSON(Class, JSONObject) as the lower-level mechanism.

      If the source is JSONObject, the returned list will contain a single item. If it is JSONArray, each item will be bound. If it is null, then the list will be empty.

      Specified by:
      bindJSONToList in interface StaplerRequest
    • getSubmittedForm

      public net.sf.json.JSONObject getSubmittedForm() throws javax.servlet.ServletException
      Description copied from interface: StaplerRequest
      Gets the content of the structured form submission.
      Specified by:
      getSubmittedForm in interface StaplerRequest
      Throws:
      javax.servlet.ServletException
      See Also:
    • getFileItem2

      public org.apache.commons.fileupload2.core.FileItem getFileItem2(String name) throws javax.servlet.ServletException, IOException
      Description copied from interface: StaplerRequest
      Obtains a commons-fileupload2 object that represents an uploaded file.
      Specified by:
      getFileItem2 in interface StaplerRequest
      Returns:
      null if a file of the given form field name doesn't exist. This includes the case where the name corresponds to a simple form field (like textbox, checkbox, etc.)
      Throws:
      javax.servlet.ServletException
      IOException
    • getFileItem

      @Deprecated public FileItem getFileItem(String name) throws javax.servlet.ServletException, IOException
      Deprecated.
      Description copied from interface: StaplerRequest
      Obtains a commons-fileupload object that represents an uploaded file.
      Specified by:
      getFileItem in interface StaplerRequest
      Returns:
      null if a file of the given form field name doesn't exist. This includes the case where the name corresponds to a simple form field (like textbox, checkbox, etc.)
      Throws:
      javax.servlet.ServletException
      IOException