KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > web > multipart > MultipartHttpServletRequest


1 /*
2  * Copyright 2002-2006 the original author or authors.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */

16
17 package org.springframework.web.multipart;
18
19 import java.util.Iterator JavaDoc;
20 import java.util.Map JavaDoc;
21
22 import javax.servlet.http.HttpServletRequest JavaDoc;
23
24 /**
25  * Provides additional methods for dealing with multipart content within a
26  * servlet request, allowing to access uploaded files.
27  * Implementations also need to override the standard
28  * {@link javax.servlet.ServletRequest} methods for parameter access, making
29  * multipart parameters available.
30  *
31  * <p>A concrete implementation is
32  * {@link org.springframework.web.multipart.support.DefaultMultipartHttpServletRequest}.
33  * As an intermediate step,
34  * {@link org.springframework.web.multipart.support.AbstractMultipartHttpServletRequest}
35  * can be subclassed.
36  *
37  * @author Juergen Hoeller
38  * @author Trevor D. Cook
39  * @since 29.09.2003
40  * @see MultipartResolver
41  * @see MultipartFile
42  * @see javax.servlet.http.HttpServletRequest#getParameter
43  * @see javax.servlet.http.HttpServletRequest#getParameterNames
44  * @see javax.servlet.http.HttpServletRequest#getParameterMap
45  * @see org.springframework.web.multipart.support.DefaultMultipartHttpServletRequest
46  * @see org.springframework.web.multipart.support.AbstractMultipartHttpServletRequest
47  */

48 public interface MultipartHttpServletRequest extends HttpServletRequest JavaDoc {
49
50     /**
51      * Return an {@link java.util.Iterator} of String objects containing the
52      * parameter names of the multipart files contained in this request. These
53      * are the field names of the form (like with normal parameters), not the
54      * original file names.
55      * @return the names of the files
56      */

57     Iterator JavaDoc getFileNames();
58
59     /**
60      * Return the contents plus description of an uploaded file in this request,
61      * or <code>null</code> if it does not exist.
62      * @param name a String specifying the parameter name of the multipart file
63      * @return the uploaded content in the form of a {@link org.springframework.web.multipart.MultipartFile} object
64      */

65     MultipartFile getFile(String JavaDoc name);
66
67     /**
68      * Return a {@link java.util.Map} of the multipart files contained in this request.
69      * @return a map containing the parameter names as keys, and the
70      * {@link org.springframework.web.multipart.MultipartFile} objects as values
71      * @see MultipartFile
72      */

73     Map JavaDoc getFileMap();
74
75 }
76
Popular Tags