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 |
|
final class PageloadMessages |
31 |
|
{ |
32 |
2 |
private static final MessageFormatter _formatter = new MessageFormatter(PageloadMessages.class); |
33 |
|
|
34 |
|
|
35 |
|
private PageloadMessages() |
36 |
0 |
{ |
37 |
0 |
} |
38 |
|
|
39 |
|
static String parameterMustHaveNoDefaultValue(IComponent component, |
40 |
|
String name) |
41 |
|
{ |
42 |
0 |
return _formatter.format("parameter-must-have-no-default-value", |
43 |
|
component.getExtendedId(), name); |
44 |
|
} |
45 |
|
|
46 |
|
static String unableToInitializeProperty(String propertyName, |
47 |
|
IComponent component, Throwable cause) |
48 |
|
{ |
49 |
0 |
return _formatter.format("unable-to-initialize-property", propertyName, |
50 |
|
component, cause); |
51 |
|
} |
52 |
|
|
53 |
|
static String requiredParameterNotBound(String name, IComponent component) |
54 |
|
{ |
55 |
1 |
return _formatter.format("required-parameter-not-bound", name, |
56 |
|
component.getExtendedId()); |
57 |
|
} |
58 |
|
|
59 |
|
static String inheritInformalInvalidComponentFormalOnly(IComponent component) |
60 |
|
{ |
61 |
0 |
return _formatter.format( |
62 |
|
"inherit-informal-invalid-component-formal-only", component |
63 |
|
.getExtendedId()); |
64 |
|
} |
65 |
|
|
66 |
|
static String inheritInformalInvalidContainerFormalOnly( |
67 |
|
IComponent container, IComponent component) |
68 |
|
{ |
69 |
0 |
return _formatter.format( |
70 |
|
"inherit-informal-invalid-container-formal-only", container |
71 |
|
.getExtendedId(), component.getExtendedId()); |
72 |
|
} |
73 |
|
|
74 |
|
static String formalParametersOnly(IComponent component, |
75 |
|
String parameterName) |
76 |
|
{ |
77 |
0 |
return _formatter.format("formal-parameters-only", component |
78 |
|
.getExtendedId(), parameterName); |
79 |
|
} |
80 |
|
|
81 |
|
static String unableToInstantiateComponent(IComponent container, |
82 |
|
Throwable cause) |
83 |
|
{ |
84 |
0 |
return _formatter.format("unable-to-instantiate-component", container |
85 |
|
.getExtendedId(), cause); |
86 |
|
} |
87 |
|
|
88 |
|
static String classNotComponent(Class componentClass) |
89 |
|
{ |
90 |
0 |
return _formatter.format("class-not-component", componentClass |
91 |
|
.getName()); |
92 |
|
} |
93 |
|
|
94 |
|
static String unableToInstantiate(String className, Throwable cause) |
95 |
|
{ |
96 |
0 |
return _formatter.format("unable-to-instantiate", className, cause); |
97 |
|
} |
98 |
|
|
99 |
|
static String pageNotAllowed(String componentId) |
100 |
|
{ |
101 |
0 |
return _formatter.format("page-not-allowed", componentId); |
102 |
|
} |
103 |
|
|
104 |
|
static String classNotPage(Class componentClass) |
105 |
|
{ |
106 |
0 |
return _formatter.format("class-not-page", componentClass.getName()); |
107 |
|
} |
108 |
|
|
109 |
|
static String defaultParameterName(String name) |
110 |
|
{ |
111 |
0 |
return _formatter.format("default-parameter-name", name); |
112 |
|
} |
113 |
|
|
114 |
|
static String initializerName(String propertyName) |
115 |
|
{ |
116 |
0 |
return _formatter.format("initializer-name", propertyName); |
117 |
|
} |
118 |
|
|
119 |
|
static String parameterName(String name) |
120 |
|
{ |
121 |
2 |
return _formatter.format("parameter-name", name); |
122 |
|
} |
123 |
|
|
124 |
|
static String duplicateParameter(String parameterName, IBinding binding) |
125 |
|
{ |
126 |
1 |
return _formatter.format("duplicate-parameter", parameterName, HiveMind |
127 |
|
.getLocationString(binding)); |
128 |
|
} |
129 |
|
|
130 |
|
public static String usedParameterAlias(IContainedComponent contained, |
131 |
|
String name, String parameterName, Location bindingLocation) |
132 |
|
{ |
133 |
1 |
return _formatter.format("used-parameter-alias", new Object[] { |
134 |
|
HiveMind.getLocationString(bindingLocation), |
135 |
|
contained.getType(), name, parameterName }); |
136 |
|
} |
137 |
|
|
138 |
|
public static String deprecatedParameter(String parameterName, |
139 |
|
Location location, String componentType) |
140 |
|
{ |
141 |
1 |
return _formatter.format("deprecated-parameter", parameterName, |
142 |
|
HiveMind.getLocationString(location), componentType); |
143 |
|
} |
144 |
|
|
145 |
|
public static String componentNotFound(String id) |
146 |
|
{ |
147 |
0 |
return _formatter.format("component-not-found", id); |
148 |
|
} |
149 |
|
|
150 |
|
public static String recursiveComponent(IComponent component) |
151 |
|
{ |
152 |
0 |
return _formatter.format("recursive-component", component); |
153 |
|
} |
154 |
|
|
155 |
|
public static String errorPagePoolGet(Object key) |
156 |
|
{ |
157 |
0 |
return _formatter.format("error-page-pool-borrow", key); |
158 |
|
} |
159 |
|
} |