|
1 |
| |
|
2 |
| |
|
3 |
| |
|
4 |
| |
|
5 |
| |
|
6 |
| |
|
7 |
| |
|
8 |
| |
|
9 |
| |
|
10 |
| |
|
11 |
| |
|
12 |
| |
|
13 |
| |
|
14 |
| |
|
15 |
| package org.apache.tapestry.multipart; |
|
16 |
| |
|
17 |
| import java.io.File; |
|
18 |
| |
|
19 |
| import org.apache.hivemind.impl.MessageFormatter; |
|
20 |
| |
|
21 |
| |
|
22 |
| |
|
23 |
| |
|
24 |
| |
|
25 |
| public class MultipartMessages |
|
26 |
| { |
|
27 |
| private final static MessageFormatter _formatter = new MessageFormatter(MultipartMessages.class); |
|
28 |
| |
|
29 |
0
| public static String unableToDecode(Throwable cause)
|
|
30 |
| { |
|
31 |
0
| return _formatter.format("unable-to-decode", cause);
|
|
32 |
| } |
|
33 |
| |
|
34 |
0
| static String unsupportedEncoding(String encoding, Throwable cause)
|
|
35 |
| { |
|
36 |
0
| return _formatter.format("unsupported-encoding", encoding, cause);
|
|
37 |
| } |
|
38 |
| |
|
39 |
0
| static String unableToOpenContentFile(UploadPart part, Throwable cause)
|
|
40 |
| { |
|
41 |
0
| return _formatter.format("unable-to-open-content-file", part.getFilePath(), cause);
|
|
42 |
| } |
|
43 |
| |
|
44 |
0
| static String writeFailure(File file, Throwable cause)
|
|
45 |
| { |
|
46 |
0
| return _formatter.format("write-failure", file, cause);
|
|
47 |
| } |
|
48 |
| |
|
49 |
| } |