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

tech.grasshopper.reporter.structure.Section Maven / Gradle / Ivy

There is a newer version: 1.3.2
Show newest version
package tech.grasshopper.reporter.structure;

import org.apache.pdfbox.pdmodel.PDDocument;

import com.aventstack.extentreports.model.Report;

import lombok.Data;
import lombok.NonNull;
import lombok.experimental.SuperBuilder;
import tech.grasshopper.reporter.annotation.AnnotationStore;
import tech.grasshopper.reporter.config.ExtentPDFReporterConfig;
import tech.grasshopper.reporter.destination.Destination.DestinationStore;
import tech.grasshopper.reporter.font.ReportFont;
import tech.grasshopper.reporter.header.PageHeader;

@Data
@SuperBuilder
public abstract class Section {

	@NonNull
	protected PDDocument document;

	@NonNull
	protected ReportFont reportFont;

	protected DestinationStore destinations;

	protected AnnotationStore annotations;

	protected ExtentPDFReporterConfig config;

	@NonNull
	protected Report report;

	protected PageHeader pageHeader;

	public abstract void createSection();

	protected void createPage() {
		PageCreator.createPotraitPageAndAddToDocument(document);
	}

	public void pageHeaderDetails() {
		pageHeader.addSectionPageData(getSectionTitle(), document.getNumberOfPages());
	}

	public abstract String getSectionTitle();
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy