Class QuickStartConfiguration

  • All Implemented Interfaces:
    org.eclipse.jetty.webapp.Configuration

    public class QuickStartConfiguration
    extends org.eclipse.jetty.webapp.AbstractConfiguration
    QuickStartConfiguration

    Prepare for quickstart generation, or usage.

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
      static class  QuickStartConfiguration.Mode  
      • 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
      static java.util.Set<java.lang.Class<? extends org.eclipse.jetty.webapp.Configuration>> __replacedConfigurations  
      static java.lang.String MODE  
      static java.lang.String ORIGIN_ATTRIBUTE  
      static java.lang.String QUICKSTART_WEB_XML  
      • Fields inherited from interface org.eclipse.jetty.webapp.Configuration

        ATTR
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void configure​(QuickStartGeneratorConfiguration generator, org.eclipse.jetty.webapp.WebAppContext context)  
      void configure​(org.eclipse.jetty.webapp.WebAppContext context)  
      static void configureMode​(org.eclipse.jetty.server.Server server, java.lang.String mode)
      Configure the server for the quickstart mode.
      org.eclipse.jetty.util.resource.Resource getQuickStartWebXml​(org.eclipse.jetty.webapp.WebAppContext context)
      Get the quickstart-web.xml file as a Resource.
      void postConfigure​(org.eclipse.jetty.webapp.WebAppContext context)  
      void preConfigure​(org.eclipse.jetty.webapp.WebAppContext context)  
      protected void quickStart​(org.eclipse.jetty.webapp.WebAppContext context)  
      • Methods inherited from class org.eclipse.jetty.webapp.AbstractConfiguration

        abort, addDependencies, addDependencies, addDependents, addDependents, cloneConfigure, deconfigure, destroy, expose, getDependencies, getDependents, getServerClasses, getSystemClasses, hide, isEnabledByDefault, 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 Detail

      • __replacedConfigurations

        public static final java.util.Set<java.lang.Class<? extends org.eclipse.jetty.webapp.Configuration>> __replacedConfigurations
      • ORIGIN_ATTRIBUTE

        public static final java.lang.String ORIGIN_ATTRIBUTE
        See Also:
        Constant Field Values
      • QUICKSTART_WEB_XML

        public static final java.lang.String QUICKSTART_WEB_XML
        See Also:
        Constant Field Values
    • Constructor Detail

      • QuickStartConfiguration

        public QuickStartConfiguration()
    • Method Detail

      • configureMode

        public static void configureMode​(org.eclipse.jetty.server.Server server,
                                         java.lang.String mode)
        Configure the server for the quickstart mode.

        In practise this means calling server.setDryRun(true) for GENERATE mode

        Parameters:
        server - The server to configure
        mode - The quickstart mode
        See Also:
        Server.setDryRun(boolean)
      • preConfigure

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

        protected void configure​(QuickStartGeneratorConfiguration generator,
                                 org.eclipse.jetty.webapp.WebAppContext context)
                          throws java.io.IOException
        Throws:
        java.io.IOException
      • configure

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

        public void postConfigure​(org.eclipse.jetty.webapp.WebAppContext context)
                           throws java.lang.Exception
        Specified by:
        postConfigure in interface org.eclipse.jetty.webapp.Configuration
        Overrides:
        postConfigure in class org.eclipse.jetty.webapp.AbstractConfiguration
        Throws:
        java.lang.Exception
      • quickStart

        protected void quickStart​(org.eclipse.jetty.webapp.WebAppContext context)
                           throws java.lang.Exception
        Throws:
        java.lang.Exception
      • getQuickStartWebXml

        public org.eclipse.jetty.util.resource.Resource getQuickStartWebXml​(org.eclipse.jetty.webapp.WebAppContext context)
                                                                     throws java.lang.Exception
        Get the quickstart-web.xml file as a Resource.
        Parameters:
        context - the web app context
        Returns:
        the Resource for the quickstart-web.xml
        Throws:
        java.lang.Exception - if unable to find the quickstart xml