Module org.eclipse.jetty.quickstart
Package org.eclipse.jetty.quickstart
Class QuickStartGeneratorConfiguration
- java.lang.Object
-
- org.eclipse.jetty.webapp.AbstractConfiguration
-
- org.eclipse.jetty.quickstart.QuickStartGeneratorConfiguration
-
- All Implemented Interfaces:
org.eclipse.jetty.webapp.Configuration
public class QuickStartGeneratorConfiguration extends org.eclipse.jetty.webapp.AbstractConfigurationQuickStartGeneratorConfigurationGenerate an effective web.xml from a WebAppContext, including all components from web.xml, web-fragment.xmls annotations etc.
If generating quickstart for a different java platform than the current running platform, then the org.eclipse.jetty.annotations.javaTargetPlatform attribute should be set on the Context with the platform number of the target JVM (eg 8).
-
-
Field Summary
Fields Modifier and Type Field Description protected boolean_abortprotected int_countprotected java.lang.String_originAttributeprotected org.eclipse.jetty.util.resource.Resource_quickStartWebXmlstatic java.lang.StringDEFAULT_ORIGIN_ATTRIBUTE_NAMEstatic java.lang.StringORIGIN
-
Constructor Summary
Constructors Constructor Description QuickStartGeneratorConfiguration()QuickStartGeneratorConfiguration(boolean abort)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanabort(org.eclipse.jetty.webapp.WebAppContext context)voidconfigure(org.eclipse.jetty.webapp.WebAppContext context)voiddeconfigure(org.eclipse.jetty.webapp.WebAppContext context)voidgenerateQuickStartWebXml(org.eclipse.jetty.webapp.WebAppContext context, java.io.OutputStream stream)Perform the generation of the xml filejava.lang.StringgetOriginAttribute()org.eclipse.jetty.util.resource.ResourcegetQuickStartWebXml()java.util.Map<java.lang.String,java.lang.String>origin(org.eclipse.jetty.webapp.MetaData md, java.lang.String name)Find the origin (web.xml, fragment, annotation etc) of a web artifact from MetaData.voidpreConfigure(org.eclipse.jetty.webapp.WebAppContext context)voidsetOriginAttribute(java.lang.String name)voidsetQuickStartWebXml(org.eclipse.jetty.util.resource.Resource quickStartWebXml)-
Methods inherited from class org.eclipse.jetty.webapp.AbstractConfiguration
addDependencies, addDependencies, addDependents, addDependents, cloneConfigure, destroy, expose, getDependencies, getDependents, getServerClasses, getSystemClasses, hide, isEnabledByDefault, postConfigure, protect, protectAndExpose
-
-
-
-
Field Detail
-
ORIGIN
public static final java.lang.String ORIGIN
- See Also:
- Constant Field Values
-
DEFAULT_ORIGIN_ATTRIBUTE_NAME
public static final java.lang.String DEFAULT_ORIGIN_ATTRIBUTE_NAME
- See Also:
- Constant Field Values
-
_abort
protected final boolean _abort
-
_originAttribute
protected java.lang.String _originAttribute
-
_count
protected int _count
-
_quickStartWebXml
protected org.eclipse.jetty.util.resource.Resource _quickStartWebXml
-
-
Method Detail
-
abort
public boolean abort(org.eclipse.jetty.webapp.WebAppContext context)
- Specified by:
abortin interfaceorg.eclipse.jetty.webapp.Configuration- Overrides:
abortin classorg.eclipse.jetty.webapp.AbstractConfiguration
-
setOriginAttribute
public void setOriginAttribute(java.lang.String name)
-
getOriginAttribute
public java.lang.String getOriginAttribute()
- Returns:
- the originAttribute
-
getQuickStartWebXml
public org.eclipse.jetty.util.resource.Resource getQuickStartWebXml()
-
setQuickStartWebXml
public void setQuickStartWebXml(org.eclipse.jetty.util.resource.Resource quickStartWebXml)
-
generateQuickStartWebXml
public void generateQuickStartWebXml(org.eclipse.jetty.webapp.WebAppContext context, java.io.OutputStream stream) throws java.io.FileNotFoundException, java.io.IOExceptionPerform the generation of the xml file- Parameters:
stream- the stream to generate the quickstart-web.xml to- Throws:
java.io.IOException- if unable to generate the quickstart-web.xmljava.io.FileNotFoundException- if unable to find the file
-
origin
public java.util.Map<java.lang.String,java.lang.String> origin(org.eclipse.jetty.webapp.MetaData md, java.lang.String name)Find the origin (web.xml, fragment, annotation etc) of a web artifact from MetaData.- Parameters:
md- the metadataname- the name- Returns:
- the origin map
-
preConfigure
public void preConfigure(org.eclipse.jetty.webapp.WebAppContext context) throws java.lang.Exception- Specified by:
preConfigurein interfaceorg.eclipse.jetty.webapp.Configuration- Overrides:
preConfigurein classorg.eclipse.jetty.webapp.AbstractConfiguration- Throws:
java.lang.Exception
-
configure
public void configure(org.eclipse.jetty.webapp.WebAppContext context) throws java.lang.Exception- Specified by:
configurein interfaceorg.eclipse.jetty.webapp.Configuration- Overrides:
configurein classorg.eclipse.jetty.webapp.AbstractConfiguration- Throws:
java.lang.Exception
-
deconfigure
public void deconfigure(org.eclipse.jetty.webapp.WebAppContext context) throws java.lang.Exception- Specified by:
deconfigurein interfaceorg.eclipse.jetty.webapp.Configuration- Overrides:
deconfigurein classorg.eclipse.jetty.webapp.AbstractConfiguration- Throws:
java.lang.Exception
-
-