01: // You can redistribute this software and/or modify it under the terms of
02: // the Ozone Library License version 1 published by ozone-db.org.
03: //
04: // The original code and portions created by SMB are
05: // Copyright (C) 1997-@year@ by SMB GmbH. All rights reserved.
06: //
07: // $Id: AbstractConfigurable.java,v 1.1 2001/12/18 11:03:24 per_nyfelt Exp $
08:
09: package org.ozoneDB.xml.cli;
10:
11: import java.util.HashMap;
12:
13: import org.xmldb.api.base.Configurable;
14: import org.xmldb.api.base.XMLDBException;
15:
16: /**
17: *
18: * @author <a href="http://www.smb-tec.com">SMB</a>
19: * @version $Revision: 1.1 $
20: */
21: public abstract class AbstractConfigurable implements Configurable {
22:
23: //
24: // data
25: //
26:
27: private HashMap properties = null;
28:
29: /**
30: * Zero-argument constructor.
31: */
32: public AbstractConfigurable() {
33: properties = new HashMap();
34: }
35:
36: /**
37: * Returns the value of the provided property.
38: *
39: * @param name The name of the property.
40: * @return The String value of the provided property.
41: */
42: public String getProperty(String name) throws XMLDBException {
43: return (String) properties.get(name);
44: }
45:
46: /**
47: * Stores the provided pair of property name and property value.
48: *
49: * @param name The name of property.
50: * @param value The String value of the provided property.
51: */
52: public synchronized void setProperty(String name, String value)
53: throws XMLDBException {
54: properties.put(name, value);
55: }
56:
57: }
|