KickJava   Java API By Example, From Geeks To Geeks.

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


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     public boolean getKnownComponent(String JavaDoc 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      * @throws org.apache.tapestry.ApplicationRuntimeException
38      * if no such component exists
39      */

40
41     public boolean getAllowBody(String JavaDoc componentId, Location location);
42
43     /**
44      * Used with implicit components to determine if the component allows a body or not.
45      *
46      * @param libraryId
47      * the specified library id, possibly null
48      * @param type
49      * the component type
50      * @throws org.apache.tapestry.ApplicationRuntimeException
51      * if the specification cannot be found
52      * @since 3.0
53      */

54
55     public boolean getAllowBody(String JavaDoc libraryId, String JavaDoc type, Location location);
56
57     /**
58      * Returns the name of the attribute used to indicate a component. The default is "jwcid", but
59      * this can be overriden in a number of ways.
60      */

61
62     public String JavaDoc getComponentAttributeName();
63 }
Popular Tags