Author: chirino
Date: Mon Sep 25 02:27:12 2006
New Revision: 449622
URL: http://svn.apache.org/viewvc?view=rev&rev=449622
Log:
Latest export from confluence
Modified:
incubator/servicemix/site/main/rest-pojos.html
Modified: incubator/servicemix/site/main/rest-pojos.html
URL:
http://svn.apache.org/viewvc/incubator/servicemix/site/main/rest-pojos.html?view=diff&rev=449622&r1=449621&r2=449622
==============================================================================
--- incubator/servicemix/site/main/rest-pojos.html (original)
+++ incubator/servicemix/site/main/rest-pojos.html Mon Sep 25 02:27:12 2006
@@ -112,8 +112,7 @@
<!--
<div class="pagetitle">REST POJOs</div>
-->
- <DIV class="wiki-content">
-<P>REST POJOs are a Java 5 way of writing POJOs that implement RESTful
services. They are an extension of <SPAN class="nobr"><A
href="http://docs.codehaus.org/display/XB/Annotation%20based%20Dependency%20Injection"
title="Visit page outside Confluence" rel="nofollow">AnDI<SUP><IMG
class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif"
height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> to
add some RESTful annotations.</P>
+ <DIV class="wiki-content"><P>REST POJOs are a Java 5 way of
writing POJOs that implement RESTful services. They are an extension of <SPAN
class="nobr"><A
href="http://docs.codehaus.org/display/XB/Annotation%20based%20Dependency%20Injection"
title="Visit page outside Confluence" rel="nofollow">AnDI<SUP><IMG
class="rendericon" src="http://goopen.org/confluence/images/icons/linkext7.gif"
height="0" width="0" align="absmiddle" alt="" border="0"></SUP></A></SPAN> to
add some RESTful annotations.</P>
<P>The core features are</P>
@@ -135,7 +134,36 @@
<H3><A name="RESTPOJOs-Example"></A>Example</H3>
<DIV class="code"><DIV class="codeContent">
-<PRE class="code-java"></PRE>
+<PRE class="code-java">@UriBinding(uri=<SPAN
class="code-quote">"/cheese/{id}"</SPAN>)
+<SPAN class="code-keyword">public</SPAN> class MyPOJO {
+
+ @Resource ActionBeanContext context; <SPAN class="code-comment">// providers
access to request/response et al via Stripes helper class
+</SPAN>
+ <SPAN class="code-keyword">private</SPAN> <SPAN
class="code-object">Long</SPAN> id
+
+ @Get
+ <SPAN class="code-keyword">public</SPAN> Cheese load() {
+ <SPAN class="code-keyword">return</SPAN> cheese; <SPAN
class="code-comment">// load by id
+</SPAN> }
+
+ @Post
+ <SPAN class="code-keyword">public</SPAN> void insert(Cheese cheese) {
+ ...
+ }
+
+
+ @Put
+ <SPAN class="code-keyword">public</SPAN> void update(Cheese cheese) {
+ ...
+ }
+
+
+ @Delete
+ <SPAN class="code-keyword">public</SPAN> void delete() {
+ ...
+ }
+
+}</PRE>
</DIV></DIV>
</DIV>
@@ -147,8 +175,9 @@
</DIV>
<DIV id="site-footer">
Added by <A
href="http://goopen.org/confluence/users/viewuserprofile.action?username=jstrachan">James
Strachan</A>,
- last edited by <A
href="http://goopen.org/confluence/users/viewuserprofile.action?username=jstrachan">James
Strachan</A> on Apr 18, 2006
-
+ last edited by <A
href="http://goopen.org/confluence/users/viewuserprofile.action?username=jstrachan">James
Strachan</A> on Sep 25, 2006
+ (<A
href="http://goopen.org/confluence/pages/diffpages.action?pageId=2085&originalId=13798">view
change</A>)
+
(<A
href="http://goopen.org/confluence/pages/editpage.action?pageId=2085">edit
page</A>)
</DIV>