Class WebAppPropertyConverter


  • public class WebAppPropertyConverter
    extends java.lang.Object
    WebAppPropertyConverter Converts a webapp's configuration to a properties file, and vice versa.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static void fromProperties​(JettyWebAppContext webApp, java.io.File propsFile, Server server, java.util.Map<java.lang.String,​java.lang.String> jettyProperties)
      Configure a webapp from a properties file
      static void fromProperties​(JettyWebAppContext webApp, java.lang.String resource, Server server, java.util.Map<java.lang.String,​java.lang.String> jettyProperties)
      Configure a webapp from a properties file.
      static void toProperties​(JettyWebAppContext webApp, java.io.File propsFile, java.lang.String contextXml)
      Convert a webapp to properties stored in a file.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • WebAppPropertyConverter

        public WebAppPropertyConverter()
    • Method Detail

      • toProperties

        public static void toProperties​(JettyWebAppContext webApp,
                                        java.io.File propsFile,
                                        java.lang.String contextXml)
                                 throws java.lang.Exception
        Convert a webapp to properties stored in a file.
        Parameters:
        webApp - the webapp to convert
        propsFile - the file to put the properties into
        contextXml - the optional context xml file related to the webApp
        Throws:
        java.lang.Exception - if any I/O exception occurs
      • fromProperties

        public static void fromProperties​(JettyWebAppContext webApp,
                                          java.lang.String resource,
                                          Server server,
                                          java.util.Map<java.lang.String,​java.lang.String> jettyProperties)
                                   throws java.lang.Exception
        Configure a webapp from a properties file.
        Parameters:
        webApp - the webapp to configure
        resource - the properties file to apply
        server - the Server instance to use
        jettyProperties - jetty properties to use if there is a context xml file to apply
        Throws:
        java.lang.Exception - if any I/O exception occurs
      • fromProperties

        public static void fromProperties​(JettyWebAppContext webApp,
                                          java.io.File propsFile,
                                          Server server,
                                          java.util.Map<java.lang.String,​java.lang.String> jettyProperties)
                                   throws java.lang.Exception
        Configure a webapp from a properties file
        Parameters:
        webApp - the webapp to configure
        propsFile - the properties to apply
        server - the Server instance to use if there is a context xml file to apply
        jettyProperties - jetty properties to use if there is a context xml file to apply
        Throws:
        java.lang.Exception - if any I/O exception occurs