001/*
002 * ConfigurationLoader.java
003 *
004 * Created on 28. April 2002, 14:41
005 */
006
007package org.jconfig;
008
009import java.util.HashMap;
010import java.util.Vector;
011/**
012 * This interface defines all methods that must be implemented 
013 * by all Handler classes.
014 *
015 * @author  Andreas Mecky andreas.mecky@xcom.de
016 * @author Terry Dye terry.dye@xcom.de
017 */
018public interface ConfigurationHandler {
019
020    /**
021     * This method is used to send any parameters from
022     * the ConfigurationManager to the particular handler.
023     *
024     * @param parameters a <code>HashMap</code> that contains all
025     * parmaters as a key value pair.
026     */
027    public void initialize(HashMap parameters);
028    
029    /**
030     * This method should read the configuration and then
031     * set the categories and properties.
032     * @throws ConfigurationManagerException  */
033    public void load() throws ConfigurationManagerException;
034    
035    /**
036     * This method should return a <code>Vector</code> of all
037     * categories. The category names must be stored as <code>Strings</code>
038     * inside the <code>Vector</code>.
039     *
040     * @return all categories inside a <code>Vector</code>
041     */
042    public Vector getCategories();
043    
044    /**
045     * This method should return all properties that was read
046     * by the particular handler.<BR />
047     * The key for the properties are build like:<BR />
048     * category/property name.
049     *
050     * @return a <code>HashMap</code> with all properties.
051     */
052    public HashMap getProperties();
053    
054    /**
055     * This method should store all categories and properties.
056     * @throws ConfigurationManagerException  */
057    public void store() throws ConfigurationManagerException;
058}
059