KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > springframework > web > portlet > multipart > MultipartActionRequest


1 /*
2  * Copyright 2002-2005 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.portlet.multipart;
18
19 import java.util.Iterator JavaDoc;
20 import java.util.Map JavaDoc;
21
22 import javax.portlet.ActionRequest;
23
24 import org.springframework.web.multipart.MultipartFile;
25
26 /**
27  * Interface which provides additional methods for dealing with multipart
28  * content within a portlet request, allowing to access uploaded files.
29  * Implementations also need to override the standard ActionRequest
30  * methods for parameter access, making multipart parameters available.
31  *
32  * <p>A concrete implementation is DefaultMultipartActionRequest.
33  *
34  * @author Juergen Hoeller
35  * @since 2.0
36  * @see PortletMultipartResolver
37  * @see org.springframework.web.multipart.MultipartFile
38  * @see javax.portlet.ActionRequest#getParameter
39  * @see javax.portlet.ActionRequest#getParameterNames
40  * @see javax.portlet.ActionRequest#getParameterMap
41  * @see DefaultMultipartActionRequest
42  */

43 public interface MultipartActionRequest extends ActionRequest {
44
45     /**
46      * Return an Iterator of String objects containing the parameter names of the
47      * multipart files contained in this request. These are the field names of
48      * the form (like with normal parameters), not the original file names.
49      * @return the names of the files
50      */

51     Iterator JavaDoc getFileNames();
52
53     /**
54      * Return the contents plus description of an uploaded file in this request,
55      * or <code>null</code> if it does not exist.
56      * @param name a String specifying the parameter name of the multipart file
57      * @return the uploaded content in the form of a MultipartFile object
58      */

59     MultipartFile getFile(String JavaDoc name);
60
61     /**
62      * Return a Map of the multipart files contained in this request.
63      * @return a map containing the parameter names as keys, and the
64      * MultipartFile objects as values
65      * @see org.springframework.web.multipart.MultipartFile
66      */

67     Map JavaDoc getFileMap();
68
69 }
70
Popular Tags