public class PrintConfigCommand
extends io.bootique.command.CommandWithMetadata
| Constructor and Description |
|---|
PrintConfigCommand(com.google.inject.Provider<io.bootique.log.BootLogger> bootLogger,
com.google.inject.Provider<io.bootique.meta.module.ModulesMetadata> modulesMetadata,
com.google.inject.Injector injector)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
protected void |
extractConfigValues(Map<String,Object> yaml,
List<io.bootique.meta.config.ConfigMetadataNode> configs)
Extract the definition from the given configurations.
|
protected String |
generateJson(Map<String,Object> map)
Generate the Json representation of the given map.
|
protected String |
generateXml(Map<String,Object> map)
Generate the Xml representation of the given map.
|
protected String |
generateYaml(Map<String,Object> map)
Generate the Yaml representation of the given map.
|
io.bootique.command.CommandOutcome |
run(io.bootique.cli.Cli cli) |
public PrintConfigCommand(com.google.inject.Provider<io.bootique.log.BootLogger> bootLogger,
com.google.inject.Provider<io.bootique.meta.module.ModulesMetadata> modulesMetadata,
com.google.inject.Injector injector)
bootLogger - the boot logger.modulesMetadata - the metadata of the bootique modules.injector - the injector.public io.bootique.command.CommandOutcome run(io.bootique.cli.Cli cli)
run in interface io.bootique.command.Commandrun in class io.bootique.command.CommandWithMetadataprotected void extractConfigValues(Map<String,Object> yaml, List<io.bootique.meta.config.ConfigMetadataNode> configs)
yaml - the to fill out.configs - the configurations.protected String generateYaml(Map<String,Object> map) throws com.fasterxml.jackson.core.JsonProcessingException
map - the map to print out.com.fasterxml.jackson.core.JsonProcessingException - when the Json cannot be processed.protected String generateJson(Map<String,Object> map) throws com.fasterxml.jackson.core.JsonProcessingException
map - the map to print out.com.fasterxml.jackson.core.JsonProcessingException - when the Json cannot be processed.protected String generateXml(Map<String,Object> map) throws com.fasterxml.jackson.core.JsonProcessingException
map - the map to print out.com.fasterxml.jackson.core.JsonProcessingException - when XML cannot be processed.Copyright © 2006-2019 Arakhnê.org Members. All rights reserved, under the terms of the Apache 2 license.