com.vaadin.flow.server.startup.
Class AbstractConfigurationFactory
- java.lang.Object
-
- com.vaadin.flow.server.startup.AbstractConfigurationFactory
-
All Implemented Interfaces:
Direct Known Subclasses:
DefaultApplicationConfigurationFactory
,DeploymentConfigurationFactory
public class AbstractConfigurationFactory extends Object implements Serializable
A configuration factory base logic which reads the token file.
Since:
Author:
Vaadin Ltd
See Also:
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEV_FOLDER_MISSING_MESSAGE
-
Constructor Summary
Constructors Constructor Description AbstractConfigurationFactory()
-
Method Summary
All Methods Modifier and Type Method Description protected Map<String,String>
getConfigParametersUsingTokenData(elemental.json.JsonObject buildInfo)
Returns the config parameters from the token file data
buildInfo
.protected String
getTokenFileContent(Function<String,String> locationProvider)
Gets the content of the token file with given
locationProvider
.protected void
setDevModePropertiesUsingTokenData(Map<String,String> params, elemental.json.JsonObject buildInfo)
Sets to the dev mode properties to the configuration parameters.
protected void
verifyFolderExists(Map<String,String> params, String folder)
Verify that given folder actually exists on the system if we are not in production mode.
-
-
-
Field Detail
-
DEV_FOLDER_MISSING_MESSAGE
public static final String DEV_FOLDER_MISSING_MESSAGE
See Also:
-
-
Method Detail
-
getConfigParametersUsingTokenData
protected Map<String,String> getConfigParametersUsingTokenData(elemental.json.JsonObject buildInfo)
Returns the config parameters from the token file data
buildInfo
.Parameters:
buildInfo
- the token file dataReturns:
the config parameters
-
setDevModePropertiesUsingTokenData
protected void setDevModePropertiesUsingTokenData(Map<String,String> params, elemental.json.JsonObject buildInfo)
Sets to the dev mode properties to the configuration parameters.
Parameters:
params
- the configuration parameters to set dev mode properties tobuildInfo
- the token file dataSee Also:
-
getTokenFileContent
protected String getTokenFileContent(Function<String,String> locationProvider)
Gets the content of the token file with given
locationProvider
.Parameters:
locationProvider
- the token file location providerReturns:
the token file location, may be
null
-
verifyFolderExists
protected void verifyFolderExists(Map<String,String> params, String folder)
Verify that given folder actually exists on the system if we are not in production mode.
If folder doesn't exist throw IllegalStateException saying that this should probably be a production mode build.
Parameters:
params
- parameters mapfolder
- folder to check exists
-
-