public final class FileContentResolver extends Object implements PropertyResolver
Example: a call to resolver.getProperty("&{file:/some/path}")
will return the content of
the /some/path file, provided it exists and is not empty.
If the key does not correspond to an existing non-empty file, or if an error occurs during
the reading of the file, then an IllegalStateException
is thrown.
Constructor and Description |
---|
FileContentResolver(Path serverInstancePath)
Creates a file content resolver.
|
Modifier and Type | Method and Description |
---|---|
Optional<String> |
getProperty(String key)
Returns the value of the specified property.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getProperty
public FileContentResolver(Path serverInstancePath)
serverInstancePath
- Path to server instancepublic Optional<String> getProperty(String key)
PropertyResolver
Optional
if the property is not
found.getProperty
in interface PropertyResolver
key
- The name of the requested property. The key can't be null.Optional
string that contains the value of the requested property, or empty Optional
if property is undefined.Copyright 2010-2018 ForgeRock AS.