1 | |
|
2 | |
|
3 | |
|
4 | |
|
5 | |
|
6 | |
|
7 | |
package org.mule.transport.file.i18n; |
8 | |
|
9 | |
import org.mule.api.endpoint.EndpointURI; |
10 | |
import org.mule.api.endpoint.InboundEndpoint; |
11 | |
import org.mule.api.transport.Connector; |
12 | |
import org.mule.config.i18n.Message; |
13 | |
import org.mule.config.i18n.MessageFactory; |
14 | |
|
15 | |
import java.io.File; |
16 | |
|
17 | 0 | public class FileMessages extends MessageFactory |
18 | |
{ |
19 | 0 | private static final FileMessages factory = new FileMessages(); |
20 | |
|
21 | 0 | private static final String BUNDLE_PATH = getBundlePath("file"); |
22 | |
|
23 | |
public static Message errorWhileListingFiles() |
24 | |
{ |
25 | 0 | return factory.createMessage(BUNDLE_PATH, 1); |
26 | |
} |
27 | |
|
28 | |
public static Message exceptionWhileProcessing(String name, String string) |
29 | |
{ |
30 | 0 | return factory.createMessage(BUNDLE_PATH, 2, name, string); |
31 | |
} |
32 | |
|
33 | |
public static Message failedToDeleteFile(File file) |
34 | |
{ |
35 | 0 | return factory.createMessage(BUNDLE_PATH, 3, file.getAbsolutePath()); |
36 | |
} |
37 | |
|
38 | |
public static Message failedToMoveFile(String from, String to) |
39 | |
{ |
40 | 0 | return factory.createMessage(BUNDLE_PATH, 4, from, to); |
41 | |
} |
42 | |
|
43 | |
public static Message moveToDirectoryNotWritable() |
44 | |
{ |
45 | 0 | return factory.createMessage(BUNDLE_PATH, 5); |
46 | |
} |
47 | |
|
48 | |
public static Message invalidFileFilter(EndpointURI endpointURI) |
49 | |
{ |
50 | 0 | return factory.createMessage(BUNDLE_PATH, 6, endpointURI); |
51 | |
} |
52 | |
|
53 | |
public static Message fileDoesNotExist(String string) |
54 | |
{ |
55 | 0 | return factory.createMessage(BUNDLE_PATH, 7, string); |
56 | |
} |
57 | |
|
58 | |
public static Message invalidFilter(Object filter) |
59 | |
{ |
60 | 0 | return factory.createMessage(BUNDLE_PATH, 8, filter.getClass().getName()); |
61 | |
} |
62 | |
|
63 | |
} |
64 | |
|
65 | |
|