public final class StandardWriterResolver extends Object implements WriterResolver
WriterResolver.| Constructor and Description |
|---|
StandardWriterResolver(PlaceholderResolverFactory placeholderResolverFactory,
String encoding,
TemplateFormat templateFormat)
Creates a new
StandardWriterResolver that will use a
PropertyPlaceholderHelper.PlaceholderResolver created from the given
placeholderResolverFactory to resolve any placeholders in the
operationName. |
StandardWriterResolver(PropertyPlaceholderHelper.PlaceholderResolver placeholderResolver)
Deprecated.
since 1.1.0 in favor of
StandardWriterResolver(PlaceholderResolverFactory, String, TemplateFormat) |
| Modifier and Type | Method and Description |
|---|---|
Writer |
resolve(String operationName,
String snippetName,
RestDocumentationContext context)
Returns a writer that can be used to write the snippet with the given name for the
operation with the given name.
|
void |
setEncoding(String encoding)
Deprecated.
|
@Deprecated public StandardWriterResolver(PropertyPlaceholderHelper.PlaceholderResolver placeholderResolver)
StandardWriterResolver(PlaceholderResolverFactory, String, TemplateFormat)StandardWriterResolver that will use the given
placeholderResolver to resolve any placeholders in the
operationName. Writers will use UTF-8 encoding and, when writing to
a file, will use a filename appropriate for Asciidoctor content.placeholderResolver - the placeholder resolverpublic StandardWriterResolver(PlaceholderResolverFactory placeholderResolverFactory, String encoding, TemplateFormat templateFormat)
StandardWriterResolver that will use a
PropertyPlaceholderHelper.PlaceholderResolver created from the given
placeholderResolverFactory to resolve any placeholders in the
operationName. Writers will use the given encoding and, when
writing to a file, will use a filename appropriate for content generated from
templates in the given templateFormat.placeholderResolverFactory - the placeholder resolver factoryencoding - the encodingtemplateFormat - the snippet formatpublic Writer resolve(String operationName, String snippetName, RestDocumentationContext context) throws IOException
WriterResolverresolve in interface WriterResolveroperationName - the name of the operation that is being documentedsnippetName - the name of the snippetcontext - the current documentation contextIOException - if a writer cannot be resolved@Deprecated public void setEncoding(String encoding)
WriterResolversetEncoding in interface WriterResolverencoding - the encoding