changeset 994:541ff0db1b12

Added the informations about how the WMS which was published during the Workflow to the GUI gnv/trunk@1195 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Tim Englich <tim.englich@intevation.de>
date Fri, 11 Jun 2010 08:08:33 +0000
parents 9b126bceb0b2
children a406d8807e5d
files gnv/ChangeLog gnv/src/main/java/de/intevation/gnv/action/WMSAction.java gnv/src/main/java/de/intevation/gnv/artifactdatabase/objects/map/DefaultMapService.java gnv/src/main/java/de/intevation/gnv/artifactdatabase/objects/map/MapService.java gnv/src/main/webapp/WEB-INF/jsp/includes/display_map_inc.jsp gnv/src/main/webapp/WEB-INF/jsp/includes/display_wms_basic_informations.jsp
diffstat 6 files changed, 83 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/gnv/ChangeLog	Thu Jun 10 22:01:23 2010 +0000
+++ b/gnv/ChangeLog	Fri Jun 11 08:08:33 2010 +0000
@@ -1,3 +1,27 @@
+2010-06-11  Tim Englich  <tim.englich@intevation.de>
+
+	  Added the informations about how the WMS which was published during the 
+	  Workflow to the GUI. The URL to the capablities-documenet, the names of 
+	  the layer and the ttl will be listed.
+
+	* src/main/java/de/intevation/gnv/action/WMSAction.java (execute): 
+	  Write the TTL to the Mapservice which is published.
+
+	* src/main/java/de/intevation/gnv/artifactdatabase/objects/map/DefaultMapService.java, 
+	  src/main/java/de/intevation/gnv/artifactdatabase/objects/map/MapService.java: 
+	  Added Getter for the Attribute TTL. Which shows how long the Layer of this
+	  Service will be available.
+	  
+	* src/main/webapp/WEB-INF/jsp/includes/display_wms_basic_informations.jsp: 
+	  Added new JSP-File for publishing the Basic-Informations of the WMS.
+	  The URL which will deliver the Capablities is shown.
+	  Also the Names of the Layers are listed.
+	  At least the Time untiƶl teh Layers are available is displayed.
+
+	* src/main/webapp/WEB-INF/jsp/includes/display_map_inc.jsp: 
+	  Included Informationblock for the WMS which was produced in the workflow
+	  before and now is published in the map.
+
 2010-06-10	Sascha L. Teichmann	<sascha.teichmann@intevation.de>
 
 	Issue 219
--- a/gnv/src/main/java/de/intevation/gnv/action/WMSAction.java	Thu Jun 10 22:01:23 2010 +0000
+++ b/gnv/src/main/java/de/intevation/gnv/action/WMSAction.java	Fri Jun 11 08:08:33 2010 +0000
@@ -197,7 +197,7 @@
 
                 MapService mapService = new DefaultMapService("0815", layers, 
                                                           "UMN", mapserverPath,
-                                                          bbox);
+                                                          bbox,ttl);
                 sm.setLocalMapService(mapService);
                 return super.execute(mapping, form, request, response);
             }else{
--- a/gnv/src/main/java/de/intevation/gnv/artifactdatabase/objects/map/DefaultMapService.java	Thu Jun 10 22:01:23 2010 +0000
+++ b/gnv/src/main/java/de/intevation/gnv/artifactdatabase/objects/map/DefaultMapService.java	Fri Jun 11 08:08:33 2010 +0000
@@ -33,6 +33,11 @@
      * The Bbox which surrounds the data of the Mapservice
      */
     private String bbox = null;
+    
+    /**
+     * The time until the server will provide the data.
+     */
+    private String ttl = null;
 
     /**
      * Constructor
@@ -59,11 +64,13 @@
      * @param type the type of this mapservice
      * @param url the URl of this mapservice
      * @param bbox the Bbox which surrounds the data of the Mapservice
+     * @param ttl the time until the server will provide the data.
      */
     public DefaultMapService(String id, Collection<Layer> layer,
-                             String type, String url, String bbox) {
+                             String type, String url, String bbox, String ttl) {
         this(id,layer,type,url);
         this.bbox = bbox;
+        this.ttl = ttl;
     }
 
 
@@ -89,5 +96,8 @@
     public String getBBoxValue() {
         return this.bbox;
     }
+    public String getTtl() {
+        return this.ttl;
+}
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/gnv/src/main/java/de/intevation/gnv/artifactdatabase/objects/map/MapService.java	Thu Jun 10 22:01:23 2010 +0000
+++ b/gnv/src/main/java/de/intevation/gnv/artifactdatabase/objects/map/MapService.java	Fri Jun 11 08:08:33 2010 +0000
@@ -45,5 +45,11 @@
      * @return the bboxvalue
      */
     String getBBoxValue ();
+    
+    /**
+     * Returns the Time until the Service will provide the Data.
+     * @return the Time until the Service will provide the Data.
+     */
+    String getTtl();
 }
 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :
