For IntelliJ IDEA,
Android Studio or Eclipse



@Test public void testTruncateLayerFully() throws Exception { when(tld.getTileLayer(eq(tileLayerGroup.getName()))) .thenThrow(new GeoWebCacheException("fake")); mediator.truncate(tileLayerGroup.getName()); verify(storageBroker, never()).deleteByGridSetId(anyString(), anyString()); mediator.truncate(tileLayer.getName()); verify(storageBroker, times(tileLayer.getGridSubsets().size())) .deleteByGridSetId(anyString(), anyString()); }
@Override public ConveyorTile getNoncachedTile(ConveyorTile tile) throws GeoWebCacheException { try { return getMetatilingReponse(tile, false, 1, 1); } catch (IOException e) { throw new GeoWebCacheException(e); } }
@Override public void proxyRequest(ConveyorTile tile) throws GeoWebCacheException { try { GWC.get().proxyOwsRequest(tile); } catch (Exception e) { throw new GeoWebCacheException("Failed to cascade request", e); } }
public static SRS getSRS(String epsgStr) throws GeoWebCacheException { final String crsAuthPrefix = "EPSG:"; if (epsgStr.substring(0, 5).equalsIgnoreCase(crsAuthPrefix)) { int epsgNumber = Integer.parseInt(epsgStr.substring(5, epsgStr.length())); return getSRS(epsgNumber); } else { throw new GeoWebCacheException("Can't parse " + epsgStr + " as SRS string."); } }
public void update(byte[] filterData, TileLayer layer, String gridSetId, int z) throws GeoWebCacheException { throw new GeoWebCacheException( "update(byte[] filterData, TileLayer layer, String gridSetId, int z) is not appropriate for WMSRasterFilters"); }
public ConveyorTile doNonMetatilingRequest(ConveyorTile tile) throws GeoWebCacheException { tile.setTileLayer(this); ByteArrayResource buffer = getImageBuffer(WMS_BUFFER); sourceHelper.makeRequest(tile, buffer); if (tile.getError() || buffer.getSize() == 0) { throw new GeoWebCacheException("Empty tile, error message: " + tile.getErrorMessage()); } tile.setBlob(buffer); return tile; }
private TileLayer findLayer(List<TileLayer> layers, String layerName) throws GeoWebCacheException { Iterator<TileLayer> iter = layers.iterator(); while (iter.hasNext()) { TileLayer layer = iter.next(); if (layer.getName().equals(layerName)) { return layer; } } throw new GeoWebCacheException("Layer " + layerName + " not found, set has " + layers.size() + " layers."); }
@Override public void release() throws GeoWebCacheException { try { lock.release(); } catch (IllegalArgumentException trouble) { throw new GeoWebCacheException(trouble); } } @Override
public boolean persist() throws GeoWebCacheException { try { return storageBroker.put((TileObject) stObj); } catch (StorageException e) { throw new GeoWebCacheException(e); } }
@Override public ConveyorTile doNonMetatilingRequest(ConveyorTile tile) throws GeoWebCacheException { try { return getMetatilingReponse(tile, true, 1, 1); } catch (IOException e) { throw new GeoWebCacheException(e); } }
@Override public ConveyorTile doNonMetatilingRequest(ConveyorTile tile) throws GeoWebCacheException { try { return getMetatilingReponse(tile, true, 1, 1); } catch (IOException e) { throw new GeoWebCacheException(e); } }
public static SRS getSRS(String epsgStr) throws GeoWebCacheException { final String crsAuthPrefix = "EPSG:"; if (epsgStr.substring(0, 5).equalsIgnoreCase(crsAuthPrefix)) { int epsgNumber = Integer.parseInt(epsgStr.substring(5, epsgStr.length())); return getSRS(epsgNumber); } else { throw new GeoWebCacheException("Can't parse " + epsgStr + " as SRS string."); } }
@Override public ConveyorTile getNoncachedTile(ConveyorTile tile) throws GeoWebCacheException { try { return getMetatilingReponse(tile, false, 1, 1); } catch (IOException e) { throw new GeoWebCacheException(e); } }
@Test public void testTruncateLayerFully() throws Exception { when(tld.getTileLayer(eq(tileLayerGroup.getName()))) .thenThrow(new GeoWebCacheException("fake")); mediator.truncate(tileLayerGroup.getName()); verify(storageBroker, never()).deleteByGridSetId(anyString(), anyString()); mediator.truncate(tileLayer.getName()); verify(storageBroker, times(tileLayer.getGridSubsets().size())) .deleteByGridSetId(anyString(), anyString()); }
@Override public void proxyRequest(ConveyorTile tile) throws GeoWebCacheException { try { GWC.get().proxyOwsRequest(tile); } catch (Exception e) { throw new GeoWebCacheException("Failed to cascade request", e); } }