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

sirius.web.templates.GlobalContextExtender Maven / Gradle / Ivy

There is a newer version: 22.2.3
Show newest version
/*
 * Made with all the love in the world
 * by scireum in Remshalden, Germany
 *
 * Copyright by scireum GmbH
 * http://www.scireum.de - [email protected]
 */

package sirius.web.templates;

import java.util.function.BiConsumer;

/**
 * Can be supplied to the content model (using the {@link sirius.kernel.di.std.Register} annotation) in order to
 * extend (initialize) the contexts used by the {@link Generator}.
 */
public interface GlobalContextExtender {

    /**
     * Collects the names and values of the globals avilable when generating content.
     *
     * @param globalParameterCollector the collector to be supplied with the variable name and value.
     */
    void collectTemplate(BiConsumer globalParameterCollector);

    /**
     * Collects the names and values of globals available when executing a system script.
     *
     * @param globalParameterCollector the collector to be supplied with the variable name and value.
     */
    void collectScripting(BiConsumer globalParameterCollector);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy