1
|
|
|
2
|
|
|
3
|
|
|
4
|
|
|
5
|
|
|
6
|
|
|
7
|
|
|
8
|
|
|
9
|
|
|
10
|
|
|
11
|
|
|
12
|
|
|
13
|
|
|
14
|
|
|
15
|
|
package org.apache.tapestry.services.impl;
|
16
|
|
|
17
|
|
import java.net.URL;
|
18
|
|
import java.util.ArrayList;
|
19
|
|
import java.util.Collection;
|
20
|
|
import java.util.List;
|
21
|
|
import java.util.Locale;
|
22
|
|
|
23
|
|
import javax.servlet.http.HttpServlet;
|
24
|
|
|
25
|
|
import org.apache.hivemind.HiveMind;
|
26
|
|
import org.apache.hivemind.Resource;
|
27
|
|
import org.apache.hivemind.impl.MessageFormatter;
|
28
|
|
import org.apache.tapestry.IComponent;
|
29
|
|
import org.apache.tapestry.INamespace;
|
30
|
|
import org.apache.tapestry.engine.IEngineService;
|
31
|
|
import org.apache.tapestry.services.Infrastructure;
|
32
|
|
import org.apache.tapestry.spec.IComponentSpecification;
|
33
|
|
import org.apache.tapestry.spec.IContainedComponent;
|
34
|
|
|
35
|
|
|
36
|
|
|
37
|
|
|
38
|
|
|
39
|
|
final class ImplMessages
|
40
|
|
{
|
41
|
|
private static final MessageFormatter _formatter = new MessageFormatter(ImplMessages.class,
|
42
|
|
"ImplStrings");
|
43
|
|
|
44
|
0
|
public static String initializerContribution()
|
45
|
|
{
|
46
|
0
|
return _formatter.getMessage("initializer-contribution");
|
47
|
|
}
|
48
|
|
|
49
|
18
|
public static String noApplicationSpecification(HttpServlet servlet)
|
50
|
|
{
|
51
|
18
|
return _formatter.format("no-application-specification", servlet.getServletName());
|
52
|
|
}
|
53
|
|
|
54
|
1
|
public static String errorInstantiatingEngine(Class engineClass, Throwable cause)
|
55
|
|
{
|
56
|
1
|
return _formatter.format("error-instantiating-engine", engineClass.getName(), cause);
|
57
|
|
}
|
58
|
|
|
59
|
1
|
public static String noTemplateForComponent(String componentId, Locale locale)
|
60
|
|
{
|
61
|
1
|
return _formatter.format("no-template-for-component", componentId, locale);
|
62
|
|
}
|
63
|
|
|
64
|
0
|
public static String noTemplateForPage(String pageName, Locale locale)
|
65
|
|
{
|
66
|
0
|
return _formatter.format("no-template-for-page", pageName, locale);
|
67
|
|
}
|
68
|
|
|
69
|
0
|
public static String unableToReadTemplate(Object template)
|
70
|
|
{
|
71
|
0
|
return _formatter.format("unable-to-read-template", template);
|
72
|
|
}
|
73
|
|
|
74
|
0
|
public static String unableToParseTemplate(Resource resource)
|
75
|
|
{
|
76
|
0
|
return _formatter.format("unable-to-parse-template", resource);
|
77
|
|
}
|
78
|
|
|
79
|
0
|
public static String unableToParseSpecification(Resource resource)
|
80
|
|
{
|
81
|
0
|
return _formatter.format("unable-to-parse-specification", resource);
|
82
|
|
}
|
83
|
|
|
84
|
0
|
public static String unableToReadInfrastructureProperty(String propertyName,
|
85
|
|
Infrastructure service, Throwable cause)
|
86
|
|
{
|
87
|
0
|
return _formatter.format(
|
88
|
|
"unable-to-read-infrastructure-property",
|
89
|
|
propertyName,
|
90
|
|
service,
|
91
|
|
cause);
|
92
|
|
}
|
93
|
|
|
94
|
0
|
public static String multipleComponentReferences(IComponent component, String id)
|
95
|
|
{
|
96
|
0
|
return _formatter.format("multiple-component-references", component.getExtendedId(), id);
|
97
|
|
}
|
98
|
|
|
99
|
1
|
public static String dupeComponentId(String id, IContainedComponent containedComponent)
|
100
|
|
{
|
101
|
1
|
return _formatter.format("dupe-component-id", id, HiveMind
|
102
|
|
.getLocationString(containedComponent));
|
103
|
|
}
|
104
|
|
|
105
|
0
|
public static String unbalancedCloseTags()
|
106
|
|
{
|
107
|
0
|
return _formatter.getMessage("unbalanced-close-tags");
|
108
|
|
}
|
109
|
|
|
110
|
1
|
public static String templateBindingForInformalParameter(IComponent loadComponent,
|
111
|
|
String parameterName, IComponent component)
|
112
|
|
{
|
113
|
1
|
return _formatter.format("template-binding-for-informal-parameter", loadComponent
|
114
|
|
.getExtendedId(), parameterName, component.getExtendedId());
|
115
|
|
}
|
116
|
|
|
117
|
1
|
public static String templateBindingForReservedParameter(IComponent loadComponent,
|
118
|
|
String parameterName, IComponent component)
|
119
|
|
{
|
120
|
1
|
return _formatter.format("template-binding-for-reserved-parameter", loadComponent
|
121
|
|
.getExtendedId(), parameterName, component.getExtendedId());
|
122
|
|
}
|
123
|
|
|
124
|
0
|
public static String missingComponentSpec(IComponent component, Collection ids)
|
125
|
|
{
|
126
|
0
|
StringBuffer buffer = new StringBuffer();
|
127
|
0
|
List idList = new ArrayList(ids);
|
128
|
0
|
int count = idList.size();
|
129
|
|
|
130
|
0
|
for (int i = 0; i < count; i++)
|
131
|
|
{
|
132
|
0
|
if (i > 0)
|
133
|
0
|
buffer.append(", ");
|
134
|
|
|
135
|
0
|
buffer.append(idList.get(i));
|
136
|
|
}
|
137
|
|
|
138
|
0
|
return _formatter.format("missing-component-spec", component.getExtendedId(), new Integer(
|
139
|
|
count), buffer.toString());
|
140
|
|
}
|
141
|
|
|
142
|
0
|
public static String bodylessComponent()
|
143
|
|
{
|
144
|
0
|
return _formatter.getMessage("bodyless-component");
|
145
|
|
}
|
146
|
|
|
147
|
1
|
public static String dupeTemplateBinding(String name, IComponent component,
|
148
|
|
IComponent loadComponent)
|
149
|
|
{
|
150
|
1
|
return _formatter.format(
|
151
|
|
"dupe-template-binding",
|
152
|
|
name,
|
153
|
|
component.getExtendedId(),
|
154
|
|
loadComponent.getExtendedId());
|
155
|
|
}
|
156
|
|
|
157
|
0
|
public static String unableToLoadProperties(URL url, Throwable cause)
|
158
|
|
{
|
159
|
0
|
return _formatter.format("unable-to-load-properties", url, cause);
|
160
|
|
}
|
161
|
|
|
162
|
2
|
public static String noSuchService(String name)
|
163
|
|
{
|
164
|
2
|
return _formatter.format("no-such-service", name);
|
165
|
|
}
|
166
|
|
|
167
|
2
|
public static String dupeService(String name, IEngineService existing)
|
168
|
|
{
|
169
|
2
|
return _formatter.format("dupe-service", name, HiveMind.getLocationString(existing));
|
170
|
|
}
|
171
|
|
|
172
|
1
|
public static String unableToParseExpression(String expression, Throwable cause)
|
173
|
|
{
|
174
|
1
|
return _formatter.format("unable-to-parse-expression", expression, cause);
|
175
|
|
}
|
176
|
|
|
177
|
3
|
public static String parsedExpression()
|
178
|
|
{
|
179
|
3
|
return _formatter.getMessage("parsed-expression");
|
180
|
|
}
|
181
|
|
|
182
|
2
|
public static String unableToReadExpression(String expression, Object target, Throwable cause)
|
183
|
|
{
|
184
|
2
|
return _formatter.format("unable-to-read-expression", expression, target, cause);
|
185
|
|
}
|
186
|
|
|
187
|
1
|
public static String unableToWriteExpression(String expression, Object target, Object value,
|
188
|
|
Throwable cause)
|
189
|
|
{
|
190
|
1
|
return _formatter.format("unable-to-write-expression", new Object[]
|
191
|
|
{ expression, target, value, cause });
|
192
|
|
}
|
193
|
|
|
194
|
1
|
public static String isConstantExpressionError(String expression, Exception ex)
|
195
|
|
{
|
196
|
1
|
return _formatter.format("is-constant-expression-error", expression, ex);
|
197
|
|
}
|
198
|
|
|
199
|
715
|
public static String templateParameterName(String name)
|
200
|
|
{
|
201
|
715
|
return _formatter.format("template-parameter-name", name);
|
202
|
|
}
|
203
|
|
|
204
|
191
|
public static String componentPropertySourceDescription(IComponentSpecification spec)
|
205
|
|
{
|
206
|
191
|
return _formatter.format("component-property-source-description", spec
|
207
|
|
.getSpecificationLocation());
|
208
|
|
}
|
209
|
|
|
210
|
95
|
public static String namespacePropertySourceDescription(INamespace namespace)
|
211
|
|
{
|
212
|
95
|
return _formatter
|
213
|
|
.format("namespace-property-source-description", namespace.getExtendedId());
|
214
|
|
}
|
215
|
|
}
|