KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > sun > enterprise > deployment > TagLibConfigurationDescriptor


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the License). You may not use this file except in
5  * compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * https://glassfish.dev.java.net/public/CDDLv1.0.html or
9  * glassfish/bootstrap/legal/CDDLv1.0.txt.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * Header Notice in each file and include the License file
15  * at glassfish/bootstrap/legal/CDDLv1.0.txt.
16  * If applicable, add the following below the CDDL Header,
17  * with the fields enclosed by brackets [] replaced by
18  * you own identifying information:
19  * "Portions Copyrighted [year] [name of copyright owner]"
20  *
21  * Copyright 2006 Sun Microsystems, Inc. All rights reserved.
22  */

23 package com.sun.enterprise.deployment;
24
25 import java.io.Serializable JavaDoc;
26
27 /**
28  * This descriptor represent the information about a tag library used in a
29  * web application.
30  *
31  * @author Danny Coward
32  */

33
34 public class TagLibConfigurationDescriptor implements Serializable JavaDoc {
35     private String JavaDoc uri;
36     private String JavaDoc location;
37     
38     /**
39      * Default constructor.
40      */

41     public TagLibConfigurationDescriptor() {
42     }
43     
44     /**
45      * Construct a tag library configuration with the given location and URI.
46      * @param the URI.
47      * @param the location.
48      */

49     public TagLibConfigurationDescriptor(String JavaDoc uri, String JavaDoc location) {
50     this.uri = uri;
51     this.location = location;
52     }
53     
54     /**
55      * Sets the URI of this tag lib.
56      * @param the URI of the tag library.
57      */

58     public void setTagLibURI(String JavaDoc uri) {
59         this.uri = uri;
60     }
61     
62     /**
63      * Return the URI of this tag lib.
64      * @return the URI of the tag library.
65      */

66     public String JavaDoc getTagLibURI() {
67     if (this.uri == null) {
68         this.uri = "";
69     }
70     return this.uri;
71     }
72     
73     /**
74      * Describe the location of the tag library file.
75      * @param the location of the tag library.
76      */

77     public void setTagLibLocation(String JavaDoc location) {
78         this.location = location;
79     }
80     
81     /**
82      * Describes the location of the tag library file.
83      * @return the location of the tag library.
84      */

85     public String JavaDoc getTagLibLocation() {
86     if (this.location == null) {
87         this.location = "";
88     }
89     return this.location;
90     }
91     
92     /**
93      * Return a formatted String representing my state.
94      */

95     public void print(StringBuffer JavaDoc toStringBuffer) {
96     toStringBuffer.append("TGLIB: ").append(uri).append(", ").append(location);
97     }
98     
99 }
100
Popular Tags