// Path: stecker-plugin-loader/src/main/java/org/meridor/stecker/interfaces/ClassLoaderAware.java
// public interface ClassLoaderAware {
// 
//     /**
//      * Returns class loader instance for plugin specified
//      *
//      * @param pluginName plugin name to process
//      * @return class loader instance or empty
//      */
//     Optional<ClassLoader> getClassLoader(String pluginName);
// 
// }
// 
// Path: stecker-plugin-loader/src/main/java/org/meridor/stecker/interfaces/ImplementationsAware.java
// public interface ImplementationsAware extends PluginImplementationsAware {
// 
// 
//     /**
//      * Returns a list of extension points having implementations in current plugin
//      *
//      * @param pluginName name of plugin to process
//      * @return a list of extension points
//      */
//     List<Class> getExtensionPoints(String pluginName);
// 
//     /**
//      * Returns classes implementing extension point
//      *
//      * @param pluginName     name of plugin to process
//      * @param extensionPoint extension point class
//      * @return a list of implementation classes
//      */
//     List<Class> getImplementations(String pluginName, Class extensionPoint);
// 
// }
// 
// Path: stecker-plugin-loader/src/main/java/org/meridor/stecker/interfaces/PluginsAware.java
// public interface PluginsAware {
// 
//     /**
//      * Returns information about plugin by its plugin name
//      *
//      * @param pluginName plugin name to process
//      * @return information about plugin or empty if not present
//      */
//     Optional<PluginMetadata> getPlugin(String pluginName);
// 
//     /**
//      * Returns a list of dependencies in the registry
//      *
//      * @return a list of dependencies
//      */
//     List<String> getPluginNames();
// 
// }
// 
// Path: stecker-plugin-loader/src/main/java/org/meridor/stecker/interfaces/ResourcesAware.java
// public interface ResourcesAware {
// 
//     /**
//      * Returns resources for specific plugin
//      *
//      * @param pluginName plugin name
//      * @return a list of resources
//      */
//     List<Path> getResources(String pluginName);
// 
//     /**
//      * Returns all resources
//      *
//      * @return a list of resources
//      */
//     List<Path> getResources();
// 
// }


import org.meridor.stecker.interfaces.ClassLoaderAware;
import org.meridor.stecker.interfaces.ImplementationsAware;
import org.meridor.stecker.interfaces.PluginsAware;
import org.meridor.stecker.interfaces.ResourcesAware;
import java.nio.file.Path;
import java.util.List;
package org.meridor.stecker;



/**
 * Stores all information about loaded plugins
 */
public interface PluginRegistry extends PluginsAware, ImplementationsAware, ResourcesAware, ClassLoaderAware {

    /**
     * Add extension point implementations to registry
     *
     * @param pluginMetadata        plugin metadata object
     * @param extensionPoint        extension point class
     * @param implementationClasses a list of implementation classes
     */
    void addImplementations(PluginMetadata pluginMetadata, Class extensionPoint, List<Class> implementationClasses);

    /**
     * Adds information about new plugin
     *
     * @param pluginMetadata plugin metadata object
     * @throws PluginException when another plugin provides the same virtual dependency
     */
    void addPlugin(PluginMetadata pluginMetadata) throws PluginException;

    /**
     * Add resources for specific plugin
     *
     * @param pluginMetadata plugin metadata object
     * @param resources      plugin resources
     */
    void addResources(PluginMetadata pluginMetadata, List<Path> resources);

    /**
     * Adds class loader instance for specific plugin
     *
     * @param pluginMetadata plugin metadata object
     * @param classLoader    class loader instance corresponding to current plugin
     */
// Path: stecker-plugin-loader/src/main/java/org/meridor/stecker/interfaces/ClassLoaderAware.java
// public interface ClassLoaderAware {
// 
//     /**
//      * Returns class loader instance for plugin specified
//      *
//      * @param pluginName plugin name to process
//      * @return class loader instance or empty
//      */
//     Optional<ClassLoader> getClassLoader(String pluginName);
// 
// }
// 
// Path: stecker-plugin-loader/src/main/java/org/meridor/stecker/interfaces/ImplementationsAware.java
// public interface ImplementationsAware extends PluginImplementationsAware {
// 
// 
//     /**
//      * Returns a list of extension points having implementations in current plugin
//      *
//      * @param pluginName name of plugin to process
//      * @return a list of extension points
//      */
//     List<Class> getExtensionPoints(String pluginName);
// 
//     /**
//      * Returns classes implementing extension point
//      *
//      * @param pluginName     name of plugin to process
//      * @param extensionPoint extension point class
//      * @return a list of implementation classes
//      */
//     List<Class> getImplementations(String pluginName, Class extensionPoint);
// 
// }
// 
// Path: stecker-plugin-loader/src/main/java/org/meridor/stecker/interfaces/PluginsAware.java
// public interface PluginsAware {
// 
//     /**
//      * Returns information about plugin by its plugin name
//      *
//      * @param pluginName plugin name to process
//      * @return information about plugin or empty if not present
//      */
//     Optional<PluginMetadata> getPlugin(String pluginName);
// 
//     /**
//      * Returns a list of dependencies in the registry
//      *
//      * @return a list of dependencies
//      */
//     List<String> getPluginNames();
// 
// }
// 
// Path: stecker-plugin-loader/src/main/java/org/meridor/stecker/interfaces/ResourcesAware.java
// public interface ResourcesAware {
// 
//     /**
//      * Returns resources for specific plugin
//      *
//      * @param pluginName plugin name
//      * @return a list of resources
//      */
//     List<Path> getResources(String pluginName);
// 
//     /**
//      * Returns all resources
//      *
//      * @return a list of resources
//      */
//     List<Path> getResources();
// 
// }


// Path: stecker-plugin-loader/src/main/java/org/meridor/stecker/PluginRegistry.java
import org.meridor.stecker.interfaces.ClassLoaderAware;
import org.meridor.stecker.interfaces.ImplementationsAware;
import org.meridor.stecker.interfaces.PluginsAware;
import org.meridor.stecker.interfaces.ResourcesAware;
import java.nio.file.Path;
import java.util.List;

package org.meridor.stecker;



/**
 * Stores all information about loaded plugins
 */
public interface PluginRegistry extends PluginsAware, ImplementationsAware, ResourcesAware, ClassLoaderAware {

    /**
     * Add extension point implementations to registry
     *
     * @param pluginMetadata        plugin metadata object
     * @param extensionPoint        extension point class
     * @param implementationClasses a list of implementation classes
     */
    void addImplementations(PluginMetadata pluginMetadata, Class extensionPoint, List<Class> implementationClasses);

    /**
     * Adds information about new plugin
     *
     * @param pluginMetadata plugin metadata object
     * @throws PluginException when another plugin provides the same virtual dependency
     */
    void addPlugin(PluginMetadata pluginMetadata) throws PluginException;

    /**
     * Add resources for specific plugin
     *
     * @param pluginMetadata plugin metadata object
     * @param resources      plugin resources
     */
    void addResources(PluginMetadata pluginMetadata, List<Path> resources);

    /**
     * Adds class loader instance for specific plugin
     *
     * @param pluginMetadata plugin metadata object
     * @param classLoader    class loader instance corresponding to current plugin
     */
    void addClassLoader(PluginMetadata pluginMetadata, ClassLoader classLoader);