1 package org.apache.turbine.services.upload; 2 3 18 19 import javax.servlet.http.HttpServletRequest ; 20 21 import org.apache.turbine.services.Service; 22 import org.apache.turbine.util.TurbineException; 23 import org.apache.turbine.util.parser.ParameterParser; 24 25 36 public interface UploadService 37 extends Service 38 { 39 42 String CONTENT_TYPE = "Content-type"; 43 44 47 String CONTENT_DISPOSITION = "Content-disposition"; 48 49 52 String MULTIPART = "multipart"; 53 54 57 String FORM_DATA = "form-data"; 58 59 62 String MIXED = "mixed"; 63 64 67 String MULTIPART_FORM_DATA = 68 MULTIPART + '/' + FORM_DATA; 69 70 73 String MULTIPART_MIXED = MULTIPART + '/' + MIXED; 74 75 79 String SERVICE_NAME = "UploadService"; 80 81 85 String AUTOMATIC_KEY = "automatic"; 86 87 96 boolean AUTOMATIC_DEFAULT = false; 97 98 102 String REPOSITORY_PARAMETER = "path"; 103 104 108 String REPOSITORY_KEY = "repository"; 109 110 116 String REPOSITORY_DEFAULT = "."; 117 118 122 String SIZE_MAX_KEY = "size.max"; 123 124 132 long SIZE_MAX_DEFAULT = 1048576; 133 134 138 String SIZE_THRESHOLD_KEY = "size.threshold"; 139 140 146 int SIZE_THRESHOLD_DEFAULT = 10240; 147 148 159 void parseRequest(HttpServletRequest req, 160 ParameterParser params, 161 String path) 162 throws TurbineException; 163 164 170 long getSizeMax(); 171 172 178 int getSizeThreshold(); 179 180 186 String getRepository(); 187 188 195 boolean getAutomatic(); 196 } 197 | Popular Tags |