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

org.openfact.report.ReportTemplateConfiguration Maven / Gradle / Ivy

There is a newer version: 1.1.3.Final
Show newest version
package org.openfact.report;

import org.openfact.models.OrganizationModel;

import java.util.HashMap;
import java.util.Map;

public class ReportTemplateConfiguration {

    public final static String OF_ORGANIZATION = "OF_ORGANIZATION";

    private OrganizationModel organization;
    private String themeName;
    private final Map attributes = new HashMap<>();

    public ReportTemplateConfiguration(OrganizationModel organization) {
        this.organization = organization;

        this.attributes.put(OF_ORGANIZATION.toString(), organization.getName());
        if (organization.getReportTheme() != null) {
            this.themeName = organization.getReportTheme();
        }
    }

    public ReportTemplateConfiguration themeName(String themeName) {
        this.themeName = themeName;
        return this;
    }

    public ReportTemplateConfiguration setAttribute(String name, Object value) {
        attributes.put(name, value);
        return this;
    }

    public OrganizationModel getOrganization() {
        return organization;
    }

    public String getThemeName() {
        return themeName;
    }

    public Map getAttributes() {
        return attributes;
    }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy