Package org.geoserver.config

Examples of org.geoserver.config.GeoServer


     */
    public static MetadataMap loadMapfromWorkSpace(String workspaceName, Catalog catalog) {
       WorkspaceInfo wsInfo = catalog.getWorkspaceByName(workspaceName);
       // If the WorkSpace is present, then the associated MetadataMap is selected
       if(wsInfo != null){
           GeoServer gs = GeoServerExtensions.bean(GeoServer.class);
           SettingsInfo info = gs.getSettings(wsInfo);
           MetadataMap map = info != null ? info.getMetadata() : null;
           return map;
       }
       return null;
    }
View Full Code Here


    }

    @Override
    protected void setUpInternal() throws Exception {
        // configure the GSS service
        GeoServer gs = getGeoServer();
        GSSInfo gssInfo = gs.getService(GSSInfo.class);
        gssInfo.setMode(GSSMode.Central);
        gssInfo.setVersioningDataStore(getCatalog().getDataStoreByName("synch"));
        gs.save(gssInfo);

        // initialize the GSS service
        Map gssBeans = applicationContext
                .getBeansOfType(DefaultGeoServerSynchronizationService.class);
        gss = (DefaultGeoServerSynchronizationService) gssBeans.values().iterator().next();
View Full Code Here

        expect(catalog.getResourceLoader()).andReturn(null).anyTimes();
        expect(catalog.getResourcePool()).andReturn(resourcePool).anyTimes();
        expect(catalog.getFeatureTypes()).andReturn(Collections.EMPTY_LIST).anyTimes();
        replay(catalog);
       
        GeoServer gs = createNiceMock(GeoServer.class);
        expect(gs.getService(WFSInfo.class)).andReturn(new WFSInfoImpl()).anyTimes();
        expect(gs.getCatalog()).andReturn(catalog).anyTimes();
        replay(gs);
       
        FeatureTypeSchemaBuilder.GML3 schemaBuilder = new FeatureTypeSchemaBuilder.GML3(gs);
        WFS wfs = new WFS(schemaBuilder);
       
View Full Code Here

    }

    @Override
    protected void setUpInternal() throws Exception {
        // configure the GSS service
        GeoServer gs = getGeoServer();
        GSSInfo gssInfo = gs.getService(GSSInfo.class);
        gssInfo.setMode(GSSMode.Unit);
        gssInfo.setVersioningDataStore(getCatalog().getDataStoreByName("synch"));
        gs.save(gssInfo);

        // initialize the GSS service
        Map gssBeans = applicationContext
                .getBeansOfType(DefaultGeoServerSynchronizationService.class);
        gss = (DefaultGeoServerSynchronizationService) gssBeans.values().iterator().next();
View Full Code Here

        revertService(WMSInfo.class, "sf");
    }

    @Before
    public void initLocalWMS() throws Exception {
        GeoServer geoServer = getGeoServer();
        WorkspaceInfo ws = geoServer.getCatalog().getWorkspaceByName("sf");
        WMSInfo wmsInfo = geoServer.getService(ws, WMSInfo.class);
        if (wmsInfo != null) {
            geoServer.remove(wmsInfo);
        }
        wmsInfo = geoServer.getFactory().create(WMSInfo.class);
       
        wmsInfo.setName("WMS");
        wmsInfo.setWorkspace(ws);
        geoServer.add(wmsInfo);
    }
View Full Code Here

        }
        assertEquals(true, thrown);
    }

    private void removeLocalWorkspace() {
        GeoServer geoServer = getGeoServer();
        WorkspaceInfo ws = geoServer.getCatalog().getWorkspaceByName("sf");
        WMSInfo wmsInfo = geoServer.getService(ws, WMSInfo.class);
        geoServer.remove(wmsInfo);
    }
View Full Code Here

    }

    @Override
    protected void onSetUp(SystemTestData testData) throws Exception {
        super.onSetUp(testData);
        GeoServer geoServer = getGeoServer();
        WorkspaceInfo ws = geoServer.getCatalog().getWorkspaceByName("sf");
        LocalWorkspace.set(ws);
        WCSInfo wcsInfo = geoServer.getService(WCSInfo.class);
        wcsInfo.setWorkspace(ws);
        geoServer.save(wcsInfo);
    }
View Full Code Here

        }
        assertEquals(true, thrown);
    }

    private void removeLocalWorkspace() {
        GeoServer geoServer = getGeoServer();
        WorkspaceInfo ws = geoServer.getCatalog().getWorkspaceByName("sf");
        WCSInfo wcsInfo = geoServer.getService(ws, WCSInfo.class);
        geoServer.remove(wcsInfo);
    }
View Full Code Here

    @Before
    public void init() {
        login();
        citeWorkspace = getCatalog().getWorkspaceByName(MockData.CITE_PREFIX);
       
        GeoServer gs = getGeoServer();
        SettingsInfo s = gs.getSettings(citeWorkspace);
        if (s != null) {
            gs.remove(s);
        }
        NamespaceInfo citeNS = getCatalog().getNamespaceByPrefix(MockData.CITE_PREFIX);
        citeNS.setURI(MockData.CITE_URI);
        getCatalog().save(citeNS);
View Full Code Here

        assertEquals(MockData.CITE_PREFIX, getCatalog().getDefaultWorkspace().getName());
    }

    @Test
    public void testEnableSettings() throws Exception {
        GeoServer gs = getGeoServer();

        assertNull(gs.getSettings(citeWorkspace));
       
        FormTester form = tester.newFormTester("form");
        form.setValue("settings:enabled", true);
        form.submit();

        tester.assertNoErrorMessage();
        assertNotNull(gs.getSettings(citeWorkspace));
    }
View Full Code Here

TOP

Related Classes of org.geoserver.config.GeoServer

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.