You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@olingo.apache.org by mi...@apache.org on 2014/03/16 10:06:10 UTC

[21/50] [abbrv] git commit: [OLINGO-158] - reference scenario supports JAX-RS and Servlet entry point

[OLINGO-158] - reference scenario supports JAX-RS and Servlet entry
point

Project: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/commit/6cc36374
Tree: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/tree/6cc36374
Diff: http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/diff/6cc36374

Branch: refs/heads/Olingo-129_PocJpaDataStore
Commit: 6cc36374ab12e67c5167ce4141d1893c1cfe0959
Parents: 9655f6b
Author: Stephan Klevenz <sk...@apache.org>
Authored: Fri Feb 14 10:03:39 2014 +0100
Committer: Stephan Klevenz <sk...@apache.org>
Committed: Fri Feb 14 10:03:39 2014 +0100

----------------------------------------------------------------------
 .../odata-web/src/main/webapp/WEB-INF/web.xml   |  16 ++
 odata2-lib/odata-web/src/main/webapp/index.jsp  | 190 ++++++++++++++-----
 2 files changed, 161 insertions(+), 45 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/6cc36374/odata2-lib/odata-web/src/main/webapp/WEB-INF/web.xml
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-web/src/main/webapp/WEB-INF/web.xml b/odata2-lib/odata-web/src/main/webapp/WEB-INF/web.xml
index 03cacc1..faf1cd6 100644
--- a/odata2-lib/odata-web/src/main/webapp/WEB-INF/web.xml
+++ b/odata2-lib/odata-web/src/main/webapp/WEB-INF/web.xml
@@ -39,10 +39,26 @@
 		</init-param>
 		<load-on-startup>1</load-on-startup>
 	</servlet>
