<T extends StoreInfo> void initStore( T s, Class<T> clazz, String sId, String name, WorkspaceInfo ws) { expect(s.getId()).andReturn(sId).anyTimes(); expect(s.getName()).andReturn(name).anyTimes(); expect(s.getWorkspace()).andReturn(ws).anyTimes(); expect(s.getCatalog()).andReturn(catalog).anyTimes(); expect(s.isEnabled()).andReturn(true).anyTimes(); expect(catalog.getStore(sId, clazz)).andReturn(s).anyTimes(); expect(catalog.getStore(sId, StoreInfo.class)).andReturn(s).anyTimes(); expect(catalog.getStoreByName(name, clazz)).andReturn(s).anyTimes(); expect(catalog.getStoreByName(name, StoreInfo.class)).andReturn(s).anyTimes(); expect(catalog.getStoreByName(ws.getName(), name, clazz)).andReturn(s).anyTimes(); expect(catalog.getStoreByName(ws.getName(), name, StoreInfo.class)).andReturn(s).anyTimes(); expect(catalog.getStoreByName(ws, name, clazz)).andReturn(s).anyTimes(); expect(catalog.getStoreByName(ws, name, StoreInfo.class)).andReturn(s).anyTimes(); }
final GeoServerApplication app) { final Catalog catalog = storeInfo.getCatalog(); final ResourcePool resourcePool = catalog.getResourcePool();
Catalog catalog = storeInfo.getCatalog(); final ResourcePool resourcePool = catalog.getResourcePool();
@Override public boolean apply(ImportTask input) { final StoreInfo store = input != null ? input.getStore() : null; final Catalog catalog = store != null ? store.getCatalog() : null; final LayerInfo layer = catalog != null ? catalog.getLayer(input.getLayer().getId()) : null; return (layer == null); } });
Catalog catalog = storeInfo.getCatalog(); final ResourcePool resourcePool = catalog.getResourcePool();
final StoreInfo storeInfo, final GeoServerApplication app) { final Catalog catalog = storeInfo.getCatalog(); final ResourcePool resourcePool = catalog.getResourcePool();
static StoreInfo resolve(StoreInfo s, Catalog cat, boolean lookupByName) { if (s != null) { StoreInfo resolved = null; if (s.getId() != null) { resolved = cat.getStore(s.getId(), StoreInfo.class); } if (resolved == null && lookupByName) { resolved = cat.getStoreByName(s.getWorkspace(), s.getName(), StoreInfo.class); } if (resolved != null) { s = resolved; } } if (s != null && s.getCatalog() == null && s instanceof StoreInfoImpl) { ((StoreInfoImpl)s).setCatalog(cat); } return resolveCollections(s); }
static StoreInfo resolve(StoreInfo s, Catalog cat, boolean lookupByName) { if (s != null) { StoreInfo resolved = null; if (s.getId() != null) { resolved = cat.getStore(s.getId(), StoreInfo.class); } if (resolved == null && lookupByName) { resolved = cat.getStoreByName(s.getWorkspace(), s.getName(), StoreInfo.class); } if (resolved != null) { s = resolved; } } if (s != null && s.getCatalog() == null && s instanceof StoreInfoImpl) { ((StoreInfoImpl) s).setCatalog(cat); } return resolveCollections(s); }