Typo in ServerResource#getInfo(Variant)

2 messages Options
Embed this post
Permalink
Tim Peierls

Typo in ServerResource#getInfo(Variant)

Reply Threaded More More options
Print post
Permalink
Cut-and-paste error in ServerResource#getInfo(Variant) javadoc: "otherwise the put(Representation) method is invoked" should "otherwise the getInfo() method is invoked".

Btw, I noticed this while trying to recall exactly how in fact you return the metadata in RepresentationInfo using ServerResource (after reading the message below in the discussion list). I couldn't find pointers in the wiki.

--tim

On Wed, Oct 28, 2009 at 7:21 AM, Jerome Louvel <[hidden email]> wrote:
Hi Hannes,

In Restlet 1.1, the conditions are checked *after* the representation is
retrieved, because it needs the representations metadata in order to check
those conditions.

In Restlet 2.0, it is possible to just provide the metadata
(RepresentationInfo) so the conditions are checked before actually
constructing the full blown representation.

On the client-side, use the request#conditions#unmodifiedSince property to
set the HTTP header. See this wiki page for a complete mapping between
Restlet properties and HTTP headers:
http://wiki.restlet.org/docs_1.1/13-restlet/27-restlet/130-restlet.html

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~ http://www.noelios.com




-----Message d'origine-----
De : Hannes Ebner [mailto:[hidden email]]
Envoyé : vendredi 16 octobre 2009 00:49
À : [hidden email]
Objet : Condition handling

Hello,

I'm trying to figure out how to work with Restlets and conditions. I
assume that the conditions are checked already after the resource was
constructed and before the representation methods are called.

So how do I tell the framework which condition my resource expects? I
know how to read the value manually, but I couldn't figure out how to
tell that my resource expects a certain value for the
If-Unmodified-Since header.

If the If-Unmodified-Since header is set, Restlets return a 412 status
before I even have a chance to react on it (i.e. tell the date to be
expected).

Thanks,
Hannes

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=24080
52

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2412073

jlouvel

RE: Typo in ServerResource#getInfo(Variant)

Reply Threaded More More options
Print post
Permalink
Some javascript/style in this post has been disabled (why?)

Hi Tim,

 

Just fixed in SVN trunk! It would be nice if someone could take care of documenting this in the wiki or creating a documentation task.

 

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder ~
http://www.noelios.com

 

 

 

De : [hidden email] [mailto:[hidden email]] De la part de Tim Peierls
Envoyé : mercredi 28 octobre 2009 14:39
À : [hidden email]
Objet : Typo in ServerResource#getInfo(Variant)

 

Cut-and-paste error in ServerResource#getInfo(Variant) javadoc: "otherwise the put(Representation) method is invoked" should "otherwise the getInfo() method is invoked".

 

Btw, I noticed this while trying to recall exactly how in fact you return the metadata in RepresentationInfo using ServerResource (after reading the message below in the discussion list). I couldn't find pointers in the wiki.

 

--tim

On Wed, Oct 28, 2009 at 7:21 AM, Jerome Louvel <[hidden email]> wrote:

Hi Hannes,

In Restlet 1.1, the conditions are checked *after* the representation is
retrieved, because it needs the representations metadata in order to check
those conditions.

In Restlet 2.0, it is possible to just provide the metadata
(RepresentationInfo) so the conditions are checked before actually
constructing the full blown representation.

On the client-side, use the request#conditions#unmodifiedSince property to
set the HTTP header. See this wiki page for a complete mapping between
Restlet properties and HTTP headers:
http://wiki.restlet.org/docs_1.1/13-restlet/27-restlet/130-restlet.html

Best regards,
Jerome Louvel
--
Restlet ~ Founder and Lead developer ~ http://www.restlet.org
Noelios Technologies ~ Co-founder~ http://www.noelios.com




-----Message d'origine-----
De: Hannes Ebner [mailto:[hidden email]]
Envoy vendredi 16 octobre 2009 00:49
: [hidden email]
Objet: Condition handling


Hello,

I'm trying to figure out how to work with Restlets and conditions. I
assume that the conditions are checked already after the resource was
constructed and before the representation methods are called.

So how do I tell the framework which condition my resource expects? I
know how to read the value manually, but I couldn't figure out how to
tell that my resource expects a certain value for the
If-Unmodified-Since header.

If the If-Unmodified-Since header is set, Restlets return a 412 status
before I even have a chance to react on it (i.e. tell the date to be
expected).

Thanks,
Hannes

------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=24080
52

------------------------------------------------------

http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2412073