public class PoiTemplate extends Object
| 限定符和类型 | 字段和说明 |
|---|---|
static PoiTemplate |
INSTANCE
Singleton instance of PoiTemplate.
|
| 限定符和类型 | 方法和说明 |
|---|---|
protected List<ElementMeta> |
convertToElementMetas(List<com.deepoove.poi.template.MetaTemplate> elementTemplates)
Converts element templates to element metadata, removing duplicates.
|
<R> R |
render(InputStream inputStream,
com.deepoove.poi.config.Configure configure,
RenderFunction<R> function)
Renders the template using the provided render function.
|
void |
renderWord(File source,
File dest,
List<LabelData> contents)
Renders a Word document from source file to destination file using label data.
|
void |
renderWord(File source,
File dest,
List<LabelData> contents,
com.deepoove.poi.config.Configure configure)
Renders a Word document from source file to destination file using label data and
custom configuration.
|
void |
renderWord(File source,
File dest,
Map<String,Object> data)
Renders a Word document from source file to destination file using data map.
|
void |
renderWord(File source,
File dest,
Map<String,Object> data,
com.deepoove.poi.config.Configure configure)
Renders a Word document from source file to destination file using data map and
custom configuration.
|
void |
renderWord(InputStream inputStream,
OutputStream outputStream,
List<LabelData> contents)
Renders a Word document from input stream to output stream using label data.
|
void |
renderWord(InputStream inputStream,
OutputStream outputStream,
List<LabelData> contents,
com.deepoove.poi.config.Configure configure)
Renders a Word document from input stream to output stream using label data and
custom configuration.
|
void |
renderWord(InputStream inputStream,
OutputStream outputStream,
Map<String,Object> dataMap)
Renders a Word document from input stream to output stream using data map.
|
void |
renderWord(InputStream inputStream,
OutputStream outputStream,
Map<String,Object> dataMap,
com.deepoove.poi.config.Configure configure)
Renders a Word document from input stream to output stream using data map and
custom configuration.
|
List<ElementMeta> |
templateElement(InputStream inputStream)
Extracts template elements from the input stream using default configuration.
|
List<ElementMeta> |
templateElement(InputStream inputStream,
com.deepoove.poi.config.Configure configure)
Extracts template elements from the input stream using custom configuration.
|
public static final PoiTemplate INSTANCE
public void renderWord(File source, File dest, List<LabelData> contents)
source - the source Word template filedest - the destination file to write the rendered documentcontents - the list of label data to renderpublic void renderWord(File source, File dest, List<LabelData> contents, com.deepoove.poi.config.Configure configure)
source - the source Word template filedest - the destination file to write the rendered documentcontents - the list of label data to renderconfigure - the custom configuration to usepublic void renderWord(File source, File dest, Map<String,Object> data)
source - the source Word template filedest - the destination file to write the rendered documentdata - the data map containing template variablespublic void renderWord(File source, File dest, Map<String,Object> data, com.deepoove.poi.config.Configure configure)
source - the source Word template filedest - the destination file to write the rendered documentdata - the data map containing template variablesconfigure - the custom configuration to usepublic void renderWord(InputStream inputStream, OutputStream outputStream, List<LabelData> contents)
inputStream - the input stream containing the Word templateoutputStream - the output stream to write the rendered documentcontents - the list of label data to renderpublic void renderWord(InputStream inputStream, OutputStream outputStream, List<LabelData> contents, com.deepoove.poi.config.Configure configure)
inputStream - the input stream containing the Word templateoutputStream - the output stream to write the rendered documentcontents - the list of label data to renderconfigure - the custom configuration to usepublic void renderWord(InputStream inputStream, OutputStream outputStream, Map<String,Object> dataMap)
inputStream - the input stream containing the Word templateoutputStream - the output stream to write the rendered documentdataMap - the data map containing template variablespublic void renderWord(InputStream inputStream, OutputStream outputStream, Map<String,Object> dataMap, com.deepoove.poi.config.Configure configure)
inputStream - the input stream containing the Word templateoutputStream - the output stream to write the rendered documentdataMap - the data map containing template variablesconfigure - the custom configuration to usepublic List<ElementMeta> templateElement(InputStream inputStream)
inputStream - the input stream containing the Word templatepublic List<ElementMeta> templateElement(InputStream inputStream, com.deepoove.poi.config.Configure configure)
inputStream - the input stream containing the Word templateconfigure - the custom configuration to usepublic <R> R render(InputStream inputStream, com.deepoove.poi.config.Configure configure, RenderFunction<R> function)
R - the type of the render resultinputStream - the input stream containing the Word templateconfigure - the configuration to usefunction - the render function to applyprotected List<ElementMeta> convertToElementMetas(List<com.deepoove.poi.template.MetaTemplate> elementTemplates)
elementTemplates - the list of element templates to convertCopyright © 2025. All rights reserved.