@Override public void afterPropertiesSet() throws Exception { this.configs = GeoWebCacheExtensions.configurations( TileLayerConfiguration.class, applicationContext); }
@Override public String resolvePlaceholder(String placeholderName) { return GeoWebCacheEnvironment.this.resolvePlaceholder(placeholderName); } };
/** * Loads all extensions implementing or extending <code>extensionPoint</code>. * * <p>This method uses the "default" application context to perform the lookup. See {@link * #setApplicationContext(ApplicationContext)}. * * @param extensionPoint The class or interface of the extensions. * @return A collection of the extensions, or an empty collection. */ public static final <T> List<T> extensions(Class<T> extensionPoint) { return extensions(extensionPoint, context); }
public void update(byte[] filterData, TileLayer layer, String gridSetId, int z) throws GeoWebCacheException { throw new GeoWebCacheException( "update(byte[] filterData, TileLayer layer, String gridSetId, int z) is not appropriate for WMSRasterFilters"); }
/** * Returns a specific bean given its name * * @param name * @return */ public static final Object bean(String name) { return bean(name, context); }
public void testSystemProperty() { // check for a property we did set up in the setUp GeoWebCacheEnvironment genv = new GeoWebCacheEnvironment(); assertEquals("ABC", genv.resolveValue("${TEST_SYS_PROPERTY}")); Properties props = new Properties(); props.setProperty("TEST_SYS_PROPERTY", "DEF"); props.setProperty("TEST_PROPERTY", "WWW"); genv.setProps(props); assertEquals("ABC", genv.resolveValue("${TEST_SYS_PROPERTY}")); assertEquals("WWW", genv.resolveValue("${TEST_PROPERTY}")); } }
/** * Looks up for a named string property in the order defined by {@link #getProperty(String, * ApplicationContext)} using the internally cached spring application context. * * <p>Care should be taken when using this method. It should not be called during startup or * from tests cases as the internal context will not have been set. * * @param propertyName The property name to lookup. * @return The property value, or null if not found */ public static String getProperty(String propertyName) { return getProperty(propertyName, context); }
/** * Return all bean names that correspond to the provided extension type. If the provided * extensions type implements the {@link GeoWebCacheExtensionPriority} interface, they are * returned sorted by priority * * <p>We return the bean names and not the beans themselves because we cache the beans by name * rather than the bean itself to avoid breaking the singleton directive. * * @param extensionType type of beans to return * @return Array of sorted bean names */ public static <T> String[] getBeansNamesOrderedByPriority(Class<T> extensionType) { return getBeansNamesOrderedByPriority(extensionType, context); }
public static void subContext(org.junit.runners.model.Statement statement) throws Exception { MockWepAppContextRule subRule = new MockWepAppContextRule(false); subRule.apply(statement, org.junit.runner.Description.EMPTY); } }
public ClientStreamAbortedException(Throwable cause) { super(); initCause(cause); } }
/** * * * * @deprecated use GeoWebCacheExtensions.reinitializeConfigurations instead */ public void reInit() { GeoWebCacheExtensions.reinitialize(this.applicationContext); }
/** Reinitialize the configuration from its persistence. */ default void reinitialize() throws Exception { afterPropertiesSet(); }
@Override public void evaluate() throws Throwable { String bean = "THISISTHEBEAN"; rule.addBean("foo", bean, String.class); } },
@Override public WebApplicationContext getMockContext() { return (WebApplicationContext) super.getMockContext(); }
public void testMigrationNoDates() throws Exception { testMigration(false); }
public void update(TileLayer layer, String gridSetId, int zoomStart, int zoomStop) throws GeoWebCacheException { throw new GeoWebCacheException( "TileLayer layer, String gridSetId, int z) is not appropriate for FileRasterFilters"); }
XMLConfiguration getXmlConfiguration() { XMLConfiguration mainConfig = GeoWebCacheExtensions.bean(XMLConfiguration.class); return mainConfig; }
/** @return All registered SecurityFilter extensions */ public Collection<SecurityFilter> getFilters() { return GeoWebCacheExtensions.extensions(SecurityFilter.class, applicationContext); }
/** * Return a list of configurations in priority order. * * @param extensionPoint The extension point of the configuration, may affect priority. * @return */ public static <T extends BaseConfiguration> List<T> configurations(Class<T> extensionPoint) { return configurations(extensionPoint, context); }
public ClientStreamAbortedException(String message, Throwable cause) { super(message); initCause(cause); }