001package org.apache.wiki.modules;
002
003import java.util.Collection;
004
005
006public interface ModuleManager {
007
008    /** Location of the property-files of plugins. (Each plugin should include this property-file in its jar-file) */
009    String PLUGIN_RESOURCE_LOCATION = "ini/jspwiki_module.xml";
010
011    /**
012     *  Returns true, if the given module is compatible with this version of JSPWiki.
013     *
014     *  @param info The module to check
015     *  @return True, if the module is compatible.
016     */
017    boolean checkCompatibility( WikiModuleInfo info );
018
019    /**
020     * Returns the {@link WikiModuleInfo} information about the provided moduleName.
021     *
022     * @param moduleName
023     * @return The wikiModuleInfo
024     */
025    WikiModuleInfo getModuleInfo( String moduleName );
026
027    /**
028     * Returns a collection of modules currently managed by this ModuleManager.  Each
029     * entry is an instance of the WikiModuleInfo class.  This method should return something
030     * which is safe to iterate over, even if the underlying collection changes.
031     *
032     * @return A Collection of WikiModuleInfo instances.
033     */
034    Collection< WikiModuleInfo > modules();
035
036}