001: /*
002: * Licensed to the Apache Software Foundation (ASF) under one or more
003: * contributor license agreements. See the NOTICE file distributed with
004: * this work for additional information regarding copyright ownership.
005: * The ASF licenses this file to You under the Apache License, Version 2.0
006: * (the "License"); you may not use this file except in compliance with
007: * the License. You may obtain a copy of the License at
008: *
009: * http://www.apache.org/licenses/LICENSE-2.0
010: *
011: * Unless required by applicable law or agreed to in writing, software
012: * distributed under the License is distributed on an "AS IS" BASIS,
013: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
014: * See the License for the specific language governing permissions and
015: * limitations under the License.
016: */
017:
018: package org.apache.catalina.deploy;
019:
020: import java.io.Serializable;
021: import java.util.Iterator;
022: import java.util.HashMap;
023:
024: /**
025: * Representation of an Context element
026: *
027: * @author Peter Rossbach (pero@apache.org)
028: * @version $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $
029: */
030:
031: public class ResourceBase implements Serializable {
032:
033: // ------------------------------------------------------------- Properties
034:
035: /**
036: * The description of this Context Element.
037: */
038: private String description = null;
039:
040: public String getDescription() {
041: return (this .description);
042: }
043:
044: public void setDescription(String description) {
045: this .description = description;
046: }
047:
048: /**
049: * The name of this context Element.
050: */
051: private String name = null;
052:
053: public String getName() {
054: return (this .name);
055: }
056:
057: public void setName(String name) {
058: this .name = name;
059: }
060:
061: /**
062: * The name of the EJB bean implementation class.
063: */
064: private String type = null;
065:
066: public String getType() {
067: return (this .type);
068: }
069:
070: public void setType(String type) {
071: this .type = type;
072: }
073:
074: /**
075: * Holder for our configured properties.
076: */
077: private HashMap properties = new HashMap();
078:
079: /**
080: * Return a configured property.
081: */
082: public Object getProperty(String name) {
083: return properties.get(name);
084: }
085:
086: /**
087: * Set a configured property.
088: */
089: public void setProperty(String name, Object value) {
090: properties.put(name, value);
091: }
092:
093: /**
094: * remove a configured property.
095: */
096: public void removeProperty(String name) {
097: properties.remove(name);
098: }
099:
100: /**
101: * List properties.
102: */
103: public Iterator listProperties() {
104: return properties.keySet().iterator();
105: }
106:
107: // -------------------------------------------------------- Package Methods
108:
109: /**
110: * The NamingResources with which we are associated (if any).
111: */
112: protected NamingResources resources = null;
113:
114: public NamingResources getNamingResources() {
115: return (this .resources);
116: }
117:
118: void setNamingResources(NamingResources resources) {
119: this.resources = resources;
120: }
121:
122: }
|