@Test public void testConvertGlobalStyles() throws Exception { new CatalogCreator(cat).workspace("foo") .property("bar") .featureType("stuff", "geom:Point:srid=4326,name:String,id:Integer", stuff()).layer(true); exporter = new BundleExporter(cat, new ExportOpts(cat.getWorkspaceByName("foo")).name("blah")); Path root = exporter.run(); assertPathExists(root, "styles/foo_stuff.xml"); assertPathExists(root, "styles/foo_stuff.sld"); }
public Path run() throws Exception { persistBundleInfo(); persist(workspace); try ( CloseableIterator<StoreInfo> sit = catalog.list(StoreInfo.class, equal("workspace", workspace)) ) { while (sit.hasNext()) { StoreInfo store = sit.next(); persist(store); } } return root(); }
BundleExporter { public Path run() throws Exception { persistBundleInfo(); persist(workspace); try ( CloseableIterator<StoreInfo> sit = catalog.list(StoreInfo.class, equal("workspace", workspace)) ) { while (sit.hasNext()) { StoreInfo store = sit.next(); persist(store); } } return root(); } }
BundleExporter { public Path run() throws Exception { persistBundleInfo(); persist(workspace); try ( CloseableIterator<StoreInfo> sit = catalog.list(StoreInfo.class, equal("workspace", workspace)) ) { while (sit.hasNext()) { StoreInfo store = sit.next(); persist(store); } } return root(); } BundleExporter(Catalog catalog, ExportOpts options); }
BundleExporter { public Path run() throws Exception { persistBundleInfo(); persist(workspace); try ( CloseableIterator<StoreInfo> sit = catalog.list(StoreInfo.class, equal("workspace", workspace)) ) { while (sit.hasNext()) { StoreInfo store = sit.next(); persist(store); } } return root(); } BundleExporter(Catalog catalog, ExportOpts options); Path root(); Path work(); Path run(); Path zip(); void cleanup(); }
BundleExporter { public Path run() throws Exception { persistBundleInfo(); persist(workspace); try ( CloseableIterator<StoreInfo> sit = catalog.list(StoreInfo.class, equal("workspace", workspace)) ) { while (sit.hasNext()) { StoreInfo store = sit.next(); persist(store); } } return root(); } BundleExporter(Catalog catalog, ExportOpts options); Path root(); Path work(); Path run(); Path zip(); void cleanup();  }