use of com.fasterxml.jackson.annotation.JsonValue in project graylog2-server by Graylog2.
the class ConfigurationRequest method asList.
@JsonValue
public Map<String, Map<String, Object>> asList() {
final Map<String, Map<String, Object>> configs = Maps.newLinkedHashMap();
for (ConfigurationField f : fields.values()) {
final Map<String, Object> config = Maps.newHashMap();
config.put("type", f.getFieldType());
config.put("human_name", f.getHumanName());
config.put("description", f.getDescription());
config.put("default_value", f.getDefaultValue());
config.put("is_optional", f.isOptional().equals(ConfigurationField.Optional.OPTIONAL));
config.put("attributes", f.getAttributes());
config.put("additional_info", f.getAdditionalInformation());
configs.put(f.getName(), config);
}
return configs;
}
Aggregations