KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > tapestry > parse > ParseMessages


1 // Copyright 2004, 2005 The Apache Software Foundation
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14

15 package org.apache.tapestry.parse;
16
17 import org.apache.hivemind.Resource;
18 import org.apache.hivemind.impl.MessageFormatter;
19
20 /**
21  * Localized messages for the org.apache.tapestry.parse package.
22  *
23  * @author Howard Lewis Ship
24  * @since 4.0
25  */

26 class ParseMessages
27 {
28     protected static MessageFormatter _formatter = new MessageFormatter(ParseMessages.class,
29             "ParseStrings");
30
31     static String JavaDoc commentNotEnded(int line)
32     {
33         return _formatter.format("comment-not-ended", new Integer JavaDoc(line));
34     }
35
36     static String JavaDoc unclosedUnknownTag(int line)
37     {
38         return _formatter.format("unclosed-unknown-tag", new Integer JavaDoc(line));
39     }
40
41     static String JavaDoc unclosedTag(String JavaDoc tagName, int line)
42     {
43         return _formatter.format("unclosed-tag", tagName, new Integer JavaDoc(line));
44     }
45
46     static String JavaDoc missingAttributeValue(String JavaDoc tagName, int line, String JavaDoc attributeName)
47     {
48         return _formatter.format(
49                 "missing-attribute-value",
50                 tagName,
51                 new Integer JavaDoc(line),
52                 attributeName);
53     }
54
55     static String JavaDoc componentMayNotBeIgnored(String JavaDoc tagName, int line)
56     {
57         return _formatter.format("component-may-not-be-ignored", tagName, new Integer JavaDoc(line));
58     }
59
60     static String JavaDoc componentIdInvalid(String JavaDoc tagName, int line, String JavaDoc jwcid)
61     {
62         return _formatter.format("component-id-invalid", tagName, new Integer JavaDoc(line), jwcid);
63     }
64
65     static String JavaDoc unknownComponentId(String JavaDoc tagName, int line, String JavaDoc jwcid)
66     {
67         return _formatter.format("unknown-component-id", tagName, new Integer JavaDoc(line), jwcid);
68     }
69
70     static String JavaDoc nestedIgnore(String JavaDoc tagName, int line)
71     {
72         return _formatter.format("nested-ignore", tagName, new Integer JavaDoc(line));
73     }
74
75     static String JavaDoc contentBlockMayNotBeIgnored(String JavaDoc tagName, int line)
76     {
77         return _formatter.format("content-block-may-not-be-ignored", tagName, new Integer JavaDoc(line));
78     }
79
80     static String JavaDoc contentBlockMayNotBeEmpty(String JavaDoc tagName, int line)
81     {
82         return _formatter.format("content-block-may-not-be-empty", tagName, new Integer JavaDoc(line));
83     }
84
85     static String JavaDoc incompleteCloseTag(int line)
86     {
87         return _formatter.format("incomplete-close-tag", new Integer JavaDoc(line));
88     }
89
90     static String JavaDoc improperlyNestedCloseTag(String JavaDoc tagName, int closeLine, String JavaDoc startTagName,
91             int startLine)
92     {
93         return _formatter.format("improperly-nested-close-tag", new Object JavaDoc[]
94         { tagName, new Integer JavaDoc(closeLine), startTagName, new Integer JavaDoc(startLine) });
95     }
96
97     static String JavaDoc unmatchedCloseTag(String JavaDoc tagName, int line)
98     {
99         return _formatter.format("unmatched-close-tag", tagName, new Integer JavaDoc(line));
100     }
101
102     static String JavaDoc failConvertBoolean(String JavaDoc value)
103     {
104         return _formatter.format("fail-convert-boolean", value);
105     }
106
107     static String JavaDoc failConvertDouble(String JavaDoc value)
108     {
109         return _formatter.format("fail-convert-double", value);
110     }
111
112     static String JavaDoc failConvertInt(String JavaDoc value)
113     {
114         return _formatter.format("fail-convert-int", value);
115     }
116
117     static String JavaDoc failConvertLong(String JavaDoc value)
118     {
119         return _formatter.format("fail-convert-long", value);
120     }
121
122     static String JavaDoc unableToCopy(String JavaDoc id)
123     {
124         return _formatter.format("unable-to-copy", id);
125     }
126
127     static String JavaDoc bothTypeAndCopyOf(String JavaDoc id)
128     {
129         return _formatter.format("both-type-and-copy-of", id);
130     }
131
132     static String JavaDoc missingTypeOrCopyOf(String JavaDoc id)
133     {
134         return _formatter.format("missing-type-or-copy-of", id);
135     }
136
137     static String JavaDoc frameworkLibraryIdIsReserved(String JavaDoc id)
138     {
139         return _formatter.format("framework-library-id-is-reserved", id);
140     }
141
142     static String JavaDoc incorrectDocumentType(String JavaDoc expected, String JavaDoc actual)
143     {
144         return _formatter.format("incorrect-document-type", expected, actual);
145     }
146
147     static String JavaDoc noAttributeAndBody(String JavaDoc attributeName, String JavaDoc elementName)
148     {
149         return _formatter.format("no-attribute-and-body", attributeName, elementName);
150     }
151
152     static String JavaDoc requiredExtendedAttribute(String JavaDoc elementName, String JavaDoc attributeName)
153     {
154         return _formatter.format("required-extended-attribute", elementName, attributeName);
155     }
156
157     static String JavaDoc invalidAttribute(String JavaDoc key, String JavaDoc value)
158     {
159         return _formatter.format(key, value);
160     }
161
162     static String JavaDoc missingResource(Resource resource)
163     {
164         return _formatter.format("missing-resource", resource);
165     }
166
167     static String JavaDoc errorReadingResource(Resource resource, Throwable JavaDoc cause)
168     {
169         return _formatter.format("error-reading-resource", resource, cause);
170     }
171
172     static String JavaDoc unknownPublicId(Resource resource, String JavaDoc publicId)
173     {
174         return _formatter.format("unknown-public-id", resource, publicId);
175     }
176
177     static String JavaDoc serviceElementNotSupported()
178     {
179         return _formatter.getMessage("service-element-not-supported");
180     }
181
182     static String JavaDoc rangeError(TemplateToken token, int length)
183     {
184         return _formatter.format("range-error", token, new Integer JavaDoc(length));
185     }
186 }
Popular Tags