1 |
| |
2 |
| |
3 |
| |
4 |
| |
5 |
| |
6 |
| |
7 |
| |
8 |
| |
9 |
| |
10 |
| |
11 |
| |
12 |
| |
13 |
| |
14 |
| |
15 |
| package org.apache.tapestry.pageload; |
16 |
| |
17 |
| import org.apache.hivemind.HiveMind; |
18 |
| import org.apache.hivemind.Location; |
19 |
| import org.apache.hivemind.impl.MessageFormatter; |
20 |
| import org.apache.tapestry.IBinding; |
21 |
| import org.apache.tapestry.IComponent; |
22 |
| import org.apache.tapestry.spec.IContainedComponent; |
23 |
| |
24 |
| |
25 |
| |
26 |
| |
27 |
| |
28 |
| |
29 |
| |
30 |
| class PageloadMessages |
31 |
| { |
32 |
| protected static MessageFormatter _formatter = new MessageFormatter(PageloadMessages.class, |
33 |
| "PageloadStrings"); |
34 |
| |
35 |
0
| static String parameterMustHaveNoDefaultValue(IComponent component, String name)
|
36 |
| { |
37 |
0
| return _formatter.format(
|
38 |
| "parameter-must-have-no-default-value", |
39 |
| component.getExtendedId(), |
40 |
| name); |
41 |
| } |
42 |
| |
43 |
0
| static String unableToInitializeProperty(String propertyName, IComponent component,
|
44 |
| Throwable cause) |
45 |
| { |
46 |
0
| return _formatter.format("unable-to-initialize-property", propertyName, component, cause);
|
47 |
| } |
48 |
| |
49 |
1
| static String requiredParameterNotBound(String name, IComponent component)
|
50 |
| { |
51 |
1
| return _formatter.format("required-parameter-not-bound", name, component.getExtendedId());
|
52 |
| } |
53 |
| |
54 |
1
| static String inheritInformalInvalidComponentFormalOnly(IComponent component)
|
55 |
| { |
56 |
1
| return _formatter.format("inherit-informal-invalid-component-formal-only", component
|
57 |
| .getExtendedId()); |
58 |
| } |
59 |
| |
60 |
1
| static String inheritInformalInvalidContainerFormalOnly(IComponent container,
|
61 |
| IComponent component) |
62 |
| { |
63 |
1
| return _formatter.format("inherit-informal-invalid-container-formal-only", container
|
64 |
| .getExtendedId(), component.getExtendedId()); |
65 |
| } |
66 |
| |
67 |
0
| static String formalParametersOnly(IComponent component, String parameterName)
|
68 |
| { |
69 |
0
| return _formatter
|
70 |
| .format("formal-parameters-only", component.getExtendedId(), parameterName); |
71 |
| } |
72 |
| |
73 |
0
| static String unableToInstantiateComponent(IComponent container, Throwable cause)
|
74 |
| { |
75 |
0
| return _formatter.format(
|
76 |
| "unable-to-instantiate-component", |
77 |
| container.getExtendedId(), |
78 |
| cause); |
79 |
| } |
80 |
| |
81 |
1
| static String classNotComponent(Class componentClass)
|
82 |
| { |
83 |
1
| return _formatter.format("class-not-component", componentClass.getName());
|
84 |
| } |
85 |
| |
86 |
0
| static String unableToInstantiate(String className, Throwable cause)
|
87 |
| { |
88 |
0
| return _formatter.format("unable-to-instantiate", className, cause);
|
89 |
| } |
90 |
| |
91 |
0
| static String pageNotAllowed(String componentId)
|
92 |
| { |
93 |
0
| return _formatter.format("page-not-allowed", componentId);
|
94 |
| } |
95 |
| |
96 |
1
| static String classNotPage(Class componentClass)
|
97 |
| { |
98 |
1
| return _formatter.format("class-not-page", componentClass.getName());
|
99 |
| } |
100 |
| |
101 |
473
| static String defaultParameterName(String name)
|
102 |
| { |
103 |
473
| return _formatter.format("default-parameter-name", name);
|
104 |
| } |
105 |
| |
106 |
0
| static String initializerName(String propertyName)
|
107 |
| { |
108 |
0
| return _formatter.format("initializer-name", propertyName);
|
109 |
| } |
110 |
| |
111 |
508
| static String parameterName(String name)
|
112 |
| { |
113 |
508
| return _formatter.format("parameter-name", name);
|
114 |
| } |
115 |
| |
116 |
1
| static String duplicateParameter(String parameterName, IBinding binding)
|
117 |
| { |
118 |
1
| return _formatter.format("duplicate-parameter", parameterName, HiveMind
|
119 |
| .getLocationString(binding)); |
120 |
| } |
121 |
| |
122 |
1
| public static String usedParameterAlias(IContainedComponent contained, String name,
|
123 |
| String parameterName, Location bindingLocation) |
124 |
| { |
125 |
1
| return _formatter.format("used-parameter-alias", new Object[]
|
126 |
| { HiveMind.getLocationString(bindingLocation), contained.getType(), name, parameterName }); |
127 |
| } |
128 |
| |
129 |
1
| public static String deprecatedParameter(String parameterName, Location location,
|
130 |
| String componentType) |
131 |
| { |
132 |
1
| return _formatter.format("deprecated-parameter", parameterName, HiveMind
|
133 |
| .getLocationString(location), componentType); |
134 |
| } |
135 |
| |
136 |
| } |