# HG changeset patch # User Tim Englich # Date 1276243713 0 # Node ID 541ff0db1b121ea17185e8fe4cfeda1bccc05c50 # Parent 9b126bceb0b2357fe9f50065069538f91723229e Added the informations about how the WMS which was published during the Workflow to the GUI gnv/trunk@1195 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 9b126bceb0b2 -r 541ff0db1b12 gnv/ChangeLog --- 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 + + 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 Issue 219 diff -r 9b126bceb0b2 -r 541ff0db1b12 gnv/src/main/java/de/intevation/gnv/action/WMSAction.java --- 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{ diff -r 9b126bceb0b2 -r 541ff0db1b12 gnv/src/main/java/de/intevation/gnv/artifactdatabase/objects/map/DefaultMapService.java --- 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, - 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 : diff -r 9b126bceb0b2 -r 541ff0db1b12 gnv/src/main/java/de/intevation/gnv/artifactdatabase/objects/map/MapService.java --- 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 : diff -r 9b126bceb0b2 -r 541ff0db1b12 gnv/src/main/webapp/WEB-INF/jsp/includes/display_map_inc.jsp --- 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"%> +
+

+


diff -r 9b126bceb0b2 -r 541ff0db1b12 gnv/src/main/webapp/WEB-INF/jsp/includes/display_wms_basic_informations.jsp --- /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 = localMapService.getLayer(); +%> + +<%@page import="java.util.Collection"%> +<%@page import="de.intevation.gnv.artifactdatabase.objects.map.Layer"%> +<%@page import="java.util.Iterator"%>
+ + + + + + + + + + + + + +
:<%=localMapService.getURL()%>?SERVICE=WMS&REQUEST=GetCapabilities
: + <%if (layer != null && !layer.isEmpty()){ + Iterator it = layer.iterator(); + while (it.hasNext()){ + %> + <%=it.next().getName()+(it.hasNext() ? "," : "")%> + <% } + }else{%> + + <%}%> +
:<%=localMapService.getTtl()%>
+