public class DefaultApplicationConfigurationFactory extends AbstractConfigurationFactory implements ApplicationConfigurationFactory
ApplicationConfigurationFactory
.Modifier and Type | Class and Description |
---|---|
protected static class |
DefaultApplicationConfigurationFactory.ApplicationConfigurationImpl |
DEV_FOLDER_MISSING_MESSAGE
Constructor and Description |
---|
DefaultApplicationConfigurationFactory() |
Modifier and Type | Method and Description |
---|---|
ApplicationConfiguration |
create(VaadinContext context)
Creates a new instance of
ApplicationConfiguration for the given
context . |
protected DefaultApplicationConfigurationFactory.ApplicationConfigurationImpl |
doCreate(VaadinContext context,
FallbackChunk chunk,
Map<String,String> properties)
Creates application configuration instance based on provided data.
|
protected String |
getTokenFileFromClassloader(VaadinContext context)
Gets token file from the classpath using the provided
context . |
getConfigParametersUsingTokenData, getTokenFileContent, setDevModePropertiesUsingTokenData, verifyFolderExists
public DefaultApplicationConfigurationFactory()
public ApplicationConfiguration create(VaadinContext context)
ApplicationConfigurationFactory
ApplicationConfiguration
for the given
context
.create
in interface ApplicationConfigurationFactory
context
- the context to create a configuration forcontext
protected DefaultApplicationConfigurationFactory.ApplicationConfigurationImpl doCreate(VaadinContext context, FallbackChunk chunk, Map<String,String> properties)
context
- the Vaadin context, not null
chunk
- the fallback chunk, may be null
properties
- the context parameters, not null
protected String getTokenFileFromClassloader(VaadinContext context) throws IOException
context
.
The contextClass
may be a class which is defined in the Web
Application module/bundle and in this case it may be used to get Web
Application resources. Also a VaadinContext
context
instance may be used to get a context of the Web Application (since the
contextClass
may be a class not from Web Application module). In
WAR case it doesn't matter which class is used to get the resources (Web
Application classes or e.g. "flow-server" classes) since they are loaded
by the same ClassLoader
. But in OSGi "flow-server" module classes
can't be used to get Web Application resources since they are in
different bundles.
context
- a VaadinContext which may provide information how to get token
file for the web applicationIOException
- if I/O fails during access to the token fileCopyright © 2021. All rights reserved.