public LayerGroupInfo getLayerGroupById(String id) { return getCatalog().getLayerGroup(id); }
public LayerInfo getLayerInfoById(String layerId) { return getCatalog().getLayer(layerId); }
public List<LayerInfo> getLayerInfos() { return getCatalog().getLayers(); }
public LayerGroupInfo getLayerGroupByName(String layerName) { return getCatalog().getLayerGroupByName(layerName); }
public LayerGroupInfo getLayerGroupById(String id) { return getCatalog().getLayerGroup(id); }
public LayerGroupInfo getLayerGroupByName(String layerName) { return getCatalog().getLayerGroupByName(layerName); }
public List<LayerGroupInfo> getLayerGroups() { return getCatalog().getLayerGroups(); }
public LayerInfo getLayerInfoById(String layerId) { return getCatalog().getLayer(layerId); }
public LayerInfo getLayerInfoByName(String layerName) { return getCatalog().getLayerByName(layerName); }
public LayerInfo getLayerInfoByName(String layerName) { return getCatalog().getLayerByName(layerName); }
/** @see org.springframework.beans.factory.DisposableBean#destroy() */ public void destroy() throws Exception { Catalog catalog = getCatalog(); if (this.catalogLayerEventListener != null) { catalog.removeListener(this.catalogLayerEventListener); } if (this.catalogStyleChangeListener != null) { catalog.removeListener(this.catalogStyleChangeListener); } GWC.set(null); }
/** * * @see org.springframework.beans.factory.DisposableBean#destroy() */ public void destroy() throws Exception { Catalog catalog = getCatalog(); if (this.catalogLayerEventListener != null) { catalog.removeListener(this.catalogLayerEventListener); } if (this.catalogStyleChangeListener != null) { catalog.removeListener(this.catalogStyleChangeListener); } GWC.set(null); }
final Catalog catalog = getCatalog();
final Catalog catalog = getCatalog();
checkArgument(saneConfig.isSane()); final Catalog catalog = getCatalog(); for (String name : catalogLayerNames) {
checkArgument(saneConfig.isSane()); final Catalog catalog = getCatalog(); for (String name : catalogLayerNames) {
private List<LayerInfo> findAffectedLayers(GWC mediator, Context context, String newRefName) { final Catalog catalog = mediator.getCatalog();
/** * @param source * either a {@link LayerInfo} or a {@link LayerGroupInfo} * @return {@code true} if source has a tile layer associated, false otherwise, even if source * is not an instance of {@link LayerInfo} or {@link LayerGroupInfo} */ public boolean hasTileLayer(CatalogInfo source) { final String tileLayerId; if (source instanceof ResourceInfo) { LayerInfo layerInfo = getCatalog().getLayerByName( ((ResourceInfo) source).prefixedName()); if (layerInfo == null) { return false; } tileLayerId = layerInfo.getId(); } else if (source instanceof LayerInfo) { tileLayerId = ((LayerInfo) source).getId(); } else if (source instanceof LayerGroupInfo) { tileLayerId = ((LayerGroupInfo) source).getId(); } else { return false; } Configuration configuration; try { configuration = tld.getConfiguration(tileLayerId); } catch (IllegalArgumentException notFound) { return false; } return configuration instanceof CatalogConfiguration; }
try (CloseableIterator<LayerInfo> it = getCatalog().list(LayerInfo.class, styleFilter)) { while (it.hasNext()) { result.add(it.next());
/** * @param source either a {@link LayerInfo} or a {@link LayerGroupInfo} * @return {@code true} if source has a tile layer associated, false otherwise, even if source * is not an instance of {@link LayerInfo} or {@link LayerGroupInfo} */ public boolean hasTileLayer(CatalogInfo source) { final String tileLayerName; if (source instanceof ResourceInfo) { LayerInfo layerInfo = getCatalog().getLayerByName(((ResourceInfo) source).prefixedName()); if (layerInfo == null) { return false; } tileLayerName = tileLayerName(layerInfo); } else if (source instanceof LayerInfo) { tileLayerName = tileLayerName((LayerInfo) source); } else if (source instanceof LayerGroupInfo) { tileLayerName = tileLayerName((LayerGroupInfo) source); } else { return false; } BaseConfiguration configuration; try { configuration = tld.getConfiguration(tileLayerName); } catch (IllegalArgumentException notFound) { return false; } return configuration instanceof CatalogConfiguration; }