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