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 String
cleanTokensDocx(String content)
static List<ComponentBean>
extractContent(GlobalContext globalContext, InputStream in, String resourceFolder)
static String
getDocxXmlContent(String docxFile)
static void
main(String[] args)
static String
performFillDocument(ContentContext ctx, RequestService rs)
static List<org.apache.poi.xwpf.usermodel.XWPFParagraph>
readDocxFile(File file)
static void
replaceTokens(String docxFile, Map<String,String> tokens)
static void
writeDocxXmlContent(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.XDocConverterException
FileNotFoundException
IOException
-
extractContent
public static List<ComponentBean> extractContent(GlobalContext globalContext, InputStream in, String resourceFolder) throws fr.opensagres.xdocreport.converter.XDocConverterException, IOException
- Throws:
fr.opensagres.xdocreport.converter.XDocConverterException
IOException
-
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
-
-