Author: ogrisel
Date: Wed Mar 30 17:18:59 2011
New Revision: 1087021
URL: http://svn.apache.org/viewvc?rev=1087021&view=rev
Log:
STANBOL-120: moving the homepage definition in it's dedicated web fragment /
bundle (fix classpath issues)
Added:
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/home/src/main/java/org/apache/stanbol/commons/web/home/resource/
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/home/src/main/java/org/apache/stanbol/commons/web/home/resource/StanbolRootResource.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/
- copied from r1087019,
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/home/src/main/resources/org/apache/stanbol/commons/web/home/templates/org/apache/stanbol/commons/web/base/
Removed:
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/home/src/main/java/org/apache/stanbol/commons/web/home/StanbolRootResource.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/base/
Modified:
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/home/src/main/java/org/apache/stanbol/commons/web/home/HomeWebFragment.java
Modified:
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/home/src/main/java/org/apache/stanbol/commons/web/home/HomeWebFragment.java
URL:
http://svn.apache.org/viewvc/incubator/stanbol/branches/http-endpoint-refactoring/commons/web/home/src/main/java/org/apache/stanbol/commons/web/home/HomeWebFragment.java?rev=1087021&r1=1087020&r2=1087021&view=diff
==============================================================================
---
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/home/src/main/java/org/apache/stanbol/commons/web/home/HomeWebFragment.java
(original)
+++
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/home/src/main/java/org/apache/stanbol/commons/web/home/HomeWebFragment.java
Wed Mar 30 17:18:59 2011
@@ -12,6 +12,7 @@ import org.apache.felix.scr.annotations.
import org.apache.stanbol.commons.web.base.LinkResource;
import org.apache.stanbol.commons.web.base.ScriptResource;
import org.apache.stanbol.commons.web.base.WebFragment;
+import org.apache.stanbol.commons.web.home.resource.StanbolRootResource;
import org.osgi.framework.BundleContext;
import org.osgi.service.component.ComponentContext;
Added:
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/home/src/main/java/org/apache/stanbol/commons/web/home/resource/StanbolRootResource.java
URL:
http://svn.apache.org/viewvc/incubator/stanbol/branches/http-endpoint-refactoring/commons/web/home/src/main/java/org/apache/stanbol/commons/web/home/resource/StanbolRootResource.java?rev=1087021&view=auto
==============================================================================
---
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/home/src/main/java/org/apache/stanbol/commons/web/home/resource/StanbolRootResource.java
(added)
+++
incubator/stanbol/branches/http-endpoint-refactoring/commons/web/home/src/main/java/org/apache/stanbol/commons/web/home/resource/StanbolRootResource.java
Wed Mar 30 17:18:59 2011
@@ -0,0 +1,27 @@
+package org.apache.stanbol.commons.web.home.resource;
+
+import static javax.ws.rs.core.MediaType.TEXT_HTML;
+
+import javax.ws.rs.GET;
+import javax.ws.rs.Path;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.Response;
+
+import org.apache.stanbol.commons.web.base.resource.BaseStanbolResource;
+
+import com.sun.jersey.api.view.Viewable;
+
+/**
+ * Root JAX-RS resource. The HTML view is implicitly rendered by a freemarker
template to be found in the
+ * META-INF/templates folder.
+ */
+@Path("/")
+public class StanbolRootResource extends BaseStanbolResource {
+
+ @GET
+ @Produces(TEXT_HTML)
+ public Response get() {
+ return Response.ok(new Viewable("index", this), TEXT_HTML).build();
+ }
+
+}