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

org.mapfish.print.ApplicationContextProvider Maven / Gradle / Ivy

There is a newer version: 3.22.0
Show newest version
package org.mapfish.print;

import org.springframework.context.ApplicationContext;
import org.springframework.context.ApplicationContextAware;

/**
 * Provides application context in static context.
 */
public class ApplicationContextProvider implements ApplicationContextAware {

    private static ApplicationContext context;

    public static ApplicationContext getApplicationContext() {
        return context;
    }

    @Override
    @edu.umd.cs.findbugs.annotations.SuppressFBWarnings(value = "ST_WRITE_TO_STATIC_FROM_INSTANCE_METHOD",
                                                        justification = "That is the whole point")
    public final void setApplicationContext(final ApplicationContext ctx) {
        context = ctx;
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy