Author: ogrisel
Date: Fri Apr  1 13:33:04 2011
New Revision: 1087701

URL: http://svn.apache.org/viewvc?rev=1087701&view=rev
Log:
better handling of missing description templates

Modified:
    
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/NavigationLink.java
    
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/home/src/main/resources/org/apache/stanbol/commons/web/home/templates/org/apache/stanbol/commons/web/home/resource/StanbolRootResource/index.ftl

Modified: 
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/NavigationLink.java
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/branches/http-endpoint-refactoring/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/NavigationLink.java?rev=1087701&r1=1087700&r2=1087701&view=diff
==============================================================================
--- 
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/NavigationLink.java
 (original)
+++ 
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/base/src/main/java/org/apache/stanbol/commons/web/base/NavigationLink.java
 Fri Apr  1 13:33:04 2011
@@ -13,6 +13,13 @@ public class NavigationLink implements C
 
     public final int order;
 
+    public NavigationLink(String path, String label, int order) {
+        this.path = path;
+        this.label = label;
+        this.descriptionTemplate = null;
+        this.order = order;
+    }
+
     public NavigationLink(String path, String label, String 
descriptionTemplate, int order) {
         this.path = path;
         this.label = label;
@@ -41,4 +48,8 @@ public class NavigationLink implements C
         return order;
     }
 
+    public boolean getHasDescriptionTemplate() {
+        return descriptionTemplate != null;
+    }
+    
 }

Modified: 
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/home/src/main/resources/org/apache/stanbol/commons/web/home/templates/org/apache/stanbol/commons/web/home/resource/StanbolRootResource/index.ftl
URL: 
http://svn.apache.org/viewvc/incubator/stanbol/branches/http-endpoint-refactoring/commons/web/home/src/main/resources/org/apache/stanbol/commons/web/home/templates/org/apache/stanbol/commons/web/home/resource/StanbolRootResource/index.ftl?rev=1087701&r1=1087700&r2=1087701&view=diff
==============================================================================
--- 
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/home/src/main/resources/org/apache/stanbol/commons/web/home/templates/org/apache/stanbol/commons/web/home/resource/StanbolRootResource/index.ftl
 (original)
+++ 
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/home/src/main/resources/org/apache/stanbol/commons/web/home/templates/org/apache/stanbol/commons/web/home/resource/StanbolRootResource/index.ftl
 Fri Apr  1 13:33:04 2011
@@ -16,8 +16,10 @@ view that documents the matching RESTful
 <dl>
 
   <#list it.navigationLinks as link>
+  <#if link.hasDescriptionTemplate>
     <dt><a href="${it.publicBaseUri}${link.path}">${link.label}</a><dt>
     <dd><#include "${link.descriptionTemplate}"></dd>
+  </#if>
   </#list>
 
   <dt><a href="sparql">/sparql</a><dt>


Reply via email to