Changeset 346

Show
Ignore:
Timestamp:
08/22/08 19:27:36 (3 months ago)
Author:
arneke
Message:

Removing old cruft, started reenabling old fields on layer object

Location:
trunk/geowebcache/src/main/java/org/geowebcache
Files:
3 removed
4 modified

Legend:

Unmodified
Added
Removed
  • trunk/geowebcache/src/main/java/org/geowebcache/GeoWebCacheDispatcher.java

    r338 r346  
    5050    public static final String TYPE_SERVICE = "service"; 
    5151 
    52     public static final String TYPE_SEED = "seed"; 
     52    //public static final String TYPE_SEED = "seed"; 
    5353 
    5454    public static final String TYPE_TRUNCATE = "truncate"; 
     
    8585 
    8686    /** 
    87      * GeoServer and other solutions that embedd this dispatcher will prepend a 
     87     * GeoServer and other solutions that embedded this dispatcher will prepend a 
    8888     * path, this is used to remove it. 
    8989     *  
  • trunk/geowebcache/src/main/java/org/geowebcache/layer/wms/WMSHttpHelper.java

    r338 r346  
    104104 
    105105        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) { 
    107107            Request wmsrequest = new Request(layer.nextWmsURL(), wmsparams); 
    108108            try { 
  • trunk/geowebcache/src/main/java/org/geowebcache/layer/wms/WMSLayer.java

    r338 r346  
    5656public class WMSLayer extends TileLayer { 
    5757    // 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     
    6065    private int[] metaWidthHeight = null; 
    6166 
     
    8893    private transient String vendorParameters; 
    8994 
    90     protected transient String[] wmsURL; 
     95    //protected transient String[] wmsURL; 
    9196 
    9297    private transient int curWmsURL; 
     
    9499    //private transient String wmsLayers; 
    95100 
    96     private transient String wmsStyles; 
     101    //private transient String wmsStyles; 
    97102 
    98103    //private transient WMSParameters wmsparams; 
     
    138143     
    139144    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) { 
    143148      
    144149        name = layerName; 
    145150        initCacheFactory = cacheFactory; 
    146         this.WMSurl = wmsURL; 
     151        this.wmsUrl = wmsURL; 
     152        this.wmsLayers = wmsLayers; 
     153        this.wmsStyles = wmsStyles; 
    147154        this.mimeFormats = mimeFormats; 
    148155        this.grids = grids; 
     
    578585        } 
    579586        // wms urls 
    580         wmsURL = WMSurl.split(","); 
     587        //wmsUrl = wmsUrl.split(","); 
    581588 
    582589        // mimetypes 
     
    668675        wmsparams.setRequest(request); 
    669676        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         
    671683        wmsparams.setErrorMime(errormime); 
    672684 
     
    697709     */ 
    698710    protected String nextWmsURL() { 
    699         curWmsURL = (curWmsURL + 1) % wmsURL.length; 
    700         return wmsURL[curWmsURL]; 
     711        curWmsURL = (curWmsURL + 1) % wmsUrl.length; 
     712        return wmsUrl[curWmsURL]; 
    701713    } 
    702714 
     
    919931    } 
    920932 
    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; 
    927939    } 
    928940 
  • trunk/geowebcache/src/main/java/org/geowebcache/util/GetCapabilitiesConfiguration.java

    r338 r346  
    146146            Layer layer = layerIter.next(); 
    147147            String name = layer.getName(); 
     148            String stylesStr = ""; 
    148149             
    149150            if (name != null) { 
    150151                List styles = layer.getStyles(); 
    151                 String stylesStr = ""; 
     152                 
    152153                StringBuffer buf = new StringBuffer(); 
    153154                if(styles != null) { 
     
    161162                        hasOne = true; 
    162163                    } 
    163                 }     
    164                 //TODO styles are not currently forwarded 
     164                    stylesStr = buf.toString(); 
     165                } 
    165166                 
    166167                double minX = layer.getLatLonBoundingBox().getMinX(); 
     
    180181                        latToSphericalMercatorY(maxY)); 
    181182                
     183                String[] wmsUrls = {wmsUrl}; 
     184                 
    182185                WMSLayer wmsLayer = null; 
    183186                try { 
    184                     wmsLayer = getLayer(name, wmsUrl, bounds4326,  
     187                    wmsLayer = getLayer(name, wmsUrls, bounds4326,  
    185188                            bounds900913, stylesStr); 
    186189                } catch (GeoWebCacheException gwc) { 
     
    198201    } 
    199202 
    200     private WMSLayer getLayer(String name, String wmsurl,  
     203    private WMSLayer getLayer(String name, String[] wmsurl,  
    201204            BBOX bounds4326, BBOX bounds900913, String stylesStr) 
    202205            throws GeoWebCacheException { 
     
    230233        // TODO We're dropping the styles now... 
    231234        return new WMSLayer(name, this.cacheFactory, 
    232                 wmsurl, mimeFormats, grids, metaWidthHeight, this.vendorParameters); 
     235                wmsurl, stylesStr, name, mimeFormats, grids,  
     236                metaWidthHeight, this.vendorParameters); 
    233237    } 
    234238