Class ServerPagesApp


  • public class ServerPagesApp
    extends java.lang.Object
    Server pages application initialization logic. Application register:
    • Special assets servlet (with multiple classpath locations support)
    • Main ServerPagesFilter around assets servlet which differentiate asset and template requests (and handle error pages)
    Since:
    11.01.2019
    • Field Detail

      • name

        protected java.lang.String name
      • mainContext

        protected boolean mainContext
      • mainAssetsPath

        protected java.lang.String mainAssetsPath
      • uriPath

        protected java.lang.String uriPath
      • indexFile

        protected java.lang.String indexFile
      • fileRequestPattern

        protected java.lang.String fileRequestPattern
      • requiredRenderers

        protected java.util.List<java.lang.String> requiredRenderers
      • spaSupport

        protected boolean spaSupport
      • spaNoRedirectRegex

        protected java.lang.String spaNoRedirectRegex
      • assetLocations

        protected final AssetSources assetLocations
      • errorPages

        protected final java.util.Map<java.lang.Integer,​java.lang.String> errorPages
      • fullUriPath

        protected java.lang.String fullUriPath
      • hiddenViewPaths

        protected java.util.List<HiddenViewPath> hiddenViewPaths
    • Constructor Detail

      • ServerPagesApp

        public ServerPagesApp()
    • Method Detail

      • getName

        public java.lang.String getName()
        Returns:
        application name
      • install

        public void install​(io.dropwizard.setup.Environment environment,
                            GlobalConfig config)
        Install configured server page app. Called after all guicey bundles processing (when all extensions registered).
        Parameters:
        environment - dropwizard environment object
        config - global configuration object
      • jerseyStarted

        public void jerseyStarted​(java.lang.String restContext,
                                  java.lang.String restMapping,
                                  RestPathsAnalyzer analyzer)
        Delayed initialization. Important to call when jersey initialization finished to get correct rest path and make sure all extended registrations (other bundles extending app) are performed.
        Parameters:
        restContext - rest context mapping ( == main context mapping)
        restMapping - servlet mapping (under main context)
        analyzer - rest analyzer
      • isStarted

        protected boolean isStarted()
        Returns:
        true if application already started, false otherwise