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

com.commercetools.sunrise.common.template.engine.TemplateContext Maven / Gradle / Ivy

There is a newer version: 1.0.0-M10
Show newest version
package com.commercetools.sunrise.common.template.engine;

import com.commercetools.sunrise.cms.CmsPage;
import com.commercetools.sunrise.common.pages.PageData;

import javax.annotation.Nullable;
import java.util.List;
import java.util.Locale;
import java.util.Optional;

public class TemplateContext {

    private final PageData pageData;
    private final List locales;
    @Nullable
    private final CmsPage cmsPage;

    public TemplateContext(final PageData pageData, final List locales, final CmsPage cmsPage) {
        this.pageData = pageData;
        this.locales = locales;
        this.cmsPage = cmsPage;
    }

    public PageData pageData() {
        return pageData;
    }

    public List locales() {
        return locales;
    }

    public Optional cmsPage() {
        return Optional.ofNullable(cmsPage);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy