Package org.geoserver.gwc

Examples of org.geoserver.gwc.GWC.saveConfig()


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

    @Test
    public void testEditDirectWMSIntegration() {
        GWC gwc = GWC.get();
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

    public void testEnableAutoCacheStyles() throws Exception {
        GWC gwc = GWC.get();
        GWCConfig config = gwc.getConfig();
        config.setCacheLayersByDefault(true);
        config.setCacheNonDefaultStyles(false);
        gwc.saveConfig(config);
        assertFalse(gwc.getConfig().isCacheNonDefaultStyles());

        testEditCheckboxOption("form:cachingOptionsPanel:container:configs:cacheNonDefaultStyles",
                "cachingOptionsPanel:container:configs:cacheNonDefaultStyles", false);
View Full Code Here

    public void testDisableAutoCacheStyles() throws Exception {
        GWC gwc = GWC.get();
        GWCConfig config = gwc.getConfig();
        config.setCacheLayersByDefault(true);
        config.setCacheNonDefaultStyles(true);
        gwc.saveConfig(config);
        assertTrue(gwc.getConfig().isCacheNonDefaultStyles());

        testEditCheckboxOption("form:cachingOptionsPanel:container:configs:cacheNonDefaultStyles",
                "cachingOptionsPanel:container:configs:cacheNonDefaultStyles", true);
View Full Code Here

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

        GWCSettingsPage page = new GWCSettingsPage();
        tester.startPage(page);
        // print(page, true, true);
        tester.assertRenderedPage(GWCSettingsPage.class);
View Full Code Here

    @Test
    public void testNewDefaultGridSet() throws IOException {
        GWC gwc = GWC.get();
        GWCConfig config = gwc.getConfig();
        config.setCacheLayersByDefault(true);
        gwc.saveConfig(config);
        // Creation of a new page to test
        GWCSettingsPage page = new GWCSettingsPage();
        // Start the page
        tester.startPage(page);
        // Ensure the page is correctly rendered
View Full Code Here

            public void onSubmit() {
                GWC gwc = GWC.get();
                final IModel<GWCConfig> gwcConfigModel = form.getModel();
                GWCConfig gwcConfig = gwcConfigModel.getObject();
                try {
                    gwc.saveConfig(gwcConfig);
                } catch (IOException e) {
                    LOGGER.log(Level.WARNING, "Error saving GWC config", e);
                    form.error("Error saving GWC config: " + e.getMessage());
                    return;
                }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.