public abstract class AbstractPropertyConfiguration extends Object implements AbstractConfiguration
Constructor and Description |
---|
AbstractPropertyConfiguration(Map<String,String> properties)
Creates a new instance with given
properties . |
Modifier and Type | Method and Description |
---|---|
<T> T |
getApplicationOrSystemProperty(String propertyName,
T defaultValue,
Function<String,T> converter)
Gets a configured property.
|
protected String |
getApplicationProperty(Function<String,String> valueProvider,
String propertyName)
Gets application property value using the
valueProvider . |
String |
getApplicationProperty(String parameterName)
Gets an application property value.
|
boolean |
getBooleanProperty(String name,
boolean defaultValue)
Gets a configured property as a boolean.
|
protected Map<String,String> |
getProperties()
Gets unmodifiable underlying properties.
|
String |
getStringProperty(String name,
String defaultValue)
Gets a configured property as a string.
|
protected String |
getSystemProperty(String parameterName)
Gets an system property value.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
enableDevServer, getBuildFolder, getFlowResourcesFolder, getJavaResourceFolder, isGlobalPnpm, isPnpmEnabled, isProductionMode, isUsageStatisticsEnabled, isXsrfProtectionEnabled, reuseDevServer, useV14Bootstrap
public String getStringProperty(String name, String defaultValue)
AbstractConfiguration
getStringProperty
in interface AbstractConfiguration
name
- The simple of the property, in some contexts, lookup might be
performed using variations of the provided name.defaultValue
- the default value that should be used if no value has been
definedpublic boolean getBooleanProperty(String name, boolean defaultValue)
AbstractConfiguration
getBooleanProperty
in interface AbstractConfiguration
name
- The simple of the property, in some contexts, lookup might be
performed using variations of the provided name.defaultValue
- the default value that should be used if no value has been
definedpublic String getApplicationProperty(String parameterName)
parameterName
- the Name or the parameter.protected Map<String,String> getProperties()
public <T> T getApplicationOrSystemProperty(String propertyName, T defaultValue, Function<String,T> converter)
T
- type of a propertypropertyName
- The simple of the property, in some contexts, lookup might be
performed using variations of the provided name.defaultValue
- the default value that should be used if no value has been
definedconverter
- the way string should be converted into the required propertyprotected String getSystemProperty(String parameterName)
parameterName
- the Name or the parameter.protected String getApplicationProperty(Function<String,String> valueProvider, String propertyName)
valueProvider
.valueProvider
- a value provider for the propertypropertyName
- the name or the parameter.Copyright © 2022. All rights reserved.