1 |
| |
2 |
| |
3 |
| |
4 |
| |
5 |
| |
6 |
| |
7 |
| |
8 |
| |
9 |
| |
10 |
| |
11 |
| |
12 |
| |
13 |
| |
14 |
| |
15 |
| package org.apache.tapestry.engine; |
16 |
| |
17 |
| import java.util.List; |
18 |
| |
19 |
| import org.apache.hivemind.impl.MessageFormatter; |
20 |
| import org.apache.tapestry.IComponent; |
21 |
| import org.apache.tapestry.IPage; |
22 |
| |
23 |
| |
24 |
| |
25 |
| |
26 |
| |
27 |
| public class EngineMessages |
28 |
| { |
29 |
| private final static MessageFormatter _formatter = new MessageFormatter(EngineMessages.class); |
30 |
| |
31 |
2
| public static String serviceNoParameter(IEngineService service)
|
32 |
| { |
33 |
2
| return _formatter.format("service-no-parameter", service.getName());
|
34 |
| } |
35 |
| |
36 |
2
| public static String wrongComponentType(IComponent component, Class expectedType)
|
37 |
| { |
38 |
2
| return _formatter.format("wrong-component-type", component.getExtendedId(), expectedType
|
39 |
| .getName()); |
40 |
| } |
41 |
| |
42 |
5
| public static String requestStateSession(IComponent component)
|
43 |
| { |
44 |
5
| return _formatter.format("request-stale-session", component.getExtendedId());
|
45 |
| } |
46 |
| |
47 |
1
| public static String pageNotCompatible(IPage page, Class expectedType)
|
48 |
| { |
49 |
1
| return _formatter.format("page-not-compatible", page.getPageName(), expectedType.getName());
|
50 |
| } |
51 |
| |
52 |
0
| static String exceptionDuringCleanup(Throwable cause)
|
53 |
| { |
54 |
0
| return _formatter.format("exception-during-cleanup", cause);
|
55 |
| } |
56 |
| |
57 |
1
| static String validateCycle(List pageNames)
|
58 |
| { |
59 |
1
| StringBuffer buffer = new StringBuffer();
|
60 |
1
| int count = pageNames.size();
|
61 |
| |
62 |
1
| for (int i = 0; i < count; i++)
|
63 |
| { |
64 |
3
| if (i > 0)
|
65 |
2
| buffer.append("; ");
|
66 |
| |
67 |
3
| buffer.append(pageNames.get(i));
|
68 |
| } |
69 |
| |
70 |
1
| return _formatter.format("validate-cycle", buffer);
|
71 |
| } |
72 |
| } |