Package org.eclipse.jetty.quickstart
Class QuickStartGeneratorConfiguration
java.lang.Object
org.eclipse.jetty.webapp.AbstractConfiguration
org.eclipse.jetty.quickstart.QuickStartGeneratorConfiguration
- All Implemented Interfaces:
Configuration
QuickStartGeneratorConfiguration
Generate 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).
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.eclipse.jetty.webapp.Configuration
Configuration.Wrapper, Configuration.WrapperFunction
-
Field Summary
Modifier and TypeFieldDescriptionprotected final boolean
protected int
protected String
protected Resource
static final String
static final String
Fields inherited from interface org.eclipse.jetty.webapp.Configuration
ATTR
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
abort
(WebAppContext context) void
configure
(WebAppContext context) Configure WebApp.void
deconfigure
(WebAppContext context) DeConfigure WebApp.void
generateQuickStartWebXml
(WebAppContext context, OutputStream stream) Perform the generation of the xml fileFind the origin (web.xml, fragment, annotation etc) of a web artifact from MetaData.void
preConfigure
(WebAppContext context) Set up for configuration.void
setOriginAttribute
(String name) void
setQuickStartWebXml
(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
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.eclipse.jetty.webapp.Configuration
isAvailable, replaces
-
Field Details
-
ORIGIN
- See Also:
-
DEFAULT_ORIGIN_ATTRIBUTE_NAME
- See Also:
-
_abort
protected final boolean _abort -
_originAttribute
-
_count
protected int _count -
_quickStartWebXml
-
-
Constructor Details
-
QuickStartGeneratorConfiguration
public QuickStartGeneratorConfiguration() -
QuickStartGeneratorConfiguration
public QuickStartGeneratorConfiguration(boolean abort)
-
-
Method Details
-
abort
- Specified by:
abort
in interfaceConfiguration
- Overrides:
abort
in classAbstractConfiguration
- Returns:
- true if configuration should be aborted
-
setOriginAttribute
-
getOriginAttribute
- Returns:
- the originAttribute
-
getQuickStartWebXml
-
setQuickStartWebXml
-
generateQuickStartWebXml
public void generateQuickStartWebXml(WebAppContext context, OutputStream stream) throws FileNotFoundException, IOException Perform the generation of the xml file- Parameters:
stream
- the stream to generate the quickstart-web.xml to- Throws:
IOException
- if unable to generate the quickstart-web.xmlFileNotFoundException
- if unable to find the file
-
origin
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
Description copied from interface:Configuration
Set up for configuration.Typically this step discovers configuration resources. Calls to preConfigure may alter the Configurations configured on the WebAppContext, so long as configurations prior to this configuration are not altered.
- Specified by:
preConfigure
in interfaceConfiguration
- Overrides:
preConfigure
in classAbstractConfiguration
- Parameters:
context
- The context to configure- Throws:
Exception
- if unable to pre configure
-
configure
Description copied from interface:Configuration
Configure WebApp.Typically this step applies the discovered configuration resources to either the
WebAppContext
or the associatedMetaData
.- Specified by:
configure
in interfaceConfiguration
- Overrides:
configure
in classAbstractConfiguration
- Parameters:
context
- The context to configure- Throws:
Exception
- if unable to configure
-
deconfigure
Description copied from interface:Configuration
DeConfigure WebApp. This method is called to undo all configuration done. This is called to allow the context to work correctly over a stop/start cycle- Specified by:
deconfigure
in interfaceConfiguration
- Overrides:
deconfigure
in classAbstractConfiguration
- Parameters:
context
- The context to configure- Throws:
Exception
- if unable to deconfigure
-