public void setFullWMS(String trueFalse) { // Selection of the configurations List<TileLayerConfiguration> configs = new ArrayList<TileLayerConfiguration>( GeoWebCacheExtensions.extensions(TileLayerConfiguration.class)); // Selection of the TileLayerConfiguration file associated to geowebcache.xml ServerConfiguration gwcXMLconfig = null; for (BaseConfiguration config : configs) { if (config instanceof XMLConfiguration) { gwcXMLconfig = (ServerConfiguration) config; break; } } // From the configuration file the "fullWMS" parameter is searched Boolean wmsFull = null; if (gwcXMLconfig != null) { wmsFull = gwcXMLconfig.isFullWMS(); } if (wmsFull != null) { this.fullWMS = wmsFull; } else { this.fullWMS = Boolean.parseBoolean(trueFalse); } // Log if fullWMS is enabled if (this.fullWMS) { log.info("Will recombine tiles for non-tiling clients."); } else { log.info("Will NOT recombine tiles for non-tiling clients."); } }
/** * Constructs a new POJO based on the provided {@link ServerConfiguration} * * @param template Template used to initialize properties */ public ServerConfigurationPOJO(ServerConfiguration template) throws IOException { this.serviceInformation = template.getServiceInformation(); this.runtimeStatsEnabled = template.isRuntimeStatsEnabled(); setLockProvider(template.getLockProvider()); this.fullWMS = template.isFullWMS(); this.wmtsCiteCompliant = template.isWmtsCiteCompliant(); this.backendTimeout = template.getBackendTimeout(); this.cacheBypassAllowed = template.isCacheBypassAllowed(); this.version = template.getVersion(); this.identifier = template.getIdentifier(); this.location = template.getLocation(); }
assertNotNull(lockProvider); Boolean fullWMS = config.isFullWMS(); assertNull(fullWMS); config.setFullWMS(true); fullWMS = config.isFullWMS(); assertTrue(fullWMS); assertEquals(savedInfo.getProviderName(), "John Adams inc."); assertFalse(config.isRuntimeStatsEnabled()); assertTrue(config.isFullWMS()); assertTrue((config.isWmtsCiteCompliant())); assertTrue(config.isCacheBypassAllowed());