Package org.geoserver.config

Examples of org.geoserver.config.GeoServer.save()


         // set global max to 5
        GeoServer gs = getGeoServer();
       
        WFSInfo wfs = getWFS();
        wfs.setMaxFeatures( 5 );
        gs.save( wfs );
    }

    @Before
    public void resetLocalMaxes() {
        FeatureTypeInfo info = getFeatureTypeInfo(SystemTestData.FIFTEEN);
View Full Code Here


    private void setInputLimit(int kbytes) {
        GeoServer gs = getGeoServer();
        WCSInfo info = gs.getService(WCSInfo.class);
        info.setMaxInputMemory(kbytes);
        gs.save(info);
    }
   

    private void setOutputLimit(int kbytes) {
        GeoServer gs = getGeoServer();
View Full Code Here

    private void setOutputLimit(int kbytes) {
        GeoServer gs = getGeoServer();
        WCSInfo info = gs.getService(WCSInfo.class);
        info.setMaxOutputMemory(kbytes);
        gs.save(info);
    }

}
View Full Code Here

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

            final String requestUrl = "wms/kml?layers=" + getLayerId(MockData.BRIDGES)
                    + "&styles=Bridge&mode=download";
            Document dom = getAsDOM(requestUrl);
View Full Code Here

            XMLAssert.assertXpathEvaluatesTo("http://myhost:9999/gs/styles/bridge.png",
                    "//kml:Style/kml:IconStyle/kml:Icon/kml:href", dom);
        } finally {
            GeoServerInfo info = gs.getGlobal();
            info.getSettings().setProxyBaseUrl(null);
            gs.save(info);
        }
    }

    @Test
    public void testFilteredData() throws Exception {
View Full Code Here

        GeoServerInfo global = gs.getGlobal();
        SettingsInfo settings = global.getSettings();
        ContactInfo contact = settings.getContact();
        contact.setContactOrganization("GeoServer");
        contact.setOnlineResource("http://www.geoserver.org");
        gs.save(global);

        ppio = new KMLPPIO(gs);
    }

    @Test
View Full Code Here

        // setup limited srs
        GeoServer gs = getGeoServer();
        WMSInfo wms = gs.getService(WMSInfo.class);
        wms.getSRS().add("EPSG:4326");
        gs.save(wms);
       
        GeoServerUserGroupService service = getSecurityManager().loadUserGroupService("default");
        GeoServerUserGroupStore store  = service.createStore();
        store.load();
        store.addUser(store.createUserObject("cite","cite",true));
View Full Code Here

       
        WFSInfo wfs = getWFS();
        boolean before = wfs.isFeatureBounding();
        wfs.setFeatureBounding(false);
        try {
            gs.save( wfs );
            
          String out = getAsString("wfs?request=GetFeature&version=1.0.0&typename=sf:AggregateGeoFeature&maxfeatures=3&outputformat="+JSONType.json);
          JSONObject rootObject = JSONObject.fromObject( out );
          
          JSONObject bbox = rootObject.getJSONObject("bbox");
View Full Code Here

          
          JSONObject bbox = rootObject.getJSONObject("bbox");
          assertEquals(JSONNull.getInstance(), bbox);
        } finally {
          wfs.setFeatureBounding(before);
            gs.save( wfs );
        }
     
    }
   
    @Test
View Full Code Here

                + typeName.getLocalPart();
            Document doc;
       
            //first, non cite compliant mode should find the type even if namespace is not specified
            service.setCiteCompliant(false);
            geoServer.save(service);
            doc = getAsDOM(path);
            print(doc);
            assertSchema(doc, typeName);
           
   
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.