Package org.geoserver.catalog

Examples of org.geoserver.catalog.CascadeDeleteVisitor.visit()


            cat.remove(store);
        }
        else if (recurse){
            CascadeDeleteVisitor delete = new CascadeDeleteVisitor(cat);
            if( store instanceof DataStoreInfo){
                delete.visit((DataStoreInfo)store);
            }
            else if( store instanceof CoverageStoreInfo){
                delete.visit((CoverageStoreInfo)store);
            }
            else if( store instanceof WMSStoreInfo){
View Full Code Here


            CascadeDeleteVisitor delete = new CascadeDeleteVisitor(cat);
            if( store instanceof DataStoreInfo){
                delete.visit((DataStoreInfo)store);
            }
            else if( store instanceof CoverageStoreInfo){
                delete.visit((CoverageStoreInfo)store);
            }
            else if( store instanceof WMSStoreInfo){
                delete.visit((WMSStoreInfo)store);
            }
            else {
View Full Code Here

            }
            else if( store instanceof CoverageStoreInfo){
                delete.visit((CoverageStoreInfo)store);
            }
            else if( store instanceof WMSStoreInfo){
                delete.visit((WMSStoreInfo)store);
            }
            else {
                throw new IllegalStateException( "Unable to delete "+name+" - expected data store, coverage store or wms store" );
            }
        }
View Full Code Here

    public void addDataStores() throws IOException {
        // the store configuration gets ruined by tests in more than one way, let's recreate it
        DataStoreInfo sfStore = getCatalog().getDataStoreByName("sf");
        if(sfStore != null) {
            CascadeDeleteVisitor remover = new CascadeDeleteVisitor(getCatalog());
            remover.visit(sfStore);
        }
        getTestData().addVectorLayer(SystemTestData.PRIMITIVEGEOFEATURE, catalog);
        getTestData().addVectorLayer(SystemTestData.AGGREGATEGEOFEATURE, catalog);
        getTestData().addVectorLayer(SystemTestData.GENERICENTITY, catalog);
    }
View Full Code Here

        String name = toString(LAKES);
        LayerInfo layer = catalog.getLayerByName(name);
        assertNotNull(layer);

        CascadeDeleteVisitor visitor = new CascadeDeleteVisitor(catalog);
        visitor.visit(layer);
        verify(catalog);

        LayerGroupInfo group = catalog.getLayerGroupByName(LAKES_GROUP);
        assertEquals(2, group.getLayers().size());
        assertFalse(group.getLayers().contains(layer));
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.