/** * Returns a config suitable to match the old defaults when the integrated GWC behaivour was not * configurable. */ public static GWCConfig getOldDefaults() { GWCConfig config = new GWCConfig(); config.setOldDefaults(); return config; }
@Override public void onDispose() { onReset(); } }
@Override public void backup() throws IOException { backUpConfig(findOrCreateConfFile()); }
public void testIsServiceEnabled() { config.setWMSCEnabled(!config.isWMSCEnabled()); config.setTMSEnabled(!config.isTMSEnabled()); config.setWMTSEnabled(!config.isWMTSEnabled()); assertEquals(config.isEnabled("wms"), config.isWMSCEnabled()); assertEquals(config.isEnabled("WMS"), config.isWMSCEnabled()); assertEquals(config.isEnabled("wmts"), config.isWMTSEnabled()); assertEquals(config.isEnabled("WMTS"), config.isWMTSEnabled()); assertEquals(config.isEnabled("tms"), config.isTMSEnabled()); assertEquals(config.isEnabled("TMS"), config.isTMSEnabled()); assertTrue(config.isEnabled("anything else")); } }
public void testClone() { GWCConfig clone = config.clone(); assertEquals(config, clone); assertNotSame(config.getDefaultCachingGridSetIds(), clone.getDefaultCachingGridSetIds()); assertNotSame(config.getDefaultCoverageCacheFormats(), clone.getDefaultCoverageCacheFormats()); assertNotSame(config.getDefaultOtherCacheFormats(), clone.getDefaultOtherCacheFormats()); assertNotSame(config.getDefaultVectorCacheFormats(), clone.getDefaultVectorCacheFormats()); }
protected void setUp() throws Exception { oldDefaults = GWCConfig.getOldDefaults(); config = new GWCConfig(); }
@Override protected void setUp() throws Exception { configPersister = mock(GWCConfigPersister.class); when(configPersister.getConfig()).thenReturn(GWCConfig.getOldDefaults()); rawCatalog = mock(Catalog.class); tileLayerCatalog = mock(TileLayerCatalog.class); initializer = new GWCInitializer(configPersister, rawCatalog, tileLayerCatalog); geoServer = mock(GeoServer.class); }
public void saveConfig(GWCConfig gwcConfig) throws IOException { gwcConfigPersister.save(gwcConfig); // make sure we switch to the lock provider just configured updateLockProvider(gwcConfig.getLockProviderName()); }
public GWCConfig getConfig() { return gwcConfigPersister.getConfig(); }
@Override protected void setUpInternal() { GWC.get().getConfig().setDirectWMSIntegrationEnabled(false); }
public void saveConfig(GWCConfig gwcConfig) throws IOException { gwcConfigPersister.save(gwcConfig); }
public GWCConfig getConfig() { if (config == null) { try { loadConfig(); } catch (IOException e) { throw new RuntimeException(e); } } return config; }
@Override public boolean hasInput() { try { return Resources.exists(findOrCreateConfFile()); } catch (IOException e) { return false; } }
/** * Returns a config suitable to match the old defaults when the integrated GWC behaivour was not * configurable. */ public static GWCConfig getOldDefaults() { GWCConfig config = new GWCConfig(); config.setOldDefaults(); return config; }
public GWCConfig getConfig() { return gwcConfigPersister.getConfig(); }
@Override protected void setUpInternal() { GWC.get().getConfig().setDirectWMSIntegrationEnabled(false); }
@Override public void onDispose() { onReset(); }
public GWCConfig getConfig() { if (config == null) { try { loadConfig(); } catch (IOException e) { throw new RuntimeException(e); } } return config; }
@Override public InputStream in() throws IOException { return findOrCreateConfFile().in(); }
@Override public OutputStream out() throws IOException { return findOrCreateConfFile().out(); }