public final class Cdn extends Object
configure() method or you can take a look at predefined instances in CdnFactory.| Modifier and Type | Method and Description |
|---|---|
static CdnSettings |
configure()
Build custom CDN instance.
|
CdnSettings |
getSettings()
Get settings used by this CDN instance
|
Configuration |
load(Source source)
Load configuration as default
Configuration structure. |
<T> T |
load(Source source,
Class<T> configurationClass)
Load configuration from the given source and map default
Configuration structure into the given configuration class. |
<T> T |
load(Source source,
T instance)
Load configuration from the given source and map default
Configuration structure into the given configuration class. |
String |
render(Element<?> element)
Convert the given configuration instance to the output string
|
void |
render(Element<?> element,
File output)
Convert the given instance using
render(net.dzikoysk.cdn.model.Element) method and save the output in the given file using UTF-8 charset. |
void |
render(Element<?> element,
Path output)
Convert the given instance using
render(net.dzikoysk.cdn.model.Element) method and save the output in the given file using UTF-8 charset. |
String |
render(Object entity)
Convert the given instance to the output string
|
void |
render(Object entity,
File output)
Convert the given instance using
render(Object) method and save the output in the given file using UTF-8 charset. |
void |
render(Object entity,
Path output)
Convert the given instance using
render(Object) method and save the output in the given file using UTF-8 charset. |
public static CdnSettings configure()
CdnFactory class.CdnFactorypublic Configuration load(Source source)
Configuration structure.source - the source to loadSourcepublic <T> T load(Source source, Class<T> configurationClass) throws Exception
Configuration structure into the given configuration class.T - the expected typesource - the source to loadconfigurationClass - the class to useConfiguration structureException - in case of any deserialization errorpublic <T> T load(Source source, T instance) throws Exception
Configuration structure into the given configuration class.T - the expected typesource - the source to loadinstance - the instance to useConfiguration structureException - in case of any deserialization errorpublic String render(Object entity)
entity - the instance to convertpublic void render(Object entity, File output) throws IOException
render(Object) method and save the output in the given file using UTF-8 charset.entity - the instance to convertoutput - the output fileIOExceptionpublic void render(Object entity, Path output) throws IOException
render(Object) method and save the output in the given file using UTF-8 charset.entity - the instance to convertoutput - the output fileIOExceptionpublic String render(Element<?> element)
element - the element to convertpublic void render(Element<?> element, File output) throws IOException
render(net.dzikoysk.cdn.model.Element) method and save the output in the given file using UTF-8 charset.element - the element to convertoutput - the output fileIOExceptionpublic void render(Element<?> element, Path output) throws IOException
render(net.dzikoysk.cdn.model.Element) method and save the output in the given file using UTF-8 charset.element - the element to convertoutput - the output fileIOExceptionpublic CdnSettings getSettings()
Copyright © 2021. All rights reserved.