public LayerInfo getLayer(String id) { return delegate.getLayer(id); }
Object l = catalog.getLayer(ref); if (l == null) { l = catalog.getLayerByName(ref);
expect(l.isAdvertised()).andReturn(true).anyTimes(); expect(catalog.getLayer(lId)).andReturn(l).anyTimes(); expect(catalog.getLayerByName(name)).andReturn(l).anyTimes(); expect(catalog.getLayerByName(ns.getPrefix() + ":" + name)).andReturn(l).anyTimes();
private void mockCatalog() { when(catalog.getLayers()).thenReturn(Arrays.asList(layer)); when(catalog.getLayerGroups()).thenReturn(Arrays.asList(layerGroup)); when(catalog.getLayer(eq(layer.getId()))).thenReturn(layer); when(catalog.getLayerGroup(layerGroup.getId())).thenReturn(layerGroup); when(catalog.getLayerByName(eq(layer.getResource().prefixedName()))).thenReturn(layer); when(catalog.getLayerGroupByName(tileLayerName(layerGroup))).thenReturn(layerGroup); }
public PublishedInfo getLayer() { if (layerGroupId != null) { return GeoServerApplication.get().getCatalog().getLayerGroup(layerGroupId); } else if (layerId != null) { return GeoServerApplication.get().getCatalog().getLayer(layerId); } else { return null; } }
public LayerInfo getLayer(String id) { return checkAccess(delegate.getLayer(id)); }
@Override protected Object load() { if (group) { return new PreviewLayer(GeoServerApplication.get().getCatalog().getLayerGroup(id)); } else { return new PreviewLayer(GeoServerApplication.get().getCatalog().getLayer(id)); } } }
public LayerInfo getLayer(String id) { return checkAccess(user(), delegate.getLayer(id), MixedModeBehavior.CHALLENGE); }
catalog.getLayer(id);
@Test public void testGetLayerById() { addLayer(); LayerInfo l2 = catalog.getLayer(l.getId()); assertNotNull(l2); assertNotSame(l, l2); assertEquals(l, l2); }
@Test public void testFullTextSearchAddedKeyword() { ft.getKeywords().add(new Keyword("air_temp")); ft.getKeywords().add(new Keyword("temperatureAir")); l.setResource(ft); addLayer(); LayerInfo lproxy = catalog.getLayer(l.getId()); FeatureTypeInfo ftproxy = (FeatureTypeInfo) lproxy.getResource(); ftproxy.getKeywords().add(new Keyword("newKeyword")); catalog.save(ftproxy); Filter filter = Predicates.fullTextSearch("newKeyword"); assertEquals(newHashSet(ftproxy), asSet(catalog.list(FeatureTypeInfo.class, filter))); assertEquals(newHashSet(lproxy), asSet(catalog.list(LayerInfo.class, filter))); }
/** * Allows to update the layer when the layer has been saved */ public void updateLayer(Catalog catalog) { this.layer = catalog.getLayer(layer.getId()); }
public LayerInfo getLayerInfoById(String layerId) { return getCatalog().getLayer(layerId); }
public LayerInfo getLayerInfoById(String layerId) { return getCatalog().getLayer(layerId); }
@Override protected LayerInfo load() { return GeoServerApplication.get().getCatalog().getLayer(id); } }
@Override protected Object load() { return GeoServerApplication.get().getCatalog().getLayer(id); } }
public LayerInfo getLayer() { return GeoServerApplication.get().getCatalog().getLayer( lid ); }
@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); } });
@Override public void visit(LayerInfo layer) { LayerInfo otherLayer = otherCatalog.getLayer(layer.getId()); if (!(Objects.equals(layer, otherLayer) && Objects.equals(layer.isAdvertised(), otherLayer.isAdvertised()) && checkEquals(layer.getAuthorityURLs(), otherLayer.getAuthorityURLs()) && checkEquals(layer.getIdentifiers(), otherLayer.getIdentifiers()) && checkEquals(layer.getStyles(), otherLayer.getStyles()) && checkEquals(layer.getMetadata(), otherLayer.getMetadata()))) { differences.add(new InfoDiff(layer, otherLayer)); } }