Package org.apache.felix.cm.json.io
Interface ConfigurationReader.Builder
-
- Enclosing interface:
- ConfigurationReader
public static interface ConfigurationReader.BuilderBuilder to create a reader. A builder can be obtained usingConfigurations.buildReader()
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ConfigurationReaderbuild(jakarta.json.JsonObject object)Build the configuration reader for the JSON object.ConfigurationReaderbuild(java.io.Reader reader)Build the configuration reader for the provided reader.ConfigurationReader.BuilderverifyAsBundleResource(boolean flag)By default a configuration resource is not treated as a bundle resource.ConfigurationReader.BuilderwithBinaryHandler(ConfigurationReader.BinaryHandler handler)Set the binary handler.ConfigurationReader.BuilderwithConfiguratorPropertyHandler(ConfigurationReader.ConfiguratorPropertyHandler handler)Set the configurator property handler.ConfigurationReader.BuilderwithIdentifier(java.lang.String identifier)Set an identifier.
-
-
-
Method Detail
-
verifyAsBundleResource
ConfigurationReader.Builder verifyAsBundleResource(boolean flag)
By default a configuration resource is not treated as a bundle resource. Additional rules apply for a resource outside of a bundle.- Parameters:
flag- Enable or disable verification as bundle resource- Returns:
- This builder
-
withIdentifier
ConfigurationReader.Builder withIdentifier(java.lang.String identifier)
Set an identifier. If set all ignored error messages and most exceptions will contain this identifier.- Parameters:
identifier- An identifier for the resource- Returns:
- This builder
-
withBinaryHandler
ConfigurationReader.Builder withBinaryHandler(ConfigurationReader.BinaryHandler handler)
Set the binary handler. If no binary handler is set and a binary property is encountered the reading of the configuration resource fails.- Parameters:
handler- The binary handler- Returns:
- This builder
-
withConfiguratorPropertyHandler
ConfigurationReader.Builder withConfiguratorPropertyHandler(ConfigurationReader.ConfiguratorPropertyHandler handler)
Set the configurator property handler. If no handler is set and a configurator property is encountered it is added as is to the returned configuration dictionary.- Parameters:
handler- The binary handler- Returns:
- This builder
-
build
ConfigurationReader build(java.io.Reader reader)
Build the configuration reader for the provided reader.- Parameters:
reader- The reader for the JSON- Returns:
- The configuration reader
-
build
ConfigurationReader build(jakarta.json.JsonObject object)
Build the configuration reader for the JSON object.- Parameters:
object- The JSON object- Returns:
- The configuration reader
-
-