KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > ozoneDB > core > storage > PropertyConfigurable


1 // You can redistribute this software and/or modify it under the terms of
2
// the Ozone Core License version 1 published by ozone-db.org.
3
//
4
// Copyright (C) 2003-@year@, Leo Mekenkamp. All rights reserved.
5
//
6
// $Id: PropertyConfigurable.java,v 1.1 2004/01/01 20:29:29 leomekenkamp Exp $
7

8 package org.ozoneDB.core.storage;
9
10 import java.lang.reflect.Constructor JavaDoc;
11 import java.lang.reflect.InvocationTargetException JavaDoc;
12 import java.util.Collection JavaDoc;
13 import java.util.List JavaDoc;
14 import java.util.Properties JavaDoc;
15 import org.ozoneDB.core.ConfigurationException;
16
17 /**
18  * <p>All classes implementing this interface <i>must</i> provide a public constructor
19  * that has one <code>Properties</code> instance, and a <code>String</code> as
20  * its only parameters. The string is the prefix this instance should use to
21  * get its settings from the properties.</p>
22  * <p>Example:<pre>
23  *
24  * class Foo {
25  * public Foo(Properties properties, String prefix);
26  * // ...
27  * }
28  *
29  * Properties properties;
30  * // ...
31  * Foo foo = new Foo(properties, "org.ozoneDB.bar");
32  * </pre></p>
33  * <p>If the <code>Foo</code> class has a property ".directory", then the
34  * constructor will call <code>properties.getProperty(prefix + ".directory")</code>.</p>
35  *
36  * @author <a HREF="mailto:leoATmekenkampD0Tcom">Leo Mekenkamp (mind the anti sp@m)</a>
37  * @version $Id: PropertyConfigurable.java,v 1.1 2004/01/01 20:29:29 leomekenkamp Exp $
38  */

39 public interface PropertyConfigurable {
40     
41     /**
42      * <p>Returns a <code>Collection</code> with all the properties this instance
43      * supports.</p>
44      *
45      * @return Collection with <code>PropertyInfo</code> elements
46      */

47     public Collection JavaDoc getPropertyInfos();
48
49     public String JavaDoc getPrefix();
50 }
51
Popular Tags