Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01

oracle.jbo.html.struts11
Class MultipartUtil

java.lang.Object
  extended byoracle.jbo.html.struts11.MultipartUtil

public class MultipartUtil
extends java.lang.Object

MultipartUtil contains method helping the handling of multipart request.

Since:
JDeveloper 9.0.3

Field Summary
protected static Log log
          Commons Logging instance.
 
Constructor Summary
MultipartUtil()
           
 
Method Summary
static java.lang.Object getOrdObject(AttributeDef attrDef, org.apache.struts.upload.FormFile file, Row row, ApplicationModule am)
          Get an interMedia object for the browser uploaded file.
static org.apache.struts.upload.MultipartRequestWrapper parseMultipartRequest(javax.servlet.http.HttpServletRequest request, org.apache.struts.action.ActionServlet servlet)
           
static void populate(java.lang.Object bean, java.lang.String prefix, java.lang.String suffix, javax.servlet.http.HttpServletRequest request)
          Populate the properties of the specified JavaBean from the specified HTTP request, based on matching each parameter name (plus an optional prefix and/or suffix) against the corresponding JavaBeans "property setter" methods in the bean's class.
static org.apache.struts.upload.MultipartRequestHandler retrieveMultipartHandler(javax.servlet.http.HttpServletRequest request)
          Retrieves the MultipartRequestHandler object from the HttpRequest scope.
static void setWrapperParams(org.apache.struts.upload.MultipartRequestHandler multipartHandler, org.apache.struts.upload.MultipartRequestWrapper requestWrapper)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

log

protected static Log log
Commons Logging instance.

Constructor Detail

MultipartUtil

public MultipartUtil()
Method Detail

populate

public static void populate(java.lang.Object bean,
                            java.lang.String prefix,
                            java.lang.String suffix,
                            javax.servlet.http.HttpServletRequest request)
                     throws javax.servlet.ServletException
Populate the properties of the specified JavaBean from the specified HTTP request, based on matching each parameter name (plus an optional prefix and/or suffix) against the corresponding JavaBeans "property setter" methods in the bean's class. Suitable conversion is done for argument types as described under setProperties().

If you specify a non-null prefix and a non-null suffix, the parameter name must match both conditions for its value(s) to be used in populating bean properties.

If the request's content type is "multipart/form-data" and the method is "POST", the HttpServletRequest object will be wrapped in a MultipartRequestWrapper object. The parsing of "multipart/form-data" POST request happens in processMultipart method. The parsed results are used in this method.

Parameters:
bean - The JavaBean whose properties are to be set
prefix - The prefix (if any) to be prepend to bean property names when looking for matching parameters
suffix - The suffix (if any) to be appended to bean property names when looking for matching parameters
request - The HTTP request whose parameters are to be used to populate bean properties
Throws:
javax.servlet.ServletException - if an exception is thrown while setting property values

parseMultipartRequest

public static org.apache.struts.upload.MultipartRequestWrapper parseMultipartRequest(javax.servlet.http.HttpServletRequest request,
                                                                                     org.apache.struts.action.ActionServlet servlet)
                                                                              throws javax.servlet.ServletException
Throws:
javax.servlet.ServletException

getOrdObject

public static java.lang.Object getOrdObject(AttributeDef attrDef,
                                            org.apache.struts.upload.FormFile file,
                                            Row row,
                                            ApplicationModule am)
Get an interMedia object for the browser uploaded file.


retrieveMultipartHandler

public static org.apache.struts.upload.MultipartRequestHandler retrieveMultipartHandler(javax.servlet.http.HttpServletRequest request)
Retrieves the MultipartRequestHandler object from the HttpRequest scope.


setWrapperParams

public static void setWrapperParams(org.apache.struts.upload.MultipartRequestHandler multipartHandler,
                                    org.apache.struts.upload.MultipartRequestWrapper requestWrapper)

Oracle ADF Model and Business Components API Reference 10.1.2 B14022-01

 

Copyright © 1997, 2004, Oracle. All rights reserved.