/*
 * ApplicationContext.java  $Revision: 1.7 $  $Date: 2007/10/03 04:39:39 $
 *
 * Copyright (C) 2007 Meldcraft Corporation
 *
 * This file is part of Scaffold.
 * 
 * Scaffold is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 * 
 * Scaffold is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 * 
 * You should have received a copy of the GNU Lesser General Public License
 * along with Scaffold.  If not, see <http://www.gnu.org/licenses/>.
 */

package com.meldcraft.application;


import java.util.Map;
import java.util.logging.Logger;

/**
 * @version $Revision: 1.7 $ $Date: 2007/10/03 04:39:39 $
 * @author Rob Richards
 */
public interface ApplicationContext
{
    /** Returns the application for this context. */
    public Application getApplication();

    /** Returns the configuration for this context. */
    public Map getConfiguration();

    /** Returns the logger for this context. */
    public Logger getLogger();

    /** Returns an object by name */
    public ApplicationElementManager getElementManager();

    /**
     * Sets the transient value for key and notifies all ApplicationContextListeners;
     * a null value is allowed.
     */
    public void contextChanged(Object key, Object value);

    /** Adds the ApplicationContextListener. */
    public void addApplicationContextListener(ApplicationContextListener listener);

    /** Removes the ApplicationContextListener. */
    public boolean removeApplicationContextListener(ApplicationContextListener listener);

    /** Adds the ApplicationContextListener. */
    public void addApplicationContextListener(ApplicationContextListener listener, Object key);

    /** Removes the ApplicationContextListener. */
    public boolean removeApplicationContextListener(ApplicationContextListener listener, Object key);
}
