Package org.geoserver.catalog

Examples of org.geoserver.catalog.Catalog.save()


    public void testPerFeatureType() throws Exception {
        Catalog cat = getCatalog();
        FeatureTypeInfo ft = cat.getFeatureTypeByName("sf", "PrimitiveGeoFeature");
        ft.setNumDecimals(1);
        cat.save(ft);
       
        Document dom = getAsDOM("wfs?request=getfeature&featureid=PrimitiveGeoFeature.f008&version=1.0.0");
        runAssertions(dom,1);
    }
View Full Code Here


    public void testMultipleFeatureTypes() throws Exception {
        Catalog cat = getCatalog();
        FeatureTypeInfo ft1 = cat.getFeatureTypeByName("sf", "PrimitiveGeoFeature");
        FeatureTypeInfo ft2 = cat.getFeatureTypeByName("sf", "AggregateGeoFeature");
        ft1.setNumDecimals(3);
        cat.save(ft1);
           
        ft2.setNumDecimals(1);
        cat.save(ft2);
       
        Document dom = getAsDOM("wfs?request=getfeature&featureid=PrimitiveGeoFeature.f008,AggregateGeoFeature.f009&version=1.0.0");
View Full Code Here

        FeatureTypeInfo ft2 = cat.getFeatureTypeByName("sf", "AggregateGeoFeature");
        ft1.setNumDecimals(3);
        cat.save(ft1);
           
        ft2.setNumDecimals(1);
        cat.save(ft2);
       
        Document dom = getAsDOM("wfs?request=getfeature&featureid=PrimitiveGeoFeature.f008,AggregateGeoFeature.f009&version=1.0.0");
        runAssertions(dom, 3);
    }
   
View Full Code Here

       
        // sync up workspace name with namespace prefix, temp measure until the two become separate
        namespaceInfo.setPrefix(workspaceInfo.getName());
       
        // this will ensure all datastore namespaces are updated when the workspace is modified
        catalog.save(workspaceInfo);
        catalog.save(namespaceInfo);
        if(defaultWs) {
            catalog.setDefaultWorkspace(workspaceInfo);
        }
        setResponsePage(WorkspacePage.class);
View Full Code Here

        // sync up workspace name with namespace prefix, temp measure until the two become separate
        namespaceInfo.setPrefix(workspaceInfo.getName());
       
        // this will ensure all datastore namespaces are updated when the workspace is modified
        catalog.save(workspaceInfo);
        catalog.save(namespaceInfo);
        if(defaultWs) {
            catalog.setDefaultWorkspace(workspaceInfo);
        }
        setResponsePage(WorkspacePage.class);
    }
View Full Code Here

                alreadyConfigured.setNamespace(namespace);
            }

            ResourcePool resourcePool = catalog.getResourcePool();
            resourcePool.clear(info);
            catalog.save(info);
            // save the resources after saving the store
            for (FeatureTypeInfo alreadyConfigured : configuredResources) {
                catalog.save(alreadyConfigured);
            }
            LOGGER.finer("Saved store " + info.getName());
View Full Code Here

            ResourcePool resourcePool = catalog.getResourcePool();
            resourcePool.clear(info);
            catalog.save(info);
            // save the resources after saving the store
            for (FeatureTypeInfo alreadyConfigured : configuredResources) {
                catalog.save(alreadyConfigured);
            }
            LOGGER.finer("Saved store " + info.getName());
        } catch (Exception e) {
            LOGGER.log(Level.WARNING, "Error saving data store to catalog", e);
            throw new IllegalArgumentException("Error saving data store:" + e.getMessage());
View Full Code Here

        Metadata.created(map, created);
        Metadata.modified(map, created);
        Metadata.modified(ws, created);

        cat.add( map );
        cat.save(ws);

        recent.add(LayerGroupInfo.class, map);
        return mapDetails(new JSONObj(), map, wsName, req);
    }
View Full Code Here

            map.getMetadata().put("change", obj.str("change") );
        }
        else {
            map.getMetadata().put("change", "modified "+obj.keys() );
        }
        cat.save(map);
        cat.save(ws);

        recent.add(LayerGroupInfo.class, map);
        return mapDetails(new JSONObj(), map, wsName, req);
    }
View Full Code Here

        }
        else {
            map.getMetadata().put("change", "modified "+obj.keys() );
        }
        cat.save(map);
        cat.save(ws);

        recent.add(LayerGroupInfo.class, map);
        return mapDetails(new JSONObj(), map, wsName, req);
    }
   
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.