Package org.geoserver.catalog

Examples of org.geoserver.catalog.CascadeDeleteVisitor


            }
           
            protected boolean onSubmit(AjaxRequestTarget target, Component contents) {
                // cascade delete the whole selection
                Catalog catalog = GeoServerApplication.get().getCatalog();
                CascadeDeleteVisitor visitor = new CascadeDeleteVisitor(catalog);
                for (CatalogInfo ci : selection) {
                    ci.accept(visitor);
                }
               
                // the deletion will have changed what we see in the page
View Full Code Here


            }
            catalog.remove( ds );
        }
        else {
            //recursive delete
            new CascadeDeleteVisitor(catalog).visit(ds);
        }
        clear(ds);
       
        LOGGER.info( "DELETE data store " + workspace + "," + datastore );
    }
View Full Code Here

   
    @Test
    public void testDeleteAllOneByOne() throws Exception {
        for(WorkspaceInfo ws : getCatalog().getWorkspaces()) {
            // empty the workspace otherwise we can't remove it
            CascadeDeleteVisitor visitor = new CascadeDeleteVisitor(getCatalog());
            for(StoreInfo store : getCatalog().getStoresByWorkspace(ws, StoreInfo.class)) {
                store.accept(visitor);
            }

            // actually go and remove the store
View Full Code Here

           
            catalog.remove( ws );
        }
        else {
            //recursive delete
            new CascadeDeleteVisitor(catalog).visit(ws);
        }
       
        LOGGER.info( "DELETE workspace " + ws );
    }
View Full Code Here

                throw new RestletException( "coveragestore not empty", Status.CLIENT_ERROR_UNAUTHORIZED);
            }
            catalog.remove( cs );
        }
        else {
            new CascadeDeleteVisitor(catalog).visit(cs);
        }
        delete(deleteType, cs);
        clear(cs);
       
        LOGGER.info( "DELETE coverage store " + workspace + "," + coveragestore );
View Full Code Here

                throw new RestletException( "store not empty", Status.CLIENT_ERROR_FORBIDDEN);
            }
            catalog.remove( wms );
        }
        else {
            new CascadeDeleteVisitor(catalog).visit(wms);
        }
       
        
        LOGGER.info( "DELETE wms store " + workspace + "," + wmsstore );
    }
View Full Code Here

           
            catalog.remove( ws );
        }
        else {
            //recursive delete
            new CascadeDeleteVisitor(catalog).visit(ws);
        }
       
        LOGGER.info( "DELETE workspace " + ws );
    }
View Full Code Here

                throw new RestletException( "coveragestore not empty", Status.CLIENT_ERROR_UNAUTHORIZED);
            }
            catalog.remove( cs );
        }
        else {
            new CascadeDeleteVisitor(catalog).visit(cs);
        }
        clear(cs);
       
        LOGGER.info( "DELETE coverage store " + workspace + "," + coveragestore );
    }
View Full Code Here

                throw new RestletException( "store not empty", Status.CLIENT_ERROR_FORBIDDEN);
            }
            catalog.remove( wms );
        }
        else {
            new CascadeDeleteVisitor(catalog).visit(wms);
        }
       
        
        LOGGER.info( "DELETE wms store " + workspace + "," + wmsstore );
    }
View Full Code Here

        LayerInfo layer = (LayerInfo) catalog.getLayerByName(l);
        if (!recurse) {
            catalog.remove(layer);
        }
        else {
            new CascadeDeleteVisitor(catalog).visit(layer);
        }

        LOGGER.info( "DELETE layer " + l);
    }
View Full Code Here

TOP

Related Classes of org.geoserver.catalog.CascadeDeleteVisitor

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.