Package ru.vyarus.guicey.gsp.app
Class ServerPagesApp
- java.lang.Object
-
- ru.vyarus.guicey.gsp.app.ServerPagesApp
-
public class ServerPagesApp extends java.lang.ObjectServer pages application initialization logic. Application register:- Special assets servlet (with multiple classpath locations support)
- Main
ServerPagesFilteraround assets servlet which differentiate asset and template requests (and handle error pages)
- Since:
- 11.01.2019
-
-
Field Summary
Fields Modifier and Type Field Description protected AssetSourcesassetLocationsprotected AssetLookupassetsprotected java.util.Map<java.lang.Integer,java.lang.String>errorPagesprotected java.lang.StringfileRequestPatternprotected java.lang.StringfullUriPathprotected java.util.List<HiddenViewPath>hiddenViewPathsprotected java.lang.StringindexFileprotected java.lang.StringmainAssetsPathprotected booleanmainContextprotected java.lang.Stringnameprotected java.util.List<java.lang.String>requiredRenderersprotected java.lang.StringspaNoRedirectRegexprotected booleanspaSupportprotected TemplateRedirecttemplateRedirectprotected java.lang.StringuriPathprotected java.util.List<MappedViewPath>viewPathsprotected ViewRestSourcesviewPrefixesprotected ViewRestLookupviewsprotected java.util.Map<java.lang.String,ViewRendererConfigurationModifier>viewsConfigModifiers
-
Constructor Summary
Constructors Constructor Description ServerPagesApp()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description GspAppgetInfo(GlobalConfig config)java.lang.StringgetName()voidinstall(io.dropwizard.setup.Environment environment, GlobalConfig config)Install configured server page app.protected booleanisStarted()voidjerseyStarted(java.lang.String restContext, java.lang.String restMapping, RestPathsAnalyzer analyzer)Delayed initialization.
-
-
-
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
-
viewsConfigModifiers
protected final java.util.Map<java.lang.String,ViewRendererConfigurationModifier> viewsConfigModifiers
-
assetLocations
protected final AssetSources assetLocations
-
viewPrefixes
protected final ViewRestSources viewPrefixes
-
errorPages
protected final java.util.Map<java.lang.Integer,java.lang.String> errorPages
-
fullUriPath
protected java.lang.String fullUriPath
-
templateRedirect
protected TemplateRedirect templateRedirect
-
assets
protected AssetLookup assets
-
views
protected ViewRestLookup views
-
viewPaths
protected java.util.List<MappedViewPath> viewPaths
-
hiddenViewPaths
protected java.util.List<HiddenViewPath> hiddenViewPaths
-
-
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 objectconfig- 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
-
getInfo
public GspApp getInfo(GlobalConfig config)
-
isStarted
protected boolean isStarted()
- Returns:
- true if application already started, false otherwise
-
-