Package org.javlo.utils
Class DocxUtils
- java.lang.Object
-
- org.javlo.utils.DocxUtils
-
public class DocxUtils extends Object
-
-
Constructor Summary
Constructors Constructor Description DocxUtils()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static void_main(String[] args)static void_writeDocxXmlContent(String docxFile, String xml, OutputStream out)static StringcleanTokensDocx(String content)static List<ComponentBean>extractContent(GlobalContext globalContext, InputStream in, String resourceFolder)static StringgetDocxXmlContent(String docxFile)static voidmain(String[] args)static StringperformFillDocument(ContentContext ctx, RequestService rs)static List<org.apache.poi.xwpf.usermodel.XWPFParagraph>readDocxFile(File file)static voidreplaceTokens(String docxFile, Map<String,String> tokens)static voidwriteDocxXmlContent(String docxFile, String xml, OutputStream out)
-
-
-
Method Detail
-
main
public static void main(String[] args) throws fr.opensagres.xdocreport.converter.XDocConverterException, FileNotFoundException, IOException
- Throws:
fr.opensagres.xdocreport.converter.XDocConverterExceptionFileNotFoundExceptionIOException
-
extractContent
public static List<ComponentBean> extractContent(GlobalContext globalContext, InputStream in, String resourceFolder) throws fr.opensagres.xdocreport.converter.XDocConverterException, IOException
- Throws:
fr.opensagres.xdocreport.converter.XDocConverterExceptionIOException
-
performFillDocument
public static String performFillDocument(ContentContext ctx, RequestService rs) throws InstantiationException, IllegalAccessException, ClassNotFoundException, SQLException, PropertyVetoException, Exception
-
_main
public static void _main(String[] args) throws IOException
- Throws:
IOException
-
getDocxXmlContent
public static String getDocxXmlContent(String docxFile) throws IOException
- Throws:
IOException
-
_writeDocxXmlContent
public static void _writeDocxXmlContent(String docxFile, String xml, OutputStream out) throws IOException
- Throws:
IOException
-
writeDocxXmlContent
public static void writeDocxXmlContent(String docxFile, String xml, OutputStream out) throws IOException
- Throws:
IOException
-
replaceTokens
public static void replaceTokens(String docxFile, Map<String,String> tokens) throws IOException
- Throws:
IOException
-
readDocxFile
public static List<org.apache.poi.xwpf.usermodel.XWPFParagraph> readDocxFile(File file) throws IOException
- Throws:
IOException
-
-