1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.apache.commons.fileupload;
17
18
19 /***
20 * <p>High level API for processing file uploads.</p>
21 *
22 * <p>This class handles multiple files per single HTML widget, sent using
23 * <code>multipart/mixed</code> encoding type, as specified by
24 * <a href="http://www.ietf.org/rfc/rfc1867.txt">RFC 1867</a>. Use {@link
25 * #parseRequest(javax.portlet.ActionRequest)} to acquire a list of {@link
26 * org.apache.commons.fileupload.FileItem}s associated with a given HTML
27 * widget.</p>
28 *
29 * <p>How the data for individual parts is stored is determined by the factory
30 * used to create them; a given part may be in memory, on disk, or somewhere
31 * else.</p>
32 *
33 * @author <a href="mailto:Rafal.Krzewski@e-point.pl">Rafal Krzewski</a>
34 * @author <a href="mailto:dlr@collab.net">Daniel Rall</a>
35 * @author <a href="mailto:jvanzyl@apache.org">Jason van Zyl</a>
36 * @author <a href="mailto:jmcnally@collab.net">John McNally</a>
37 * @author <a href="mailto:martinc@apache.org">Martin Cooper</a>
38 * @author Sean C. Sullivan
39 *
40 * @version $Id: PortletFileUpload.java,v 1.1 2003/10/01 22:21:43 jsackett Exp $
41 */
42 public class PortletFileUpload
43 extends PortletFileUploadBase
44 {
45
46
47
48
49 /***
50 * The factory to use to create new form items.
51 */
52 private FileItemFactory fileItemFactory;
53
54
55
56
57
58 /***
59 * Constructs an instance of this class which uses the default factory to
60 * create <code>FileItem</code> instances.
61 *
62 * @see #PortletFileUpload(FileItemFactory)
63 */
64 public PortletFileUpload()
65 {
66 super();
67 }
68
69
70 /***
71 * Constructs an instance of this class which uses the supplied factory to
72 * create <code>FileItem</code> instances.
73 *
74 * @see #PortletFileUpload()
75 */
76 public PortletFileUpload(FileItemFactory fileItemFactory)
77 {
78 super();
79 this.fileItemFactory = fileItemFactory;
80 }
81
82
83
84
85
86 /***
87 * Returns the factory class used when creating file items.
88 *
89 * @return The factory class for new file items.
90 */
91 public FileItemFactory getFileItemFactory()
92 {
93 return fileItemFactory;
94 }
95
96
97 /***
98 * Sets the factory class to use when creating file items.
99 *
100 * @param factory The factory class for new file items.
101 */
102 public void setFileItemFactory(FileItemFactory factory)
103 {
104 this.fileItemFactory = factory;
105 }
106
107
108 }