<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: RESTing at ease with JSR 311</title>
	<atom:link href="http://thediscoblog.com/2008/07/16/resting-at-ease-with-jsr-311/feed/" rel="self" type="application/rss+xml" />
	<link>http://thediscoblog.com/2008/07/16/resting-at-ease-with-jsr-311/</link>
	<description>Can you dig it man?</description>
	<pubDate>Thu, 20 Nov 2008 10:20:07 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6</generator>
		<item>
		<title>By: The Disco Blog &#187; Blog Archive &#187; RESTful services without the sweat</title>
		<link>http://thediscoblog.com/2008/07/16/resting-at-ease-with-jsr-311/#comment-72244</link>
		<dc:creator>The Disco Blog &#187; Blog Archive &#187; RESTful services without the sweat</dc:creator>
		<pubDate>Tue, 22 Jul 2008 18:42:18 +0000</pubDate>
		<guid isPermaLink="false">http://thediscoblog.com/2008/07/16/resting-at-ease-with-jsr-311/#comment-72244</guid>
		<description>[...] state transfer (also known as REST, baby) is an approach to designing loosely coupled applications that rely on named resources rather [...]</description>
		<content:encoded><![CDATA[<p>[...] state transfer (also known as REST, baby) is an approach to designing loosely coupled applications that rely on named resources rather [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jerome Louvel</title>
		<link>http://thediscoblog.com/2008/07/16/resting-at-ease-with-jsr-311/#comment-71760</link>
		<dc:creator>Jerome Louvel</dc:creator>
		<pubDate>Sun, 20 Jul 2008 15:30:37 +0000</pubDate>
		<guid isPermaLink="false">http://thediscoblog.com/2008/07/16/resting-at-ease-with-jsr-311/#comment-71760</guid>
		<description>Hi Andy,

You're welcome. As for a Restlet tutorial on developerWorks, hmmm... it sounds pretty cool :-)

Regarding JAX-RS security, there is only a SecurityContext interface that can be injected. The responsability for actual authentication and authorization is left to the parent container (Restlet, Servlet, etc.).

https://jsr311.dev.java.net/nonav/releases/0.9/javax/ws/rs/core/SecurityContext.html

Best regards,
Jerome</description>
		<content:encoded><![CDATA[<p>Hi Andy,</p>
<p>You&#8217;re welcome. As for a Restlet tutorial on developerWorks, hmmm&#8230; it sounds pretty cool <img src='http://thediscoblog.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p>Regarding JAX-RS security, there is only a SecurityContext interface that can be injected. The responsability for actual authentication and authorization is left to the parent container (Restlet, Servlet, etc.).</p>
<p><a href="https://jsr311.dev.java.net/nonav/releases/0.9/javax/ws/rs/core/SecurityContext.html" rel="nofollow">https://jsr311.dev.java.net/nonav/releases/0.9/javax/ws/rs/core/SecurityContext.html</a></p>
<p>Best regards,<br />
Jerome</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Andy</title>
		<link>http://thediscoblog.com/2008/07/16/resting-at-ease-with-jsr-311/#comment-71406</link>
		<dc:creator>Andy</dc:creator>
		<pubDate>Fri, 18 Jul 2008 19:54:02 +0000</pubDate>
		<guid isPermaLink="false">http://thediscoblog.com/2008/07/16/resting-at-ease-with-jsr-311/#comment-71406</guid>
		<description>Jerome- thanks for clarifying my comment-- indeed, the call to &lt;code&gt;setModification(true)&lt;/code&gt; is exactly what I missed. FYI, keep your eyes peeled for a Restlet tutorial over at IBM &lt;a href="http://www.ibm.com/developerworks/java" rel="nofollow"&gt;developerWorks&lt;/a&gt;, baby! 

One thing that stands out with JSR 311 that is solved with Restlets more easily is Security-- do you have insight into security w/respect to JSR 311? Is it something that will eventually make it into the spec or is it just handled by containers and JSR 250?</description>
		<content:encoded><![CDATA[<p>Jerome- thanks for clarifying my comment&#8211; indeed, the call to <code>setModification(true)</code> is exactly what I missed. FYI, keep your eyes peeled for a Restlet tutorial over at IBM <a href="http://www.ibm.com/developerworks/java" rel="nofollow">developerWorks</a>, baby! </p>
<p>One thing that stands out with JSR 311 that is solved with Restlets more easily is Security&#8211; do you have insight into security w/respect to JSR 311? Is it something that will eventually make it into the spec or is it just handled by containers and JSR 250?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jerome Louvel</title>
		<link>http://thediscoblog.com/2008/07/16/resting-at-ease-with-jsr-311/#comment-71153</link>
		<dc:creator>Jerome Louvel</dc:creator>
		<pubDate>Thu, 17 Jul 2008 18:00:13 +0000</pubDate>
		<guid isPermaLink="false">http://thediscoblog.com/2008/07/16/resting-at-ease-with-jsr-311/#comment-71153</guid>
		<description>Hi Andy,

I'd like to add a precision. With Restlet API's Resource class, you are not 'forced' to override the &lt;code&gt;allow*()&lt;/code&gt; methods. 

In fact, there are two levels, the lower one is part of Handler, Resource's super class:
 - &lt;code&gt;allow*()&lt;/code&gt; methods
 - &lt;code&gt;handle*()&lt;/code&gt; methods

Those are dynamically discovered and invoked. It's not necessary to override them in subclasses. You can however, support extension HTTP methods like &lt;code&gt;allowMove()&lt;/code&gt; and &lt;code&gt;handleMove()&lt;/code&gt; if needed.

The higher level is indeed in the Resource class:
 - &lt;code&gt;is&lt;/code&gt;/&lt;code&gt;setReadable() &lt;/code&gt;methods used by &lt;code&gt;allowGet()&lt;/code&gt;, &lt;code&gt;allowHead()&lt;/code&gt;
 - &lt;code&gt;is&lt;/code&gt;/&lt;code&gt;setModifiable()&lt;/code&gt; methods used by &lt;code&gt;allowPost()&lt;/code&gt;, &lt;code&gt;allowPut()&lt;/code&gt;, etc.
 - &lt;code&gt;getVariants()&lt;/code&gt; and &lt;code&gt;represent(Variant)&lt;/code&gt; called by &lt;code&gt;handleGet()&lt;/code&gt; and &lt;code&gt;handleHead()&lt;/code&gt;
 - &lt;code&gt;storeRepresentation(Representation)&lt;/code&gt; called by &lt;code&gt;handlePut()&lt;/code&gt;
 - &lt;code&gt;acceptRepresentation(Representation)&lt;/code&gt; called by &lt;code&gt;handlePost()&lt;/code&gt;
 - etc.

It's just that by default we forbid modification methods. To change that, just call &lt;code&gt;setModification(true)&lt;/code&gt; in your &lt;code&gt;Resource&lt;/code&gt; subclass's constructor. 

It also allows a finer grained control as some users might have read-only access while other with have modification rights. So, this can't always be described at developement time like in JSR-311, you might need to actually take a look at the handled request, for example for credentials.

Nice post otherwise!

Best regards,
Jerome</description>
		<content:encoded><![CDATA[<p>Hi Andy,</p>
<p>I&#8217;d like to add a precision. With Restlet API&#8217;s Resource class, you are not &#8216;forced&#8217; to override the <code>allow*()</code> methods. </p>
<p>In fact, there are two levels, the lower one is part of Handler, Resource&#8217;s super class:<br />
 - <code>allow*()</code> methods<br />
 - <code>handle*()</code> methods</p>
<p>Those are dynamically discovered and invoked. It&#8217;s not necessary to override them in subclasses. You can however, support extension HTTP methods like <code>allowMove()</code> and <code>handleMove()</code> if needed.</p>
<p>The higher level is indeed in the Resource class:<br />
 - <code>is</code>/<code>setReadable() </code>methods used by <code>allowGet()</code>, <code>allowHead()</code><br />
 - <code>is</code>/<code>setModifiable()</code> methods used by <code>allowPost()</code>, <code>allowPut()</code>, etc.<br />
 - <code>getVariants()</code> and <code>represent(Variant)</code> called by <code>handleGet()</code> and <code>handleHead()</code><br />
 - <code>storeRepresentation(Representation)</code> called by <code>handlePut()</code><br />
 - <code>acceptRepresentation(Representation)</code> called by <code>handlePost()</code><br />
 - etc.</p>
<p>It&#8217;s just that by default we forbid modification methods. To change that, just call <code>setModification(true)</code> in your <code>Resource</code> subclass&#8217;s constructor. </p>
<p>It also allows a finer grained control as some users might have read-only access while other with have modification rights. So, this can&#8217;t always be described at developement time like in JSR-311, you might need to actually take a look at the handled request, for example for credentials.</p>
<p>Nice post otherwise!</p>
<p>Best regards,<br />
Jerome</p>
]]></content:encoded>
	</item>
</channel>
</rss>
