public class MessageToStringResolver extends Object implements AdditionalStringResolver
Constructor and Description |
---|
MessageToStringResolver() |
Modifier and Type | Method and Description |
---|---|
Optional<String> |
resolve(String key,
Map<?,?> props1,
Map<?,?> props2,
Set<String> propsToHide,
String delimStart,
String delimStop,
boolean resolveWithPropertyName)
Method to implement string resolution.
|
public Optional<String> resolve(String key, Map<?,?> props1, Map<?,?> props2, Set<String> propsToHide, String delimStart, String delimStop, boolean resolveWithPropertyName)
AdditionalStringResolver
Parameters are mostly as from StringResolver.substVars(String, Map, Map, Set, String, String, boolean)
, except the first parameter,
key
, which is the key to be resolved instead of the full string in which to substitute.
resolve
in interface AdditionalStringResolver
key
- Key to look upprops1
- First property map in which to look up valuesprops2
- Second property map in which to look up valuespropsToHide
- List of properties to hide. If null
, then no hiding of properties should be done.
If not null
, any properties whose name is in the collection will be hidden by
the caller but the implementation may make its own decision on hiding property values.
For instance, hiding credentials.delimStart
- Start delimiter, normally only needed by callerdelimStop
- End delimiter, normally only needed by callerresolveWithPropertyName
- Flag if values should be prefixed with name of resolved property, normally only
needed by caller.Optional.empty()
if it cannot be resolved by this implementation. If Optional.empty()
is
returned, the StringResolver
will then continue to try resolving the key
. If any non-empty Optional
is returned,
the StringResolver
will use the value of that as value for the key
and not look for other resolutions for the key.Copyright © 2023 Frank!Framework. All rights reserved.