Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||||
ITemplateParserDelegate |
|
| 1.0;1 |
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.Location; |
|
18 | ||
19 | /** |
|
20 | * Provides a {@link TemplateParser}with additional information about dynamic components. |
|
21 | * |
|
22 | * @author Howard Lewis Ship |
|
23 | */ |
|
24 | ||
25 | public interface ITemplateParserDelegate |
|
26 | { |
|
27 | /** |
|
28 | * Returns true if the component id is valid, false if the component id is not recognized. |
|
29 | */ |
|
30 | ||
31 | boolean getKnownComponent(String componentId); |
|
32 | ||
33 | /** |
|
34 | * Returns true if the specified component allows a body, false otherwise. The parser uses this |
|
35 | * information to determine if it should ignore the body of a tag. |
|
36 | */ |
|
37 | ||
38 | boolean getAllowBody(String componentId, Location location); |
|
39 | ||
40 | /** |
|
41 | * Used with implicit components to determine if the component allows a body or not. |
|
42 | * |
|
43 | * @param libraryId |
|
44 | * the specified library id, possibly null |
|
45 | * @param type |
|
46 | * the component type |
|
47 | * @since 3.0 |
|
48 | */ |
|
49 | ||
50 | boolean getAllowBody(String libraryId, String type, Location location); |
|
51 | ||
52 | /** |
|
53 | * Returns the name of the attribute used to indicate a component. The default is "jwcid", but |
|
54 | * this can be overriden in a number of ways. |
|
55 | */ |
|
56 | ||
57 | String getComponentAttributeName(); |
|
58 | } |