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.AbstractConfiguration
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

    org.eclipse.jetty.webapp.Configuration.Wrapper, org.eclipse.jetty.webapp.Configuration.WrapperFunction
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected final boolean
     
    protected int
     
    protected String
     
    protected org.eclipse.jetty.util.resource.Resource
     
    static final String
     
    static final String
     

    Fields inherited from interface org.eclipse.jetty.webapp.Configuration

    ATTR
  • Constructor Summary

    Constructors
    Constructor
    Description
     
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    abort(org.eclipse.jetty.webapp.WebAppContext context)
     
    void
    configure(org.eclipse.jetty.webapp.WebAppContext context)
     
    void
    deconfigure(org.eclipse.jetty.webapp.WebAppContext context)
     
    void
    generateQuickStartWebXml(org.eclipse.jetty.webapp.WebAppContext context, OutputStream stream)
    Perform the generation of the xml file
     
    org.eclipse.jetty.util.resource.Resource
     
    origin(org.eclipse.jetty.webapp.MetaData md, String name)
    Find the origin (web.xml, fragment, annotation etc) of a web artifact from MetaData.
    void
    preConfigure(org.eclipse.jetty.webapp.WebAppContext context)
     
    void
     
    void
    setQuickStartWebXml(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

    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

      public static final String ORIGIN
      See Also:
    • DEFAULT_ORIGIN_ATTRIBUTE_NAME

      public static final String DEFAULT_ORIGIN_ATTRIBUTE_NAME
      See Also:
    • _abort

      protected final boolean _abort
    • _originAttribute

      protected String _originAttribute
    • _count

      protected int _count
    • _quickStartWebXml

      protected org.eclipse.jetty.util.resource.Resource _quickStartWebXml
  • Constructor Details

    • QuickStartGeneratorConfiguration

      public QuickStartGeneratorConfiguration()
    • QuickStartGeneratorConfiguration

      public QuickStartGeneratorConfiguration(boolean abort)
  • Method Details

    • abort

      public boolean abort(org.eclipse.jetty.webapp.WebAppContext context)
      Specified by:
      abort in interface org.eclipse.jetty.webapp.Configuration
      Overrides:
      abort in class org.eclipse.jetty.webapp.AbstractConfiguration
    • setOriginAttribute

      public void setOriginAttribute(String name)
    • getOriginAttribute

      public 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, 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.xml
      FileNotFoundException - if unable to find the file
    • origin

      public Map<String,String> origin(org.eclipse.jetty.webapp.MetaData md, String name)
      Find the origin (web.xml, fragment, annotation etc) of a web artifact from MetaData.
      Parameters:
      md - the metadata
      name - the name
      Returns:
      the origin map
    • preConfigure

      public void preConfigure(org.eclipse.jetty.webapp.WebAppContext context) throws Exception
      Specified by:
      preConfigure in interface org.eclipse.jetty.webapp.Configuration
      Overrides:
      preConfigure in class org.eclipse.jetty.webapp.AbstractConfiguration
      Throws:
      Exception
    • configure

      public void configure(org.eclipse.jetty.webapp.WebAppContext context) throws Exception
      Specified by:
      configure in interface org.eclipse.jetty.webapp.Configuration
      Overrides:
      configure in class org.eclipse.jetty.webapp.AbstractConfiguration
      Throws:
      Exception
    • deconfigure

      public void deconfigure(org.eclipse.jetty.webapp.WebAppContext context) throws Exception
      Specified by:
      deconfigure in interface org.eclipse.jetty.webapp.Configuration
      Overrides:
      deconfigure in class org.eclipse.jetty.webapp.AbstractConfiguration
      Throws:
      Exception