main.java.pro.verron.officestamper.preset.ExperimentalStampers Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of engine Show documentation
Show all versions of engine Show documentation
Office-stamper is a Java template engine for docx documents, forked from org.wickedsource.docx-stamper
package pro.verron.officestamper.preset;
import org.docx4j.openpackaging.packages.PresentationMLPackage;
import org.docx4j.openpackaging.packages.SpreadsheetMLPackage;
import pro.verron.officestamper.api.OfficeStamper;
import pro.verron.officestamper.api.OfficeStamperException;
import pro.verron.officestamper.experimental.ExcelStamper;
import pro.verron.officestamper.experimental.PowerpointStamper;
/**
* ExperimentalStampers is a class that provides static methods for obtaining instances of OfficeStamper
* implementations for stamping PowerPoint presentations and Excel templates with context and writing
* the result to an OutputStream.
*
* @since 1.6.8
*/
public class ExperimentalStampers {
private ExperimentalStampers() {
throw new OfficeStamperException("ExperimentalStampers cannot be instantiated");
}
/**
* Returns a new instance of the OfficeStamper implementation
* for stamping PowerPoint presentations with context and writing
* the result to an OutputStream.
*
* @return a new OfficeStamper instance for PowerPoint presentations
*
* @since 1.6.8
*/
public static OfficeStamper pptxStamper() {
return new PowerpointStamper();
}
/**
* Returns a new instance of the OfficeStamper implementation
* for stamping Excel templates with context and writing the result to an OutputStream.
*
* @return a new OfficeStamper instance for Excel templates
*
* @since 1.6.8
*/
public static OfficeStamper xlsxStamper() {
return new ExcelStamper();
}
}