Package com.vaadin.flow.server.startup
Class AbstractConfigurationFactory
java.lang.Object
com.vaadin.flow.server.startup.AbstractConfigurationFactory
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
DefaultApplicationConfigurationFactory,DeploymentConfigurationFactory
A configuration factory base logic which reads the token file.
- Author:
- Vaadin Ltd
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetConfigParametersUsingTokenData(tools.jackson.databind.JsonNode buildInfo) Returns the config parameters from the token file databuildInfo.protected StringgetTokenFileContent(Function<String, String> locationProvider) Gets the content of the token file with givenlocationProvider.protected voidsetDevModePropertiesUsingTokenData(Map<String, String> params, tools.jackson.databind.JsonNode buildInfo) Sets to the dev mode properties to the configuration parameters.protected voidverifyFolderExists(Map<String, String> params, String folder) Verify that given folder actually exists on the system if we are not in production mode.
-
Field Details
-
DEV_FOLDER_MISSING_MESSAGE
- See Also:
-
-
Constructor Details
-
AbstractConfigurationFactory
public AbstractConfigurationFactory()
-
-
Method Details
-
getConfigParametersUsingTokenData
protected Map<String,String> getConfigParametersUsingTokenData(tools.jackson.databind.JsonNode buildInfo) Returns the config parameters from the token file databuildInfo.- Parameters:
buildInfo- the token file data- Returns:
- the config parameters
-
setDevModePropertiesUsingTokenData
protected void setDevModePropertiesUsingTokenData(Map<String, String> params, tools.jackson.databind.JsonNode 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 data- See Also:
-
getTokenFileContent
Gets the content of the token file with givenlocationProvider.- Parameters:
locationProvider- the token file location provider- Returns:
- the token file location, may be
null
-
verifyFolderExists
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
-