KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > facelets > tag > TagLibrary


1 /**
2  * Licensed under the Common Development and Distribution License,
3  * you may not use this file except in compliance with the License.
4  * You may obtain a copy of the License at
5  *
6  * http://www.sun.com/cddl/
7  *
8  * Unless required by applicable law or agreed to in writing, software
9  * distributed under the License is distributed on an "AS IS" BASIS,
10  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
11  * implied. See the License for the specific language governing
12  * permissions and limitations under the License.
13  */

14
15 package com.sun.facelets.tag;
16
17 import java.lang.reflect.Method JavaDoc;
18
19 import javax.faces.FacesException;
20
21 /**
22  * A library of Tags associated with one or more namespaces.
23  *
24  * @author Jacob Hookom
25  * @version $Id: TagLibrary.java,v 1.2 2005/08/24 04:38:48 jhook Exp $
26  */

27 public interface TagLibrary {
28
29     /**
30      * If this library contains the passed namespace
31      *
32      * @param ns
33      * namespace
34      * @return true if the namespace is used in this library
35      */

36     public boolean containsNamespace(String JavaDoc ns);
37
38     /**
39      * If this library contains a TagHandler for the namespace and local name
40      *
41      * @param ns
42      * namespace
43      * @param localName
44      * local name
45      * @return true if handled by this library
46      */

47     public boolean containsTagHandler(String JavaDoc ns, String JavaDoc localName);
48
49     /**
50      * Create a new instance of a TagHandler, using the passed TagConfig
51      *
52      * @param ns
53      * namespace
54      * @param localName
55      * local name
56      * @param tag
57      * configuration information
58      * @return a new TagHandler instance
59      * @throws FacesException
60      */

61     public TagHandler createTagHandler(String JavaDoc ns, String JavaDoc localName,
62             TagConfig tag) throws FacesException;
63
64     /**
65      * If this library contains the specified function name
66      *
67      * @param ns namespace
68      * @param name function name
69      * @return true if handled
70      */

71     public boolean containsFunction(String JavaDoc ns, String JavaDoc name);
72
73     /**
74      * Return a Method instance for the passed namespace and name
75      *
76      * @param ns namespace
77      * @param name function name
78      * @return
79      */

80     public Method JavaDoc createFunction(String JavaDoc ns, String JavaDoc name);
81 }
82
Popular Tags