Changeset 346
- Timestamp:
- 08/22/08 19:27:36 (3 months ago)
- Location:
- trunk/geowebcache/src/main/java/org/geowebcache
- Files:
-
- 3 removed
- 4 modified
-
GeoWebCacheDispatcher.java (modified) (2 diffs)
-
RESTDispatcher.java (deleted)
-
layer/TileLayerResource.java (deleted)
-
layer/wms/WMSHttpHelper.java (modified) (1 diff)
-
layer/wms/WMSLayer.java (modified) (8 diffs)
-
seeder (deleted)
-
util/GetCapabilitiesConfiguration.java (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/geowebcache/src/main/java/org/geowebcache/GeoWebCacheDispatcher.java
r338 r346 50 50 public static final String TYPE_SERVICE = "service"; 51 51 52 public static final String TYPE_SEED = "seed";52 //public static final String TYPE_SEED = "seed"; 53 53 54 54 public static final String TYPE_TRUNCATE = "truncate"; … … 85 85 86 86 /** 87 * GeoServer and other solutions that embedd this dispatcher will prepend a87 * GeoServer and other solutions that embedded this dispatcher will prepend a 88 88 * path, this is used to remove it. 89 89 * -
trunk/geowebcache/src/main/java/org/geowebcache/layer/wms/WMSHttpHelper.java
r338 r346 104 104 105 105 int backendTries = 0; // keep track of how many backends we have tried 106 while (data == null && backendTries < layer. wmsURL.length) {106 while (data == null && backendTries < layer.getWMSurl().length) { 107 107 Request wmsrequest = new Request(layer.nextWmsURL(), wmsparams); 108 108 try { -
trunk/geowebcache/src/main/java/org/geowebcache/layer/wms/WMSLayer.java
r338 r346 56 56 public class WMSLayer extends TileLayer { 57 57 // needed in configuration object written to xml 58 private String WMSurl = null; 59 58 59 private String[] wmsUrl = null; 60 61 private String wmsLayers = null; 62 63 private String wmsStyles = null; 64 60 65 private int[] metaWidthHeight = null; 61 66 … … 88 93 private transient String vendorParameters; 89 94 90 protected transient String[] wmsURL;95 //protected transient String[] wmsURL; 91 96 92 97 private transient int curWmsURL; … … 94 99 //private transient String wmsLayers; 95 100 96 private transient String wmsStyles;101 //private transient String wmsStyles; 97 102 98 103 //private transient WMSParameters wmsparams; … … 138 143 139 144 public WMSLayer(String layerName, CacheFactory cacheFactory, 140 String wmsURL, List<String> mimeFormats,141 Hashtable<SRS,Grid> grids, int[] metaWidthHeight,142 String vendorParams) {145 String[] wmsURL, String wmsLayers, String wmsStyles, 146 List<String> mimeFormats, Hashtable<SRS,Grid> grids, 147 int[] metaWidthHeight, String vendorParams) { 143 148 144 149 name = layerName; 145 150 initCacheFactory = cacheFactory; 146 this.WMSurl = wmsURL; 151 this.wmsUrl = wmsURL; 152 this.wmsLayers = wmsLayers; 153 this.wmsStyles = wmsStyles; 147 154 this.mimeFormats = mimeFormats; 148 155 this.grids = grids; … … 578 585 } 579 586 // wms urls 580 wmsURL = WMSurl.split(",");587 //wmsUrl = wmsUrl.split(","); 581 588 582 589 // mimetypes … … 668 675 wmsparams.setRequest(request); 669 676 wmsparams.setVersion(version); 670 wmsparams.setLayer(this.name); 677 if(this.wmsLayers != null && this.wmsLayers.length() > 0) { 678 wmsparams.setLayer(this.wmsLayers); 679 } else { 680 wmsparams.setLayer(this.name); 681 } 682 671 683 wmsparams.setErrorMime(errormime); 672 684 … … 697 709 */ 698 710 protected String nextWmsURL() { 699 curWmsURL = (curWmsURL + 1) % wmsU RL.length;700 return wmsU RL[curWmsURL];711 curWmsURL = (curWmsURL + 1) % wmsUrl.length; 712 return wmsUrl[curWmsURL]; 701 713 } 702 714 … … 919 931 } 920 932 921 public void setWMSurl(String wmsurl) {922 this. WMSurl = wmsurl;923 } 924 925 public String getWMSurl() {926 return this. WMSurl;933 public void setWMSurl(String[] wmsurl) { 934 this.wmsUrl = wmsurl; 935 } 936 937 public String[] getWMSurl() { 938 return this.wmsUrl; 927 939 } 928 940 -
trunk/geowebcache/src/main/java/org/geowebcache/util/GetCapabilitiesConfiguration.java
r338 r346 146 146 Layer layer = layerIter.next(); 147 147 String name = layer.getName(); 148 String stylesStr = ""; 148 149 149 150 if (name != null) { 150 151 List styles = layer.getStyles(); 151 String stylesStr = "";152 152 153 StringBuffer buf = new StringBuffer(); 153 154 if(styles != null) { … … 161 162 hasOne = true; 162 163 } 163 }164 //TODO styles are not currently forwarded164 stylesStr = buf.toString(); 165 } 165 166 166 167 double minX = layer.getLatLonBoundingBox().getMinX(); … … 180 181 latToSphericalMercatorY(maxY)); 181 182 183 String[] wmsUrls = {wmsUrl}; 184 182 185 WMSLayer wmsLayer = null; 183 186 try { 184 wmsLayer = getLayer(name, wmsUrl , bounds4326,187 wmsLayer = getLayer(name, wmsUrls, bounds4326, 185 188 bounds900913, stylesStr); 186 189 } catch (GeoWebCacheException gwc) { … … 198 201 } 199 202 200 private WMSLayer getLayer(String name, String wmsurl,203 private WMSLayer getLayer(String name, String[] wmsurl, 201 204 BBOX bounds4326, BBOX bounds900913, String stylesStr) 202 205 throws GeoWebCacheException { … … 230 233 // TODO We're dropping the styles now... 231 234 return new WMSLayer(name, this.cacheFactory, 232 wmsurl, mimeFormats, grids, metaWidthHeight, this.vendorParameters); 235 wmsurl, stylesStr, name, mimeFormats, grids, 236 metaWidthHeight, this.vendorParameters); 233 237 } 234 238
