01: /*
02: * Copyright 1999,2004 The Apache Software Foundation.
03: *
04: * Licensed under the Apache License, Version 2.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.apache.org/licenses/LICENSE-2.0
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16:
17: package org.apache.catalina.deploy;
18:
19: import java.util.Hashtable;
20: import java.io.Serializable;
21:
22: /**
23: * Representation of additional parameters which will be used to initialize
24: * external resources defined in the web application deployment descriptor.
25: *
26: * @author Remy Maucherat
27: * @version $Revision: 1.4 $ $Date: 2004/05/13 20:40:49 $
28: */
29:
30: public class ResourceParams implements Serializable {
31:
32: // ------------------------------------------------------------- Properties
33:
34: /**
35: * The name of this resource parameters. Must be the name of the resource
36: * in the java: namespace.
37: */
38: private String name = null;
39:
40: public String getName() {
41: return (this .name);
42: }
43:
44: public void setName(String name) {
45: this .name = name;
46: }
47:
48: private Hashtable resourceParams = new Hashtable();
49:
50: public void addParameter(String name, String value) {
51: resourceParams.put(name, value);
52: }
53:
54: public Hashtable getParameters() {
55: return resourceParams;
56: }
57:
58: // --------------------------------------------------------- Public Methods
59:
60: /**
61: * Return a String representation of this object.
62: */
63: public String toString() {
64:
65: StringBuffer sb = new StringBuffer("ResourceParams[");
66: sb.append("name=");
67: sb.append(name);
68: sb.append(", parameters=");
69: sb.append(resourceParams.toString());
70: sb.append("]");
71: return (sb.toString());
72:
73: }
74:
75: // -------------------------------------------------------- Package Methods
76:
77: /**
78: * The NamingResources with which we are associated (if any).
79: */
80: protected NamingResources resources = null;
81:
82: public NamingResources getNamingResources() {
83: return (this .resources);
84: }
85:
86: void setNamingResources(NamingResources resources) {
87: this.resources = resources;
88: }
89:
90: }
|