--- a/gnv/src/main/webapp/WEB-INF/jsp/includes/display_map_inc.jsp	Thu Jun 10 22:01:23 2010 +0000
+++ b/gnv/src/main/webapp/WEB-INF/jsp/includes/display_map_inc.jsp	Fri Jun 11 08:08:33 2010 +0000
@@ -1,6 +1,9 @@
 <%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean"%>
+<jsp:include page="display_wms_basic_informations.jsp" />
 <div>
+<p align="right">
   <a target="blank" href="<%=response.encodeURL("mapclient.do?uid="+System.currentTimeMillis())%>"><bean:message key="gnvview.mapclient.fullscreen"/></a>
+</p>
 </div>
 <br/>
 <div id="cap" style="height: 100%; width: 100%; overflow: auto">
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/gnv/src/main/webapp/WEB-INF/jsp/includes/display_wms_basic_informations.jsp	Fri Jun 11 08:08:33 2010 +0000
@@ -0,0 +1,38 @@
+<%@ taglib uri="http://jakarta.apache.org/struts/tags-bean" prefix="bean" %>
+<%@page import="de.intevation.gnv.action.sessionmodel.SessionModel"%>
+<%@page import="de.intevation.gnv.artifactdatabase.objects.map.MapService"%>
+<%@page import="de.intevation.gnv.action.sessionmodel.SessionModelFactory"%>
+<%
+SessionModel sm = SessionModelFactory.getInstance().getSessionModel(request);
+MapService localMapService = sm.getLocalMapService();
+Collection<Layer> layer = localMapService.getLayer(); 
+%>
+
+<%@page import="java.util.Collection"%>
+<%@page import="de.intevation.gnv.artifactdatabase.objects.map.Layer"%>
+<%@page import="java.util.Iterator"%><div id="wms">
+    <table>
+        <tr>
+            <td class="parameter"><bean:message key="gnviewer.wms.server.path"/>:</td>
+            <td class="wmsvalue"><%=localMapService.getURL()%>?SERVICE=WMS&amp;REQUEST=GetCapabilities</td>
+        </tr>
+        <tr>
+            <td class="parameter"><bean:message key="gnviewer.wms.server.layer"/>:</td>
+            <td class="wmsvalue">
+            <%if (layer != null && !layer.isEmpty()){
+                  Iterator<Layer> it = layer.iterator();
+                  while (it.hasNext()){
+            %>
+                       <%=it.next().getName()+(it.hasNext() ? "," : "")%>
+            <%    }
+              }else{%>
+                 <bean:message key="gnviewer.wms.layer.nolayerfound"/>
+            <%}%>
+            </td>
+        </tr>
+        <tr>
+            <td class="parameter"><bean:message key="gnviewer.wms.layer.ttl"/>:</td>
+            <td class="wmsvalue"><%=localMapService.getTtl()%></td>
+        </tr>
+    </table>
+</div>

http://dive4elements.wald.intevation.org