Class PrefixedConfigurationPropertySource
java.lang.Object
org.hibernate.search.engine.cfg.impl.PrefixedConfigurationPropertySource
- All Implemented Interfaces:
ConfigurationPropertySource
public class PrefixedConfigurationPropertySource
extends Object
implements ConfigurationPropertySource
-
Constructor Summary
ConstructorsConstructorDescriptionPrefixedConfigurationPropertySource(ConfigurationPropertySource propertiesToPrefix, String prefix) -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.hibernate.search.engine.cfg.ConfigurationPropertySource
withFallback, withMask, withOverride
-
Constructor Details
-
PrefixedConfigurationPropertySource
public PrefixedConfigurationPropertySource(ConfigurationPropertySource propertiesToPrefix, String prefix)
-
-
Method Details
-
get
- Specified by:
getin interfaceConfigurationPropertySource- Parameters:
key- The key of the property to get.- Returns:
- An optional containing the value of the requested property,
or
Optional.empty()if the property is missing.
-
resolve
- Specified by:
resolvein interfaceConfigurationPropertySource- Parameters:
key- The key of the property to get.- Returns:
- An optional containing the key as registered in the underlying configuration source,
with any transformation (
prefixes,masks) reverted. Whether the optional is empty is not related to the key having a value in the underlying configuration source; instead, the optional is empty only if the key cannot possibly be registered in the underlying configuration source, e.g. if the key is missing a mandatory prefix.
-
withPrefix
- Specified by:
withPrefixin interfaceConfigurationPropertySource- Parameters:
prefix- A prefix to prepend to configuration properties.- Returns:
- A source containing the same properties as this source, but prefixed with the given prefix plus ".".
-
toString
-