renamed for clarity
This commit is contained in:
parent
0326af2ce9
commit
1fc046fb3d
|
@ -96,8 +96,8 @@ public class AnnotationConfiguration extends AbstractConfiguration
|
|||
|
||||
public AnnotationConfiguration()
|
||||
{
|
||||
beforeThis(WebXmlConfiguration.class,MetaInfConfiguration.class,FragmentConfiguration.class,PlusConfiguration.class);
|
||||
afterThis(JettyWebXmlConfiguration.class);
|
||||
addDependencies(WebXmlConfiguration.class, MetaInfConfiguration.class, FragmentConfiguration.class, PlusConfiguration.class);
|
||||
addDependents(JettyWebXmlConfiguration.class);
|
||||
protectAndExpose("org.eclipse.jetty.util.annotation.");
|
||||
hide("org.objectweb.asm.");
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ public class WebSocketCdiConfiguration extends AbstractConfiguration
|
|||
{
|
||||
public WebSocketCdiConfiguration()
|
||||
{
|
||||
beforeThis(WebSocketConfiguration.class);
|
||||
addDependencies(WebSocketConfiguration.class);
|
||||
protectAndExpose("org.eclipse.jetty.cdi.websocket.");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -61,8 +61,8 @@ public class EnvConfiguration extends AbstractConfiguration
|
|||
|
||||
public EnvConfiguration()
|
||||
{
|
||||
beforeThis(WebXmlConfiguration.class,MetaInfConfiguration.class,FragmentConfiguration.class);
|
||||
afterThis(PlusConfiguration.class,JettyWebXmlConfiguration.class);
|
||||
addDependencies(WebXmlConfiguration.class, MetaInfConfiguration.class, FragmentConfiguration.class);
|
||||
addDependents(PlusConfiguration.class, JettyWebXmlConfiguration.class);
|
||||
protectAndExpose("org.eclipse.jetty.jndi.");
|
||||
}
|
||||
|
||||
|
|
|
@ -50,8 +50,8 @@ public class PlusConfiguration extends AbstractConfiguration
|
|||
|
||||
public PlusConfiguration()
|
||||
{
|
||||
beforeThis(EnvConfiguration.class,WebXmlConfiguration.class,MetaInfConfiguration.class,FragmentConfiguration.class);
|
||||
afterThis(JettyWebXmlConfiguration.class);
|
||||
addDependencies(EnvConfiguration.class, WebXmlConfiguration.class, MetaInfConfiguration.class, FragmentConfiguration.class);
|
||||
addDependents(JettyWebXmlConfiguration.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
package org.eclipse.jetty.quickstart;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
import java.util.stream.Collectors;
|
||||
|
@ -31,7 +30,6 @@ import org.eclipse.jetty.util.log.Logger;
|
|||
import org.eclipse.jetty.util.resource.Resource;
|
||||
import org.eclipse.jetty.webapp.AbstractConfiguration;
|
||||
import org.eclipse.jetty.webapp.Configuration;
|
||||
import org.eclipse.jetty.webapp.Configurations;
|
||||
import org.eclipse.jetty.webapp.StandardDescriptorProcessor;
|
||||
import org.eclipse.jetty.webapp.WebAppContext;
|
||||
import org.eclipse.jetty.webapp.WebInfConfiguration;
|
||||
|
@ -65,8 +63,8 @@ public class QuickStartConfiguration extends AbstractConfiguration implements Co
|
|||
|
||||
public QuickStartConfiguration()
|
||||
{
|
||||
beforeThis(WebInfConfiguration.class);
|
||||
afterThis(WebXmlConfiguration.class);
|
||||
addDependencies(WebInfConfiguration.class);
|
||||
addDependents(WebXmlConfiguration.class);
|
||||
}
|
||||
|
||||
public void setMode(Mode mode)
|
||||
|
|
|
@ -41,7 +41,7 @@ public class AbstractConfiguration implements Configuration
|
|||
* Add configuration classes that come before this configuration
|
||||
* @param classes Classname or package name
|
||||
*/
|
||||
protected void beforeThis(String... classes)
|
||||
protected void addDependencies(String... classes)
|
||||
{
|
||||
for (String c:classes)
|
||||
_beforeThis.add(c);
|
||||
|
@ -51,16 +51,16 @@ public class AbstractConfiguration implements Configuration
|
|||
* Add configuration classes that come before this configuration
|
||||
* @param classes Classes
|
||||
*/
|
||||
protected void beforeThis(Class<?>... classes)
|
||||
protected void addDependencies(Class<? extends Configuration>... classes)
|
||||
{
|
||||
beforeThis(Arrays.asList(classes).stream().map(Class::getName).collect(Collectors.toList()).toArray(new String[classes.length]));
|
||||
addDependencies(Arrays.asList(classes).stream().map(Class::getName).collect(Collectors.toList()).toArray(new String[classes.length]));
|
||||
}
|
||||
|
||||
/**
|
||||
* Add configuration classes that come after this configuration
|
||||
* @param classes Classname or package name
|
||||
*/
|
||||
protected void afterThis(String... classes)
|
||||
protected void addDependents(String... classes)
|
||||
{
|
||||
for (String c:classes)
|
||||
_after.add(c);
|
||||
|
@ -70,9 +70,9 @@ public class AbstractConfiguration implements Configuration
|
|||
* Add configuration classes that come after this configuration
|
||||
* @param classes Class
|
||||
*/
|
||||
protected void afterThis(Class<?>... classes)
|
||||
protected void addDependents(Class<?>... classes)
|
||||
{
|
||||
afterThis(Arrays.asList(classes).stream().map(Class::getName).collect(Collectors.toList()).toArray(new String[classes.length]));
|
||||
addDependents(Arrays.asList(classes).stream().map(Class::getName).collect(Collectors.toList()).toArray(new String[classes.length]));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -34,7 +34,7 @@ public class FragmentConfiguration extends AbstractConfiguration
|
|||
|
||||
public FragmentConfiguration()
|
||||
{
|
||||
beforeThis(MetaInfConfiguration.class,WebXmlConfiguration.class);
|
||||
addDependencies(MetaInfConfiguration.class, WebXmlConfiguration.class);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -34,8 +34,8 @@ public class JaasConfiguration extends AbstractConfiguration
|
|||
{
|
||||
public JaasConfiguration()
|
||||
{
|
||||
beforeThis(WebXmlConfiguration.class,MetaInfConfiguration.class,WebInfConfiguration.class,FragmentConfiguration.class);
|
||||
afterThis(WebAppConfiguration.class);
|
||||
addDependencies(WebXmlConfiguration.class, MetaInfConfiguration.class, WebInfConfiguration.class, FragmentConfiguration.class);
|
||||
addDependents(WebAppConfiguration.class);
|
||||
protectAndExpose("org.eclipse.jetty.jaas.");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -18,7 +18,6 @@
|
|||
|
||||
package org.eclipse.jetty.webapp;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.util.Map;
|
||||
|
||||
|
@ -53,7 +52,7 @@ public class JettyWebXmlConfiguration extends AbstractConfiguration
|
|||
|
||||
public JettyWebXmlConfiguration()
|
||||
{
|
||||
beforeThis(WebXmlConfiguration.class,FragmentConfiguration.class,MetaInfConfiguration.class);
|
||||
addDependencies(WebXmlConfiguration.class, FragmentConfiguration.class, MetaInfConfiguration.class);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -35,7 +35,7 @@ public class JmxConfiguration extends AbstractConfiguration
|
|||
{
|
||||
public JmxConfiguration()
|
||||
{
|
||||
afterThis(WebXmlConfiguration.class,MetaInfConfiguration.class,WebInfConfiguration.class);
|
||||
addDependents(WebXmlConfiguration.class, MetaInfConfiguration.class, WebInfConfiguration.class);
|
||||
protectAndExpose("org.eclipse.jetty.jmx.");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -34,8 +34,8 @@ public class JndiConfiguration extends AbstractConfiguration
|
|||
{
|
||||
public JndiConfiguration()
|
||||
{
|
||||
beforeThis(WebXmlConfiguration.class,MetaInfConfiguration.class,WebInfConfiguration.class,FragmentConfiguration.class);
|
||||
afterThis(WebAppConfiguration.class);
|
||||
addDependencies(WebXmlConfiguration.class, MetaInfConfiguration.class, WebInfConfiguration.class, FragmentConfiguration.class);
|
||||
addDependents(WebAppConfiguration.class);
|
||||
protectAndExpose("org.eclipse.jetty.jndi.");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,8 +35,8 @@ public class JspConfiguration extends AbstractConfiguration
|
|||
{
|
||||
public JspConfiguration()
|
||||
{
|
||||
beforeThis(WebXmlConfiguration.class,MetaInfConfiguration.class,WebInfConfiguration.class,FragmentConfiguration.class);
|
||||
afterThis(WebAppConfiguration.class);
|
||||
addDependencies(WebXmlConfiguration.class, MetaInfConfiguration.class, WebInfConfiguration.class, FragmentConfiguration.class);
|
||||
addDependents(WebAppConfiguration.class);
|
||||
protectAndExpose("org.eclipse.jetty.jsp.");
|
||||
expose("org.eclipse.jetty.apache.");
|
||||
hide("org.eclipse.jdt.");
|
||||
|
|
|
@ -93,7 +93,7 @@ public class MetaInfConfiguration extends AbstractConfiguration
|
|||
/* ------------------------------------------------------------------------------- */
|
||||
public MetaInfConfiguration()
|
||||
{
|
||||
beforeThis(WebXmlConfiguration.class);
|
||||
addDependencies(WebXmlConfiguration.class);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -29,8 +29,8 @@ public class ServletsConfiguration extends AbstractConfiguration
|
|||
{
|
||||
public ServletsConfiguration()
|
||||
{
|
||||
beforeThis(WebXmlConfiguration.class,MetaInfConfiguration.class,WebInfConfiguration.class,WebAppConfiguration.class);
|
||||
afterThis(JettyWebXmlConfiguration.class);
|
||||
addDependencies(WebXmlConfiguration.class, MetaInfConfiguration.class, WebInfConfiguration.class, WebAppConfiguration.class);
|
||||
addDependents(JettyWebXmlConfiguration.class);
|
||||
protectAndExpose();
|
||||
protect("org.eclipse.jetty.servlets.PushCacheFilter", //must be loaded by container classpath
|
||||
"org.eclipse.jetty.servlets.PushSessionCacheFilter" //must be loaded by container classpath
|
||||
|
|
|
@ -29,8 +29,8 @@ public class WebAppConfiguration extends AbstractConfiguration
|
|||
{
|
||||
public WebAppConfiguration()
|
||||
{
|
||||
beforeThis(WebXmlConfiguration.class,MetaInfConfiguration.class,WebInfConfiguration.class);
|
||||
afterThis(JettyWebXmlConfiguration.class);
|
||||
addDependencies(WebXmlConfiguration.class, MetaInfConfiguration.class, WebInfConfiguration.class);
|
||||
addDependents(JettyWebXmlConfiguration.class);
|
||||
protectAndExpose(
|
||||
"org.eclipse.jetty.util.log.",
|
||||
"org.eclipse.jetty.server.session.SessionData",
|
||||
|
|
|
@ -34,8 +34,8 @@ public class WebSocketConfiguration extends AbstractConfiguration
|
|||
{
|
||||
public WebSocketConfiguration()
|
||||
{
|
||||
beforeThis(WebXmlConfiguration.class,MetaInfConfiguration.class,WebInfConfiguration.class,FragmentConfiguration.class);
|
||||
afterThis("org.eclipse.jetty.annotations.AnnotationConfiguration",WebAppConfiguration.class.getName());
|
||||
addDependencies(WebXmlConfiguration.class, MetaInfConfiguration.class, WebInfConfiguration.class, FragmentConfiguration.class);
|
||||
addDependents("org.eclipse.jetty.annotations.AnnotationConfiguration", WebAppConfiguration.class.getName());
|
||||
protectAndExpose("org.eclipse.jetty.websocket.");
|
||||
}
|
||||
}
|
||||
|
|
|
@ -38,7 +38,7 @@ public class WebXmlConfiguration extends AbstractConfiguration
|
|||
/* ------------------------------------------------------------------------------- */
|
||||
public WebXmlConfiguration()
|
||||
{
|
||||
beforeThis(WebInfConfiguration.class);
|
||||
addDependencies(WebInfConfiguration.class);
|
||||
}
|
||||
|
||||
/* ------------------------------------------------------------------------------- */
|
||||
|
|
|
@ -113,7 +113,8 @@ public class ConfigurationsTest
|
|||
|
||||
public static class ConfigFoo extends AbstractConfiguration
|
||||
{
|
||||
{afterThis(ConfigBar.class); }
|
||||
{
|
||||
addDependents(ConfigBar.class); }
|
||||
}
|
||||
|
||||
public static class ConfigBar extends AbstractConfiguration
|
||||
|
@ -123,14 +124,14 @@ public class ConfigurationsTest
|
|||
public static class ConfigX extends AbstractConfiguration
|
||||
{
|
||||
{
|
||||
beforeThis(ConfigBar.class);
|
||||
addDependencies(ConfigBar.class);
|
||||
}
|
||||
}
|
||||
public static class ConfigY extends AbstractConfiguration
|
||||
{
|
||||
{
|
||||
beforeThis(ConfigX.class);
|
||||
afterThis(ConfigZ.class);
|
||||
addDependencies(ConfigX.class);
|
||||
addDependents(ConfigZ.class);
|
||||
}
|
||||
}
|
||||
public static class ConfigZ extends AbstractConfiguration
|
||||
|
@ -144,21 +145,21 @@ public class ConfigurationsTest
|
|||
public static class ConfigDick extends AbstractConfiguration
|
||||
{
|
||||
{
|
||||
beforeThis(ConfigTom.class);
|
||||
addDependencies(ConfigTom.class);
|
||||
}
|
||||
}
|
||||
|
||||
public static class ConfigHarry extends AbstractConfiguration
|
||||
{
|
||||
{
|
||||
beforeThis(ConfigDick.class);
|
||||
addDependencies(ConfigDick.class);
|
||||
}
|
||||
}
|
||||
|
||||
public static class ConfigExtendedDick extends ConfigDick
|
||||
{
|
||||
{
|
||||
beforeThis(ConfigTom.class);
|
||||
addDependencies(ConfigTom.class);
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue