KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > apache > catalina > deploy > ResourceParams


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

27
28
29 package org.apache.catalina.deploy;
30
31 import java.util.Hashtable JavaDoc;
32 import java.io.Serializable JavaDoc;
33
34 /**
35  * Representation of additional parameters which will be used to initialize
36  * external resources defined in the web application deployment descriptor.
37  *
38  * @author Remy Maucherat
39  * @version $Revision: 1.2 $ $Date: 2005/12/08 01:27:42 $
40  */

41
42 public class ResourceParams implements Serializable JavaDoc {
43
44
45     // ------------------------------------------------------------- Properties
46

47
48     /**
49      * The name of this resource parameters. Must be the name of the resource
50      * in the java: namespace.
51      */

52     private String JavaDoc name = null;
53
54     public String JavaDoc getName() {
55         return (this.name);
56     }
57
58     public void setName(String JavaDoc name) {
59         this.name = name;
60     }
61
62     private Hashtable JavaDoc resourceParams = new Hashtable JavaDoc();
63
64     public void addParameter(String JavaDoc name, String JavaDoc value) {
65         resourceParams.put(name, value);
66     }
67
68     public Hashtable JavaDoc getParameters() {
69         return resourceParams;
70     }
71
72     // --------------------------------------------------------- Public Methods
73

74
75     /**
76      * Return a String representation of this object.
77      */

78     public String JavaDoc toString() {
79
80         StringBuffer JavaDoc sb = new StringBuffer JavaDoc("ResourceParams[");
81         sb.append("name=");
82         sb.append(name);
83         sb.append(", parameters=");
84         sb.append(resourceParams.toString());
85         sb.append("]");
86         return (sb.toString());
87
88     }
89
90
91     // -------------------------------------------------------- Package Methods
92

93
94     /**
95      * The NamingResources with which we are associated (if any).
96      */

97     protected NamingResources resources = null;
98
99     public NamingResources getNamingResources() {
100         return (this.resources);
101     }
102
103     void setNamingResources(NamingResources resources) {
104         this.resources = resources;
105     }
106
107
108 }
109
Popular Tags