+    
+    <servlet>
+        <servlet-name>ReferenceScenarioNonJaxrsServlet</servlet-name>
+        <servlet-class>org.apache.olingo.odata2.core.servlet.ODataServlet</servlet-class>
+        <init-param>
+            <param-name>org.apache.olingo.odata2.service.factory</param-name>
+            <param-value>org.apache.olingo.odata2.ref.processor.ScenarioServiceFactory</param-value>
+        </init-param>
+        <load-on-startup>1</load-on-startup>
+    </servlet>
+
 
 	<servlet-mapping>
 		<servlet-name>ReferenceScenarioServlet</servlet-name>
 		<url-pattern>/ReferenceScenario.svc/*</url-pattern>
 	</servlet-mapping>
 
+    <servlet-mapping>
+        <servlet-name>ReferenceScenarioNonJaxrsServlet</servlet-name>
+        <url-pattern>/ReferenceScenarioNonJaxrs.svc/*</url-pattern>
+    </servlet-mapping>
+
 </web-app>

http://git-wip-us.apache.org/repos/asf/incubator-olingo-odata2/blob/6cc36374/odata2-lib/odata-web/src/main/webapp/index.jsp
----------------------------------------------------------------------
diff --git a/odata2-lib/odata-web/src/main/webapp/index.jsp b/odata2-lib/odata-web/src/main/webapp/index.jsp
index 3ffc551..dca89c1 100644
--- a/odata2-lib/odata-web/src/main/webapp/index.jsp
+++ b/odata2-lib/odata-web/src/main/webapp/index.jsp
@@ -1,4 +1,5 @@
-<%@ page language="java" contentType="text/html; UTF-8" pageEncoding="UTF-8"%>
+<%@ page language="java" contentType="text/html; UTF-8"
+	pageEncoding="UTF-8"%>
 <!--
   Licensed to the Apache Software Foundation (ASF) under one
          or more contributor license agreements.  See the NOTICE file
@@ -23,29 +24,110 @@
 <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
 <title>Apache Olingo - OData2 Library</title>
 <style type="text/css">
-body { font-family: Arial, sans-serif; font-size: 13px; line-height: 18px;
-       color: blue; background-color: #ffffff; }
-a { color: blue; text-decoration: none; }
-a:focus { outline: thin dotted #4076cb; outline-offset: -1px; }
-a:hover, a:active { outline: 0; }
-a:hover { color: #404a7e; text-decoration: underline; }
-h1, h2, h3, h4, h5, h6 { margin: 9px 0; font-family: inherit; font-weight: bold;
-                         line-height: 1; color: blue; }
-h1 { font-size: 36px; line-height: 40px; }
-h2 { font-size: 30px; line-height: 40px; }
-h3 { font-size: 24px; line-height: 40px; }
-h4 { font-size: 18px; line-height: 20px; }
-h5 { font-size: 14px; line-height: 20px; }
-h6 { font-size: 12px; line-height: 20px; }
-.logo { float: right; }
-ul { padding: 0; margin: 0 0 9px 25px; }
-ul ul { margin-bottom: 0; }
-li { line-height: 18px; }
-hr { margin: 18px 0;
-     border: 0; border-top: 1px solid #cccccc; border-bottom: 1px solid #ffffff; }
-table { border-collapse: collapse; border-spacing: 10px; }
-th, td { border: 1px solid; padding: 20px; }
-.code { font-family: "Courier New", monospace; font-size: 13px; line-height: 18px; }
+body {
+	font-family: Arial, sans-serif;
+	font-size: 13px;
+	line-height: 18px;
+	color: blue;
+	background-color: #ffffff;
+}
+
+a {
+	color: blue;
+	text-decoration: none;
+}
+
+a:focus {
+	outline: thin dotted #4076cb;
+	outline-offset: -1px;
+}
+
+a:hover,a:active {
+	outline: 0;
+}
+
+a:hover {
+	color: #404a7e;
+	text-decoration: underline;
+}
+
+h1,h2,h3,h4,h5,h6 {
+	margin: 9px 0;
+	font-family: inherit;
+	font-weight: bold;
+	line-height: 1;
+	color: blue;
+}
+
+h1 {
+	font-size: 36px;
+	line-height: 40px;
+}
+
+h2 {
+	font-size: 30px;
+	line-height: 40px;
+}
+
+h3 {
+	font-size: 24px;
+	line-height: 40px;
+}
+
+h4 {
+	font-size: 18px;
+	line-height: 20px;
+}
+
+h5 {
+	font-size: 14px;
+	line-height: 20px;
+}
+
+h6 {
+	font-size: 12px;
+	line-height: 20px;
+}
+
+.logo {
+	float: right;
+}
+
+ul {
+	padding: 0;
+	margin: 0 0 9px 25px;
+}
+
+ul ul {
+	margin-bottom: 0;
+}
+
+li {
+	line-height: 18px;
+}
+
+hr {
+	margin: 18px 0;
+	border: 0;
+	border-top: 1px solid #cccccc;
+	border-bottom: 1px solid #ffffff;
+}
+
+table {
+	border-collapse: collapse;
+	border-spacing: 10px;
+}
+
+th,td {
+	border: 1px solid;
+	padding: 20px;
+}
+
+.code {
+	font-family: "Courier New", monospace;
+	font-size: 13px;
+	line-height: 18px;
+}
 </style>
 </head>
 <body>
@@ -55,6 +137,7 @@ th, td { border: 1px solid; padding: 20px; }
 	<table>
 		<tr>
 			<td valign="top">
+				<h3>JAX-RS</h3>
 				<h3>Service Document and Metadata</h3>
 				<ul>
 					<li><a href="ReferenceScenario.svc?_wadl" target="_blank">wadl</a></li>
@@ -80,30 +163,47 @@ th, td { border: 1px solid; padding: 20px; }
 					<li><a href="ReferenceScenario.svc/Buildings('1')"
 						target="_blank">Buildings('1')</a></li>
 					<li><a href="ReferenceScenario.svc/Rooms('1')" target="_blank">Rooms('1')</a></li>
- 					<li><a href="ReferenceScenario.svc/Container2.Photos(Id=4,Type='foo')"
-                           target="_blank">Container2.Photos(Id=4,Type='foo')</a></li>
+					<li><a
+						href="ReferenceScenario.svc/Container2.Photos(Id=4,Type='foo')"
+						target="_blank">Container2.Photos(Id=4,Type='foo')</a></li>
 				</ul>
 			</td>
 			<td valign="top">
-				&nbsp;
-			</td>
-			<td valign="bottom">
-				<div class="code">
-					<%
-					  String version = "gen/version.html";
-					%>
-					<%
-					  try {
-					%>
-					<jsp:include page='<%=version%>' />
-					<%
-					  } catch (Exception e) {
-					%>
-					<p>IDE Build</p>
-					<%
-					  }
-					%>
-				</div>
+				<h3>Servlet</h3>
+				<h3>Service Document and Metadata</h3>
+				<ul>
+					<li><a href="ReferenceScenarioNonJaxrs.svc/" target="_blank">service
+							document</a></li>
+					<li><a href="ReferenceScenarioNonJaxrs.svc/$metadata"
+						target="_blank">metadata</a></li>
+				</ul>
+				<h3>EntitySets</h3>
+				<ul>
+					<li><a href="ReferenceScenarioNonJaxrs.svc/Employees"
+						target="_blank">Employees</a></li>
+					<li><a href="ReferenceScenarioNonJaxrs.svc/Managers"
+						target="_blank">Managers</a></li>
+					<li><a href="ReferenceScenarioNonJaxrs.svc/Buildings"
+						target="_blank">Buildings</a></li>
+					<li><a href="ReferenceScenarioNonJaxrs.svc/Rooms"
+						target="_blank">Rooms</a></li>
+					<li><a href="ReferenceScenarioNonJaxrs.svc/Container2.Photos"
+						target="_blank">Container2.Photos</a></li>
+				</ul>
+				<h3>Entities</h3>
+				<ul>
+					<li><a href="ReferenceScenarioNonJaxrs.svc/Employees('1')"
+						target="_blank">Employees('1')</a></li>
+					<li><a href="ReferenceScenarioNonJaxrs.svc/Managers('1')"
+						target="_blank">Managers('1')</a></li>
+					<li><a href="ReferenceScenarioNonJaxrs.svc/Buildings('1')"
+						target="_blank">Buildings('1')</a></li>
+					<li><a href="ReferenceScenarioNonJaxrs.svc/Rooms('1')"
+						target="_blank">Rooms('1')</a></li>
+					<li><a
+						href="ReferenceScenarioNonJaxrs.svc/Container2.Photos(Id=4,Type='foo')"
+						target="_blank">Container2.Photos(Id=4,Type='foo')</a></li>
+				</ul>
 			</td>
 		</tr>
 	</table>