Package org.geoserver.gwc.config

Examples of org.geoserver.gwc.config.GWCConfig


        }
    }

    @Test
    public void testMarshallingDefaults() {
        GWCConfig oldDefaults = GWCConfig.getOldDefaults();
        LayerInfo layerInfo = mockLayer("testLayer", new String[]{}, LayerInfo.Type.RASTER);
        info = loadOrCreate(layerInfo, oldDefaults);
        testMarshaling(info);
    }
View Full Code Here


     *
     * @see WebMapService#getMap(GetMapRequest)
     * @see org.aopalliance.intercept.MethodInterceptor#invoke(org.aopalliance.intercept.MethodInvocation)
     */
    public WebMap invoke(MethodInvocation invocation) throws Throwable {
        GWCConfig config = gwc.getConfig();
        if (!config.isDirectWMSIntegrationEnabled()) {
            return (WebMap) invocation.proceed();
        }

        final GetMapRequest request = getRequest(invocation);
        boolean tiled = request.isTiled();
View Full Code Here

        assertEquals(256, image.getHeight());
    }
   
    @Test
    public void testSaveConfig() throws Exception {
        GWCConfig config = GWC.get().getConfig();
        // set a large gutter
        config.setGutter(100);
        // save the config
        GWC.get().saveConfig(config);
        // force a reload
        getGeoServer().reload();
        // grab the config, make sure it was saved as expected
View Full Code Here

     * @see org.geoserver.catalog.event.CatalogListener#handleAddEvent
     * @see GWC#createLayer(LayerInfo)
     * @see GWC#createLayer(LayerGroupInfo)
     */
    public void handleAddEvent(CatalogAddEvent event) throws CatalogException {
        GWCConfig config = mediator.getConfig();
        boolean sane = config.isSane();
        boolean cacheLayersByDefault = config.isCacheLayersByDefault();
        if (!cacheLayersByDefault) {
            return;
        }
        if (!sane) {
            log.info("Ignoring auto-creation of tile layer for " + event.getSource()
View Full Code Here

    /**
     * @see junit.framework.TestCase#setUp()
     */
    @Before
    public void setUp() throws Exception {
        GWCConfig configDefaults = GWCConfig.getOldDefaults();
        mockMediator = mock(GWC.class);
        when(mockMediator.getConfig()).thenReturn(configDefaults);

        GridSetBroker gridsets = new GridSetBroker(true, true);
        when(mockMediator.getGridSetBroker()).thenReturn(gridsets);
View Full Code Here

     *
     * @see CatalogLayerEventListener#handleAddEvent
     * @see GWC#add(GeoServerTileLayer)
     */
    void createTileLayer(final LayerInfo layerInfo) {
        GWCConfig defaults = mediator.getConfig();
        if (defaults.isSane() && defaults.isCacheLayersByDefault()) {
            GridSetBroker gridSetBroker = mediator.getGridSetBroker();
            GeoServerTileLayer tileLayer = new GeoServerTileLayer(layerInfo, defaults,
                    gridSetBroker);
            mediator.add(tileLayer);
        }
View Full Code Here

     *
     * @see CatalogLayerEventListener#handleAddEvent
     * @see GWC#add(GeoServerTileLayer)
     */
    public void createTileLayer(LayerGroupInfo lgi) {
        GWCConfig defaults = mediator.getConfig();
        GridSetBroker gridSetBroker = mediator.getGridSetBroker();
        GeoServerTileLayer tileLayer = new GeoServerTileLayer(lgi, defaults, gridSetBroker);
        mediator.add(tileLayer);
    }
View Full Code Here

    }
   
    @Before
    public void cleanup() throws IOException {
        GWC gwc = GWC.get();
        GWCConfig config = gwc.getConfig();
        config.setLockProviderName(null);
        gwc.saveConfig(config);
    }
View Full Code Here

    }

    @Test
    public void testEnableCacheLayersByDefault() throws Exception {
        GWC gwc = GWC.get();
        GWCConfig config = gwc.getConfig();
        config.setCacheLayersByDefault(false);
        gwc.saveConfig(config);
        assertFalse(gwc.getConfig().isCacheLayersByDefault());

        testEditCheckboxOption("form:cachingOptionsPanel:cacheLayersByDefault",
                "cachingOptionsPanel:cacheLayersByDefault", false);
View Full Code Here

    }

    @Test
    public void testDisableCacheLayersByDefault() throws Exception {
        GWC gwc = GWC.get();
        GWCConfig config = gwc.getConfig();
        config.setCacheLayersByDefault(true);
        gwc.saveConfig(config);
        assertTrue(gwc.getConfig().isCacheLayersByDefault());

        testEditCheckboxOption("form:cachingOptionsPanel:cacheLayersByDefault",
                "cachingOptionsPanel:cacheLayersByDefault", true);
View Full Code Here

TOP

Related Classes of org.geoserver.gwc.config.GWCConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.