Package de.xima.aspose.processor.core
Class AsposeWordConnector
- java.lang.Object
 - 
- de.xima.aspose.processor.core.AsposeWordConnector
 
 
- 
- All Implemented Interfaces:
 IAsposeConnector
public class AsposeWordConnector extends Object implements IAsposeConnector
Diese Klasse dient dazu ein Word-Dokument mit Formularinhalten zu befüllen und als PDF (andere, von Aspose unterstützte Ausgabetypen möglich) anzulegen.- Author:
 - XIMA MEDIA GmbH
 
 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected static org.slf4j.LoggerLOG 
- 
Constructor Summary
Constructors Constructor Description AsposeWordConnector() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IDataAdaptergetDataAdapter()com.aspose.words.DocumentgetDocument()List<com.aspose.words.Node>getElementsToDelete()EvaluationModegetEvaluationMode()IReplacergetReplacer()Map<com.aspose.words.Row,Boolean>getTablesToDelete()voidinitAspose(boolean useBackendParameter)Diese Methode dient dazu, das Aspose-Framework zu konfigurieren.voidinitAspose(boolean useBackendParameter, boolean useFullFieldName)voidloadDocument(InputStream srcStream)Loads a Word document from the given stream .voidloadDocument(String path)Loads a Word document from the file system.voidprocessDocument(IDataAdapter fda, IReplacer replacer)Processes the Word document, replacing all fields and functions.voidsaveDocument(OutputStream output, int saveFormat)Saves the current document to the given stream.voidsaveDocument(String outputFile)Saves the current document to the file system.voidsetEvaluationMode(EvaluationMode evaluationMode)Setzte den Modus unter dem Aspose laufen soll- 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait 
- 
Methods inherited from interface de.xima.aspose.processor.interfaces.IAsposeConnector
processDocument, processDocument, processDocument 
 - 
 
 - 
 
- 
- 
Method Detail
- 
getDataAdapter
public IDataAdapter getDataAdapter()
- Returns:
 - The current data adapter being used to process the document.
 
 
- 
getDocument
public com.aspose.words.Document getDocument()
- Returns:
 - The current document being processed.
 
 
- 
getElementsToDelete
public List<com.aspose.words.Node> getElementsToDelete()
 
- 
getEvaluationMode
public EvaluationMode getEvaluationMode()
- Specified by:
 getEvaluationModein interfaceIAsposeConnector
 
- 
getReplacer
public IReplacer getReplacer()
- Returns:
 - The current replacer used for the document.
 
 
- 
initAspose
public void initAspose(boolean useBackendParameter) throws ExceptionDescription copied from interface:IAsposeConnectorDiese Methode dient dazu, das Aspose-Framework zu konfigurieren. Hierbei wird die Aspose-Lizenz gesetzt sowie die Verwendung von Backendparametern, anstelle von Elementnamen- Specified by:
 initAsposein interfaceIAsposeConnector- Parameters:
 useBackendParameter- - Bool'scher Wert, der angibt ob Backendparameter verwendet werden- Throws:
 Exception- - Wenn die Lizenz ungültig ist oder nicht gefunden werden kann
 
- 
initAspose
public void initAspose(boolean useBackendParameter, boolean useFullFieldName) throws Exception- Specified by:
 initAsposein interfaceIAsposeConnector- Parameters:
 useBackendParameter- - Bool'scher Wert, der angibt ob Backendparameter verwendet werdenuseFullFieldName- - Bool'scher Wert, der angibt ob voll qualifizierte Name(z.B. elternelement.feld) als Original-Name verwendet werden soll oder nur der Feldname. Standardmäßig auf false gestellt.- Throws:
 Exception- - Wenn die Lizenz ungültig ist oder nicht gefunden werden kann- See Also:
 IAsposeConnector.initAspose(boolean)
 
- 
loadDocument
public void loadDocument(InputStream srcStream) throws Exception
Description copied from interface:IAsposeConnectorLoads a Word document from the given stream .- Specified by:
 loadDocumentin interfaceIAsposeConnector- Parameters:
 srcStream- Stream with the Word document.- Throws:
 Exception- When the stream could not be read.
 
- 
loadDocument
public void loadDocument(String path) throws Exception
Description copied from interface:IAsposeConnectorLoads a Word document from the file system.- Specified by:
 loadDocumentin interfaceIAsposeConnector- Parameters:
 path- Path to the Word file.- Throws:
 Exception- When the file could not be read.
 
- 
processDocument
public void processDocument(IDataAdapter fda, IReplacer replacer) throws Exception
Description copied from interface:IAsposeConnectorProcesses the Word document, replacing all fields and functions.- Specified by:
 processDocumentin interfaceIAsposeConnector- Parameters:
 fda- Form data adapter with the data to use.replacer- Optional replacer for replacing placeholders.- Throws:
 Exception- When the document could not be processed.
 
- 
saveDocument
public void saveDocument(OutputStream output, int saveFormat) throws Exception
Description copied from interface:IAsposeConnectorSaves the current document to the given stream.- Specified by:
 saveDocumentin interfaceIAsposeConnector- Parameters:
 output- Output stream to which to write the document.saveFormat- Format of the document, seeSaveFormat.- Throws:
 Exception- When the file could not be written.
 
- 
saveDocument
public void saveDocument(String outputFile) throws Exception
Description copied from interface:IAsposeConnectorSaves the current document to the file system.- Specified by:
 saveDocumentin interfaceIAsposeConnector- Parameters:
 outputFile- Path to the file to which to write the document.- Throws:
 Exception- When the file could not be written.
 
- 
setEvaluationMode
public void setEvaluationMode(EvaluationMode evaluationMode)
Setzte den Modus unter dem Aspose laufen soll- Specified by:
 setEvaluationModein interfaceIAsposeConnector
 
 - 
 
 -