Package org.geoserver.config

Examples of org.geoserver.config.GeoServer


        form.add(new CheckBox("allowNativeMosaic"));

        Button submit = new Button("submit", new StringResourceModel("submit", this, null)) {
            @Override
            public void onSubmit() {
                GeoServer gs = (GeoServer) geoServerModel.getObject();
                gs.getGlobal().setJAI( (JAIInfo)jaiModel.getObject() );
                gs.save( gs.getGlobal() );
                setResponsePage(GeoServerHomePage.class);
            }
        };
        form.add(submit);
       
View Full Code Here


        form.add(new TextField<Integer>("featureTypeCacheSize").add(new MinimumValidator<Integer>(0)));
       
        Button submit = new Button("submit", new StringResourceModel("submit", this, null)) {
            @Override
            public void onSubmit() {
                GeoServer gs = getGeoServer();
                gs.save( (GeoServerInfo) globalInfoModel.getObject() );
                gs.save( (LoggingInfo) loggingInfoModel.getObject() );
                setResponsePage(GeoServerHomePage.class);
            }
        };
        form.add(submit);
       
View Full Code Here

                MockData.LAKES.getLocalPart());
        assertEquals("foo", lakes.getTitle());
    }
   
    public void testConfigureFeatureTypeCacheSize() {
        GeoServer gs = getGeoServer();
        GeoServerInfo global = gs.getGlobal();
        global.setFeatureTypeCacheSize(200);
        gs.save(global);

        Catalog catalog = getCatalog();
        assertEquals(200, catalog.getResourcePool().featureTypeCache.maxSize());
    }
View Full Code Here

        form.add(imageIOCacheThreshold);
               
        Button submit = new Button("submit", new StringResourceModel("submit", this, null)) {
            @Override
            public void onSubmit() {
                GeoServer gs = (GeoServer) geoServerModel.getObject();
                gs.getGlobal().setCoverageAccess( (CoverageAccessInfo)coverageModel.getObject() );
                gs.save( gs.getGlobal() );
                setResponsePage(GeoServerHomePage.class);
            }
        };
        form.add(submit);
       
View Full Code Here

    protected String getLogConfiguration() {
        return "/DEFAULT_LOGGING.properties";
    }
   
    public void testContextStartup() {
        GeoServer config = (GeoServer) applicationContext.getBean("geoServer");
        assertNotNull(config.getCatalog().getFeatureTypeByName(MockData.BUILDINGS.getNamespaceURI(), MockData.BUILDINGS.getLocalPart()));
        assertNotNull(config.getCatalog().getFeatureTypeByName(MockData.BASIC_POLYGONS.getNamespaceURI(), MockData.BASIC_POLYGONS.getLocalPart()));
    }
View Full Code Here

    private String testDoFilter(final String proxyBaseUrl, final String requestBaseUrl,
            final String requestResource, final String content, final String contentType,
            final boolean filterIsEnabled) throws MalformedURLException, ServletException,
            IOException {

        GeoServer mockGeoServer = getMockGeoServer(proxyBaseUrl);

        ApplicationContextMock context = new ApplicationContextMock();
        context.putBean(mockGeoServer);

        GeoServerExtensions ext = new GeoServerExtensions();
View Full Code Here

*
*/
public class GeoServerHomePage extends GeoServerBasePage {

    public GeoServerHomePage() {
        GeoServer gs = getGeoServer();
        ContactInfo contact = gs.getGlobal().getContact();

        //add some contact info
        add(new ExternalLink("contactURL", contact.getOnlineResource())
            .add( new Label("contactName", contact.getContactOrganization())));
        {
View Full Code Here

     *
     * @throws Exception
     */
    @SuppressWarnings("unchecked")
    public void testProxyBaseURL() throws Exception {
        GeoServer gs = getGeoServer();
        try {
            GeoServerInfo info = gs.getGlobal();
            info.setProxyBaseUrl("http://myhost:9999/gs");
            gs.save(info);

            MapLayer mapLayer = createMapLayer(MockData.POINTS, "Bridge");
            FeatureSource<SimpleFeatureType, SimpleFeature> featureSource;
            featureSource = (FeatureSource<SimpleFeatureType, SimpleFeature>) mapLayer
                    .getFeatureSource();
            int nfeatures = featureSource.getFeatures().size();

            WMSMapContext mapContext = new WMSMapContext(createGetMapRequest(MockData.POINTS));
            Document document;

            try {
                mapContext.addLayer(mapLayer);
                KMLVectorTransformer transformer = new KMLVectorTransformer(getWMS(), mapContext,
                        mapLayer);
                transformer.setIndentation(2);

                document = WMSTestSupport.transform(featureSource.getFeatures(), transformer);
                // print(document);
            } finally {
                mapContext.dispose();
            }
            // make sure we are using the proxy base URL
            XMLAssert.assertXpathEvaluatesTo("http://myhost:9999/gs/styles/bridge.png",
                    "//Style/IconStyle/Icon/href", document);
        } finally {
            GeoServerInfo info = gs.getGlobal();
            info.setProxyBaseUrl(null);
            gs.save(info);
        }
    }
View Full Code Here

    @Test
    public void testESRIFormatFromDefaultValue() throws Exception {
        setupESRIPropertyFile();

        final GeoServer geoServer = getGeoServer();
        setupESRIFormatByDefault(geoServer, true);

        final FeatureSource fs = getFeatureSource(SystemTestData.BASIC_POLYGONS);
        final Catalog catalog = getCatalog();
        final GeoServerResourceLoader resourceLoader = getResourceLoader();
View Full Code Here

        tester.assertModelValue("form:keywords", wps.getKeywords());
    }

    @Test
    public void testWorkspace() throws Exception {
        GeoServer geoServer = getGeoServerApplication().getGeoServer();
        WPSInfo wps = geoServer.getService(WPSInfo.class);
        WorkspaceInfo defaultWs = getCatalog().getDefaultWorkspace();
        WPSInfo wps2 = geoServer.getFactory().create(WPSInfo.class);
        OwsUtils.copy(wps, wps2, WPSInfo.class);
        ((ServiceInfoImpl) wps2).setId(null);
        wps2.setWorkspace(defaultWs);
        wps2.setMaintainer("TestMaintainer");
        geoServer.add(wps2);

        // start the page with the custom workspace
        login();
        tester.startPage(WPSAdminPage.class,
                new PageParameters(Collections.singletonMap("workspace", defaultWs.getName())));
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.