Package org.eclipse.jetty.quickstart
Class QuickStartDescriptorGenerator
- java.lang.Object
-
- org.eclipse.jetty.quickstart.QuickStartDescriptorGenerator
-
public class QuickStartDescriptorGenerator extends java.lang.ObjectQuickStartDescriptorGeneratorGenerate 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 int_countprotected java.lang.String_extraXMLprotected boolean_generateOriginprotected java.lang.String_originAttributeprotected WebAppContext_webAppstatic java.lang.StringDEFAULT_ORIGIN_ATTRIBUTE_NAMEstatic java.lang.StringDEFAULT_QUICKSTART_DESCRIPTOR_NAMEstatic java.lang.StringORIGIN
-
Constructor Summary
Constructors Constructor Description QuickStartDescriptorGenerator(WebAppContext w, java.lang.String extraXML, java.lang.String originAttribute, boolean generateOrigin)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidgenerateQuickStartWebXml(java.io.OutputStream stream)Perform the generation of the xml filejava.util.Map<java.lang.String,java.lang.String>origin(MetaData md, java.lang.String name)Find the origin (web.xml, fragment, annotation etc) of a web artifact from MetaData.
-
-
-
Field Detail
-
ORIGIN
public static final java.lang.String ORIGIN
- See Also:
- Constant Field Values
-
DEFAULT_QUICKSTART_DESCRIPTOR_NAME
public static final java.lang.String DEFAULT_QUICKSTART_DESCRIPTOR_NAME
- See Also:
- Constant Field Values
-
DEFAULT_ORIGIN_ATTRIBUTE_NAME
public static final java.lang.String DEFAULT_ORIGIN_ATTRIBUTE_NAME
- See Also:
- Constant Field Values
-
_webApp
protected WebAppContext _webApp
-
_extraXML
protected java.lang.String _extraXML
-
_originAttribute
protected java.lang.String _originAttribute
-
_generateOrigin
protected boolean _generateOrigin
-
_count
protected int _count
-
-
Constructor Detail
-
QuickStartDescriptorGenerator
public QuickStartDescriptorGenerator(WebAppContext w, java.lang.String extraXML, java.lang.String originAttribute, boolean generateOrigin)
- Parameters:
w- the source WebAppContextextraXML- any extra xml snippet to appendoriginAttribute- param value to use for the context param origin attributegenerateOrigin-trueto generate the origin attribute
-
-
Method Detail
-
generateQuickStartWebXml
public void generateQuickStartWebXml(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(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
-
-