public interface PropertiesResolver
name
from the
request-specific property bag, or the global runtime configuration
.Modifier and Type | Method and Description |
---|---|
static PropertiesResolver |
create(Configuration configuration,
PropertiesDelegate delegate)
Return new instance of
PropertiesResolver . |
<T> T |
resolveProperty(String name,
Class<T> type)
Resolve a property value for the specified property
name . |
<T> T |
resolveProperty(String name,
T defaultValue)
Resolve a property value for the specified property
name . |
<T> T resolveProperty(String name, Class<T> type)
name
.
The method returns the value of the property registered in the request-specific
property bag, if available. If no property for the given property name is found
in the request-specific property bag, the method looks at the properties stored
in the global runtime configuration
this request
belongs to. If there is a value defined in the runtime configuration,
it is returned, otherwise the method returns null
if no such property is
registered neither in the runtime nor in the request-specific property bag.
T
- property Java type.name
- property name.type
- expected property class type.null
if no such property is registered.<T> T resolveProperty(String name, T defaultValue)
name
.
The method returns the value of the property registered in the request-specific
property bag, if available. If no property for the given property name is found
in the request-specific property bag, the method looks at the properties stored
in the global runtime configuration
this request
belongs to. If there is a value defined in the runtime configuration,
it is returned, otherwise the method returns defaultValue
if no such property is
registered neither in the runtime nor in the request-specific property bag.
T
- property Java type.name
- property name.defaultValue
- default value to return if the property is not registered.defaultValue
if no such property is registered.static PropertiesResolver create(Configuration configuration, PropertiesDelegate delegate)
PropertiesResolver
.configuration
- Runtime Configuration
.delegate
- Request scoped properties delegate
.PropertiesResolver
.Copyright © 2007-2023, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.