KickJava   Java API By Example, From Geeks To Geeks.

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


1 /*
2  * Licensed to the Apache Software Foundation (ASF) under one or more
3  * contributor license agreements. See the NOTICE file distributed with
4  * this work for additional information regarding copyright ownership.
5  * The ASF licenses this file to You under the Apache License, Version 2.0
6  * (the "License"); you may not use this file except in compliance with
7  * the License. You may obtain a copy of the License at
8  *
9  * http://www.apache.org/licenses/LICENSE-2.0
10  *
11  * Unless required by applicable law or agreed to in writing, software
12  * distributed under the License is distributed on an "AS IS" BASIS,
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14  * See the License for the specific language governing permissions and
15  * limitations under the License.
16  */

17
18
19 package org.apache.catalina.deploy;
20
21 import java.io.Serializable JavaDoc;
22 import java.util.Iterator JavaDoc;
23 import java.util.HashMap JavaDoc;
24
25
26 /**
27  * Representation of an Context element
28  *
29  * @author Peter Rossbach (pero@apache.org)
30  * @version $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $
31  */

32
33 public class ResourceBase implements Serializable JavaDoc {
34
35
36     // ------------------------------------------------------------- Properties
37

38
39     /**
40      * The description of this Context Element.
41      */

42     private String JavaDoc description = null;
43
44     public String JavaDoc getDescription() {
45         return (this.description);
46     }
47
48     public void setDescription(String JavaDoc description) {
49         this.description = description;
50     }
51
52
53
54     /**
55      * The name of this context Element.
56      */

57     private String JavaDoc name = null;
58
59     public String JavaDoc getName() {
60         return (this.name);
61     }
62
63     public void setName(String JavaDoc name) {
64         this.name = name;
65     }
66
67
68     /**
69      * The name of the EJB bean implementation class.
70      */

71     private String JavaDoc type = null;
72
73     public String JavaDoc getType() {
74         return (this.type);
75     }
76
77     public void setType(String JavaDoc type) {
78         this.type = type;
79     }
80
81
82     /**
83      * Holder for our configured properties.
84      */

85     private HashMap JavaDoc properties = new HashMap JavaDoc();
86
87     /**
88      * Return a configured property.
89      */

90     public Object JavaDoc getProperty(String JavaDoc name) {
91         return properties.get(name);
92     }
93
94     /**
95      * Set a configured property.
96      */

97     public void setProperty(String JavaDoc name, Object JavaDoc value) {
98         properties.put(name, value);
99     }
100
101     /**
102      * remove a configured property.
103      */

104     public void removeProperty(String JavaDoc name) {
105         properties.remove(name);
106     }
107
108     /**
109      * List properties.
110      */

111     public Iterator JavaDoc listProperties() {
112         return properties.keySet().iterator();
113     }
114     
115     
116     // -------------------------------------------------------- Package Methods
117

118
119     /**
120      * The NamingResources with which we are associated (if any).
121      */

122     protected NamingResources resources = null;
123
124     public NamingResources getNamingResources() {
125         return (this.resources);
126     }
127
128     void setNamingResources(NamingResources resources) {
129         this.resources = resources;
130     }
131
132
133 }
134
Popular Tags