01: /*
02: * Licensed to the Apache Software Foundation (ASF) under one or more
03: * contributor license agreements. See the NOTICE file distributed with
04: * this work for additional information regarding copyright ownership.
05: * The ASF licenses this file to You under the Apache License, Version 2.0
06: * (the "License"); you may not use this file except in compliance with
07: * the License. You may obtain a copy of the License at
08: *
09: * 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: package org.apache.catalina.deploy;
19:
20: import java.io.Serializable;
21: import java.util.HashMap;
22: import java.util.Iterator;
23:
24: /**
25: * Representation of an application resource reference, as represented in
26: * an <code><res-env-refy></code> element in the deployment descriptor.
27: *
28: * @author Craig R. McClanahan
29: * @version $Revision: 467222 $ $Date: 2006-10-24 05:17:11 +0200 (mar., 24 oct. 2006) $
30: */
31:
32: public class ContextTransaction implements Serializable {
33:
34: // ------------------------------------------------------------- Properties
35:
36: /**
37: * Holder for our configured properties.
38: */
39: private HashMap properties = new HashMap();
40:
41: /**
42: * Return a configured property.
43: */
44: public Object getProperty(String name) {
45: return properties.get(name);
46: }
47:
48: /**
49: * Set a configured property.
50: */
51: public void setProperty(String name, Object value) {
52: properties.put(name, value);
53: }
54:
55: /**
56: * remove a configured property.
57: */
58: public void removeProperty(String name) {
59: properties.remove(name);
60: }
61:
62: /**
63: * List properties.
64: */
65: public Iterator listProperties() {
66: return properties.keySet().iterator();
67: }
68:
69: // --------------------------------------------------------- Public Methods
70:
71: /**
72: * Return a String representation of this object.
73: */
74: public String toString() {
75:
76: StringBuffer sb = new StringBuffer("Transaction[");
77: sb.append("]");
78: return (sb.toString());
79:
80: }
81:
82: // -------------------------------------------------------- Package Methods
83:
84: /**
85: * The NamingResources with which we are associated (if any).
86: */
87: protected NamingResources resources = null;
88:
89: public NamingResources getNamingResources() {
90: return (this .resources);
91: }
92:
93: void setNamingResources(NamingResources resources) {
94: this.resources = resources;
95: }
96:
97: }
|