public class Config extends Object
| Constructor and Description |
|---|
Config() |
Config(Config oldConfig)
For internal use when no overriding config to drive the conversion is found.
|
| Modifier and Type | Method and Description |
|---|---|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
static Config |
fromJSON(File file)
Creates config object from JSON string stored in the file.
|
static Config |
fromJSON(File file,
ClassLoader classLoader)
Creates config object from JSON string stored in the file using the input
ClassLoader. |
static Config |
fromJSON(InputStream inputStream)
Creates config object from input stream.
|
static Config |
fromJSON(Reader reader)
Creates config object from JSON String via
Reader. |
static Config |
fromJSON(String content)
Creates config object from JSON string.
|
static Config |
fromJSON(URL url)
Creates config object from JSON string that will be fetched from the
URL. |
static Config |
fromYAML(File file)
Creates config object from YAML string stored in the file.
|
static Config |
fromYAML(File file,
ClassLoader classLoader)
Creates config object from YAML string stored in the file using the input
ClassLoader. |
static Config |
fromYAML(InputStream inputStream)
Creates config object from input stream.
|
static Config |
fromYAML(Reader reader)
Creates config object from YAML String via
Reader. |
static Config |
fromYAML(String content)
Creates config object from YAML string.
|
static Config |
fromYAML(URL url)
Creates config object from YAML string that will be fetched from the
URL. |
AdType |
getAdType(String impressionId) |
Boolean |
getDisableCloning() |
Boolean |
getNativeRequestAsString() |
Boolean |
getNativeResponseAsString() |
OpenRtbVersion |
getOpenRtbVersion2_XVersion() |
Boolean |
getValidate() |
int |
hashCode() |
Boolean |
isCloningDisabled() |
void |
setAdTypeMapping(Map<String,AdType> adTypeMapping) |
void |
setDisableCloning(Boolean disableCloning) |
void |
setNativeRequestAsString(Boolean nativeRequestAsString) |
void |
setNativeResponseAsString(Boolean nativeResponseAsString) |
void |
setOpenRtbVersion2_XVersion(OpenRtbVersion openRtbVersion2_XVersion) |
void |
setValidate(Boolean validate) |
String |
toJSON()
Converts current configuration to JSON format
|
String |
toString() |
String |
toYAML()
Converts current configuration to YAML format
|
void |
updateEmptyFields(Config config)
Sets the fields that are not present in the conversion request.
|
public Config(Config oldConfig)
oldConfig - the last set / updated configpublic Config()
public static Config fromJSON(String content) throws IOException
content - of configConfigIOException - when reading failspublic static Config fromJSON(InputStream inputStream) throws IOException
inputStream - see appropriate implementation of InputStreamConfigIOException - when reading failspublic static Config fromJSON(File file, ClassLoader classLoader) throws IOException
ClassLoader.file - object see FileclassLoader - see ClassLoaderConfigIOException - when reading failspublic static Config fromJSON(File file) throws IOException
file - object see FileConfigIOException - when reading failspublic static Config fromJSON(URL url) throws IOException
URL.url - object see URLConfigIOException - when reading failspublic static Config fromJSON(Reader reader) throws IOException
Reader.reader - see appropriate implementation of ReaderConfigIOException - when reading failspublic static Config fromYAML(String content) throws IOException
content - YAML stringConfigIOException - when reading failspublic static Config fromYAML(InputStream inputStream) throws IOException
inputStream - see appropriate implementation of InputStreamConfigIOException - when reading failspublic static Config fromYAML(File file) throws IOException
file - object see FileConfigIOException - when reading failspublic static Config fromYAML(File file, ClassLoader classLoader) throws IOException
ClassLoader.file - object see FileclassLoader - see ClassLoaderConfigIOException - when reading failspublic static Config fromYAML(URL url) throws IOException
URL.url - object see URLConfigIOException - when reading failspublic static Config fromYAML(Reader reader) throws IOException
Reader.reader - see appropriate implementation of ReaderConfigIOException - when reading failspublic void updateEmptyFields(Config config)
config - see Configpublic Boolean getNativeRequestAsString()
public void setNativeRequestAsString(Boolean nativeRequestAsString)
public Boolean getNativeResponseAsString()
public void setNativeResponseAsString(Boolean nativeResponseAsString)
public Boolean getValidate()
public void setValidate(Boolean validate)
public Boolean isCloningDisabled()
public OpenRtbVersion getOpenRtbVersion2_XVersion()
public void setOpenRtbVersion2_XVersion(OpenRtbVersion openRtbVersion2_XVersion)
public String toJSON() throws IOException
IOException - when conversion failspublic String toYAML() throws IOException
IOException - when conversion failspublic Boolean getDisableCloning()
public void setDisableCloning(Boolean disableCloning)
protected boolean canEqual(Object other)
Copyright © 2019. All rights reserved.