renamed PluginWrapper to InstalledPlugin

This commit is contained in:
Sebastian Sdorra
2019-08-20 07:54:00 +02:00
parent 056a81d9f9
commit ae19ad9327
20 changed files with 98 additions and 98 deletions

View File

@@ -85,7 +85,7 @@ public class DefaultPluginLoader implements PluginLoader
* @param installedPlugins
*/
public DefaultPluginLoader(ServletContext servletContext, ClassLoader parent,
Set<PluginWrapper> installedPlugins)
Set<InstalledPlugin> installedPlugins)
{
this.installedPlugins = installedPlugins;
this.uberClassLoader = new UberClassLoader(parent, installedPlugins);
@@ -141,7 +141,7 @@ public class DefaultPluginLoader implements PluginLoader
* @return
*/
@Override
public Collection<PluginWrapper> getInstalledPlugins()
public Collection<InstalledPlugin> getInstalledPlugins()
{
return installedPlugins;
}
@@ -227,7 +227,7 @@ public class DefaultPluginLoader implements PluginLoader
private final ExtensionProcessor extensionProcessor;
/** Field description */
private final Set<PluginWrapper> installedPlugins;
private final Set<InstalledPlugin> installedPlugins;
/** Field description */
private final Set<ScmModule> modules;

View File

@@ -129,7 +129,7 @@ public class DefaultPluginManager implements PluginManager
this.httpClient = httpClient;
installedPlugins = new HashMap<>();
for (PluginWrapper wrapper : pluginLoader.getInstalledPlugins())
for (InstalledPlugin wrapper : pluginLoader.getInstalledPlugins())
{
Plugin plugin = wrapper.getPlugin();
PluginInformation info = plugin.getInformation();

View File

@@ -71,11 +71,11 @@ public class DefaultUberWebResourceLoader implements UberWebResourceLoader
//~--- constructors ---------------------------------------------------------
public DefaultUberWebResourceLoader(ServletContext servletContext, Iterable<PluginWrapper> plugins) {
public DefaultUberWebResourceLoader(ServletContext servletContext, Iterable<InstalledPlugin> plugins) {
this(servletContext, plugins, SCMContext.getContext().getStage());
}
public DefaultUberWebResourceLoader(ServletContext servletContext, Iterable<PluginWrapper> plugins, Stage stage) {
public DefaultUberWebResourceLoader(ServletContext servletContext, Iterable<InstalledPlugin> plugins, Stage stage) {
this.servletContext = servletContext;
this.plugins = plugins;
this.cache = createCache(stage);
@@ -153,7 +153,7 @@ public class DefaultUberWebResourceLoader implements UberWebResourceLoader
resources.add(ctxResource);
}
for (PluginWrapper wrapper : plugins)
for (InstalledPlugin wrapper : plugins)
{
URL resource = nonDirectory(wrapper.getWebResourceLoader().getResource(path));
@@ -205,7 +205,7 @@ public class DefaultUberWebResourceLoader implements UberWebResourceLoader
if (resource == null)
{
for (PluginWrapper wrapper : plugins)
for (InstalledPlugin wrapper : plugins)
{
resource = nonDirectory(wrapper.getWebResourceLoader().getResource(path));
@@ -259,7 +259,7 @@ public class DefaultUberWebResourceLoader implements UberWebResourceLoader
private final Cache<String, URL> cache;
/** Field description */
private final Iterable<PluginWrapper> plugins;
private final Iterable<InstalledPlugin> plugins;
/** Field description */
private final ServletContext servletContext;

View File

@@ -157,7 +157,7 @@ public final class PluginNode
*
* @return
*/
public PluginWrapper getWrapper()
public InstalledPlugin getWrapper()
{
return wrapper;
}
@@ -170,7 +170,7 @@ public final class PluginNode
*
* @param wrapper
*/
public void setWrapper(PluginWrapper wrapper)
public void setWrapper(InstalledPlugin wrapper)
{
this.wrapper = wrapper;
}
@@ -192,5 +192,5 @@ public final class PluginNode
private final ExplodedSmp plugin;
/** Field description */
private PluginWrapper wrapper;
private InstalledPlugin wrapper;
}

View File

@@ -160,7 +160,7 @@ public final class PluginProcessor
*
* @throws IOException
*/
public Set<PluginWrapper> collectPlugins(ClassLoader classLoader)
public Set<InstalledPlugin> collectPlugins(ClassLoader classLoader)
throws IOException
{
logger.info("collect plugins");
@@ -187,7 +187,7 @@ public final class PluginProcessor
logger.trace("create plugin wrappers and build classloaders");
Set<PluginWrapper> wrappers = createPluginWrappers(classLoader, rootNodes);
Set<InstalledPlugin> wrappers = createPluginWrappers(classLoader, rootNodes);
logger.debug("collected {} plugins", wrappers.size());
@@ -204,7 +204,7 @@ public final class PluginProcessor
*
* @throws IOException
*/
private void appendPluginWrapper(Set<PluginWrapper> plugins,
private void appendPluginWrapper(Set<InstalledPlugin> plugins,
ClassLoader classLoader, PluginNode node)
throws IOException
{
@@ -217,7 +217,7 @@ public final class PluginProcessor
for (PluginNode parent : node.getParents())
{
PluginWrapper wrapper = parent.getWrapper();
InstalledPlugin wrapper = parent.getWrapper();
if (wrapper != null)
{
@@ -236,7 +236,7 @@ public final class PluginProcessor
}
PluginWrapper plugin =
InstalledPlugin plugin =
createPluginWrapper(createParentPluginClassLoader(classLoader, parents),
smp);
@@ -257,7 +257,7 @@ public final class PluginProcessor
*
* @throws IOException
*/
private void appendPluginWrappers(Set<PluginWrapper> plugins,
private void appendPluginWrappers(Set<InstalledPlugin> plugins,
ClassLoader classLoader, List<PluginNode> nodes)
throws IOException
{
@@ -474,11 +474,11 @@ public final class PluginProcessor
*
* @throws IOException
*/
private PluginWrapper createPluginWrapper(ClassLoader classLoader,
ExplodedSmp smp)
private InstalledPlugin createPluginWrapper(ClassLoader classLoader,
ExplodedSmp smp)
throws IOException
{
PluginWrapper wrapper = null;
InstalledPlugin wrapper = null;
Path directory = smp.getPath();
Path descriptor = directory.resolve(PluginConstants.FILE_DESCRIPTOR);
@@ -490,7 +490,7 @@ public final class PluginProcessor
WebResourceLoader resourceLoader = createWebResourceLoader(directory);
wrapper = new PluginWrapper(plugin, cl, resourceLoader, directory);
wrapper = new InstalledPlugin(plugin, cl, resourceLoader, directory);
}
else
{
@@ -512,11 +512,11 @@ public final class PluginProcessor
*
* @throws IOException
*/
private Set<PluginWrapper> createPluginWrappers(ClassLoader classLoader,
List<PluginNode> rootNodes)
private Set<InstalledPlugin> createPluginWrappers(ClassLoader classLoader,
List<PluginNode> rootNodes)
throws IOException
{
Set<PluginWrapper> plugins = Sets.newHashSet();
Set<InstalledPlugin> plugins = Sets.newHashSet();
appendPluginWrappers(plugins, classLoader, rootNodes);

View File

@@ -87,8 +87,8 @@ public final class PluginsInternal
*
* @throws IOException
*/
public static Set<PluginWrapper> collectPlugins(ClassLoaderLifeCycle classLoaderLifeCycle,
Path directory)
public static Set<InstalledPlugin> collectPlugins(ClassLoaderLifeCycle classLoaderLifeCycle,
Path directory)
throws IOException
{
PluginProcessor processor = new PluginProcessor(classLoaderLifeCycle, directory);
@@ -159,7 +159,7 @@ public final class PluginsInternal
*
* @return
*/
public static Iterable<Plugin> unwrap(Iterable<PluginWrapper> wrapped)
public static Iterable<Plugin> unwrap(Iterable<InstalledPlugin> wrapped)
{
return Iterables.transform(wrapped, new Unwrap());
}
@@ -188,7 +188,7 @@ public final class PluginsInternal
* @version Enter version here..., 14/06/05
* @author Enter your name here...
*/
private static class Unwrap implements Function<PluginWrapper, Plugin>
private static class Unwrap implements Function<InstalledPlugin, Plugin>
{
/**
@@ -200,7 +200,7 @@ public final class PluginsInternal
* @return
*/
@Override
public Plugin apply(PluginWrapper wrapper)
public Plugin apply(InstalledPlugin wrapper)
{
return wrapper.getPlugin();
}

View File

@@ -65,7 +65,7 @@ public final class UberClassLoader extends ClassLoader
* @param parent
* @param plugins
*/
public UberClassLoader(ClassLoader parent, Iterable<PluginWrapper> plugins)
public UberClassLoader(ClassLoader parent, Iterable<InstalledPlugin> plugins)
{
super(parent);
this.plugins = plugins;
@@ -87,7 +87,7 @@ public final class UberClassLoader extends ClassLoader
}
private Class<?> findClassInPlugins(String name) throws ClassNotFoundException {
for (PluginWrapper plugin : plugins) {
for (InstalledPlugin plugin : plugins) {
Class<?> clazz = findClass(plugin.getClassLoader(), name);
if (clazz != null) {
return clazz;
@@ -119,7 +119,7 @@ public final class UberClassLoader extends ClassLoader
{
URL url = null;
for (PluginWrapper plugin : plugins)
for (InstalledPlugin plugin : plugins)
{
ClassLoader cl = plugin.getClassLoader();
@@ -149,7 +149,7 @@ public final class UberClassLoader extends ClassLoader
{
List<URL> urls = Lists.newArrayList();
for (PluginWrapper plugin : plugins)
for (InstalledPlugin plugin : plugins)
{
ClassLoader cl = plugin.getClassLoader();
@@ -194,5 +194,5 @@ public final class UberClassLoader extends ClassLoader
Maps.newConcurrentMap();
/** Field description */
private final Iterable<PluginWrapper> plugins;
private final Iterable<InstalledPlugin> plugins;
}