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 final class MultipartMessages |
26 | |
{ |
27 | 0 | private static final MessageFormatter _formatter = new MessageFormatter(MultipartMessages.class); |
28 | |
|
29 | |
|
30 | 0 | private MultipartMessages() { } |
31 | |
|
32 | |
public static String unableToDecode(Throwable cause) |
33 | |
{ |
34 | 0 | return _formatter.format("unable-to-decode", cause); |
35 | |
} |
36 | |
|
37 | |
static String unsupportedEncoding(String encoding, Throwable cause) |
38 | |
{ |
39 | 0 | return _formatter.format("unsupported-encoding", encoding, cause); |
40 | |
} |
41 | |
|
42 | |
static String unableToOpenContentFile(UploadPart part, Throwable cause) |
43 | |
{ |
44 | 0 | return _formatter.format("unable-to-open-content-file", part.getFilePath(), cause); |
45 | |
} |
46 | |
|
47 | |
static String writeFailure(File file, Throwable cause) |
48 | |
{ |
49 | 0 | return _formatter.format("write-failure", file, cause); |
50 | |
} |
51 | |
|
52 | |
} |