@Beta public class ServiceOperatorSecretKeyFileSystemStructureParsingStrategy extends Object
FileSystemServiceBindingLoader.ParsingStrategy
interface that is capable of
transforming the default file system structure into service bindings based on properties (individual files) that have
been created by the ServiceOperator (e.g. in a K8s cluster), using the "SecretKey" behavior. Modifier and Type | Class and Description |
---|---|
static class |
ServiceOperatorSecretKeyFileSystemStructureParsingStrategy.ServiceOperatorSecretKeyFileSystemStructureParsingStrategyBuilder |
Modifier and Type | Method and Description |
---|---|
static ServiceOperatorSecretKeyFileSystemStructureParsingStrategy.ServiceOperatorSecretKeyFileSystemStructureParsingStrategyBuilder |
builder() |
static ServiceOperatorSecretKeyFileSystemStructureParsingStrategy |
getDefaultInstance() |
protected com.google.gson.JsonObject |
loadServiceBinding(Path serviceBindingRoot)
Transforms the content of the given
serviceBindingRoot into a JsonObject that represents a
service binding. |
Map<String,com.google.gson.JsonArray> |
parse(Path rootLocation)
Parses the given
rootLocation and returns all contained service bindings. |
protected static io.vavr.control.Option<com.google.gson.JsonObject> |
toJsonObject(String rawJsonObject)
Utility method to convert a given string into a
JsonObject . |
@Nullable protected com.google.gson.JsonObject loadServiceBinding(@Nonnull Path serviceBindingRoot)
serviceBindingRoot
into a JsonObject
that represents a
service binding. Exception
.serviceBindingRoot
- The Path
that points to the service binding's location.Option
that contains an instance of JsonObject
if the given serviceBindingRoot
contained a valid service binding, otherwise Option.none()
.@Nonnull public static ServiceOperatorSecretKeyFileSystemStructureParsingStrategy.ServiceOperatorSecretKeyFileSystemStructureParsingStrategyBuilder builder()
@Nonnull public static ServiceOperatorSecretKeyFileSystemStructureParsingStrategy getDefaultInstance()
@Nonnull public Map<String,com.google.gson.JsonArray> parse(@Nonnull Path rootLocation)
FileSystemServiceBindingLoader.ParsingStrategy
rootLocation
and returns all contained service bindings. Exception
.parse
in interface FileSystemServiceBindingLoader.ParsingStrategy
rootLocation
- The Path
to start the parsing from.@Nonnull protected static io.vavr.control.Option<com.google.gson.JsonObject> toJsonObject(@Nonnull String rawJsonObject)
JsonObject
.rawJsonObject
- The string to parse.Option
that contains an instance of JsonObject
if the given rawJsonObject
was
parsed successfully, otherwise Option.none()
.Copyright © 2021 SAP SE. All rights reserved.