All Downloads are FREE. Search and download functionalities are using the official Maven repository.

pro.verron.officestamper.preset.ExperimentalStampers Maven / Gradle / Ivy

Go to download

Office-stamper is a Java template engine for docx documents, forked from org.wickedsource.docx-stamper

There is a newer version: 2.6.0
Show newest version
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();
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy