KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ozoneDB > xml > cli > AbstractConfigurable


1 // You can redistribute this software and/or modify it under the terms of
2
// the Ozone Library License version 1 published by ozone-db.org.
3
//
4
// The original code and portions created by SMB are
5
// Copyright (C) 1997-@year@ by SMB GmbH. All rights reserved.
6
//
7
// $Id: AbstractConfigurable.java,v 1.1 2003/11/02 17:26:14 per_nyfelt Exp $
8

9 package org.ozoneDB.xml.cli;
10
11 import java.util.HashMap JavaDoc;
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 JavaDoc properties = null;
28
29     /**
30      * Zero-argument constructor.
31      */

32     public AbstractConfigurable() {
33         properties = new HashMap JavaDoc();
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 JavaDoc getProperty ( String JavaDoc name ) throws XMLDBException {
43         return (String JavaDoc) 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 JavaDoc name, String JavaDoc value )
53         throws XMLDBException {
54         properties.put( name, value );
55     }
56
57 }
58
Popular Tags