Code Search for Developers
 
 
  

ConfigPlugin.java from GridBlocks at Krugle


Show ConfigPlugin.java syntax highlighted

/*
 * Copyright (c) 2005
 * Helsinki Institute of Physics
 * see LICENSE file for details
 * 
 * ConfigPlugin.java
 * Created on Jan 22, 2005
 */
package fi.hip.gb.core.plugin;

import java.io.IOException;

import javax.swing.JComponent;

/**
 * Interface implemented by plugins which want
 * to have own panel in configurations.
 * <p>
 * Elements should have tooltips to help the user to 
 * understand the meaning of properties.
 * 
 * @author Juho Karppinen
 */
public interface ConfigPlugin {
    /**
     * Returns all the user interface components.
     * @return <code>JComponent</code>
     */
    public JComponent init();
    
    /**
     * Loads all the fields back to original values.
     */
    public void load();
    
    /**
     * Sets the current values of UI components to <code>Config</code>
	 * instance. The <code>Config.store()</code> is called
	 * afterwards by the plugin framework to save settings permanently.
	 * <p>
	 * This method should not fail if it contains invalid values.
	 * {@link ConfigPlugin#validate()} method is called  beforehand
	 * to ensure correctness.
	 * 
	 * @throws IOException if settings cannot be saved and saving
	 * should be canceled
     */
    public void save() throws IOException;

    /**
     * Tests if values entered are valid.
     * 
	 * @throws IOException if settings cannot be validated and values
	 * should not be saved.
     */
    public void validate() throws IOException;

    /**
     * Config UI will be closed. The plugin have to free all resources
     * and connections.
     */
    public void stop();
}




See more files for this project here

GridBlocks

GridBlocks builds a grid application framework via easy-to-use building blocks in distributed environment. The framework offers components for Grid security, distributed storage, computing, and Portlet web interfaces.

Project homepage: http://sourceforge.net/projects/gridblocks
Programming language(s): Java,JSP,XML
License: other

  ConfigPlugin.java