Login | Register
My pages Projects Community openCollabNet

Discussions > discuss > Attribute and URI patterns

restlet
Discussion topic

Back to topic list

Attribute and URI patterns

Author "Bao,Sam" <Sam dot Bao at Cerner dot com>
Full name "Bao,Sam" <Sam dot Bao at Cerner dot com>
Date 2008-04-11 12:54:07 PDT
Message I'm trying to attach two different URI patterns to the same resource so that I can use different patterns for GET, POST, PUT, DELETE However, what I'm currently doing only GET works, and the attributes are null in DELETE. I'm using the representations in the POST and PUT, so that part seems fine to me right now. Any advice for GET and DELETE? This is what I'm doing right now

Router resultRouter = new Router(getContext());
resultRouter.attach("/result", ResultResource.class); //initial route
resultRouter.attach(​"/result/{getId}", ResultResource.class); //route for GET with a getId attribute
resultRouter.attach(​"/result/{deleteId}/​{deleteVersion}?", ResultResource.class); //route DELETE with a deleteId and a deleteVersion attribute
resultRouter.attach(​"/result?{method}", ResultResource.class); //route for POST with a method attribute

With the above code, in the GET, I'm able to use the getId attribute, but in the DELETE, the deleteId and deleteVersion attributes don't exist, and thus null.

Any help or point me in the right direction, would be mucho appreciated. Thanks.

--------------------​--------------------​--------------------​----------
CONFIDENTIALITY NOTICE This message and any included attachments are from Cerner Corporation and are intended only for the addressee. The information contained in this message is confidential and may constitute inside or non-public information under international, federal, or state securities laws. Unauthorized forwarding, printing, copying, distribution, or use of such information is strictly prohibited and may be unlawful. If you are not the addressee, please promptly delete this message and notify the sender of the delivery error by e-mail or you may call Cerner's corporate offices in Kansas City, Missouri, U.S.A at (+1) (816)221-1024.

« Previous message in topic | 9 of 33 | Next message in topic »

Messages

Show all messages in topic

First resource page thboileau Thierry Boileau 2008-04-08 06:00:42 PDT
     Re: First resource page tpeierls Tim Peierls 2008-04-09 09:33:34 PDT
         Re: First resource page thboileau Thierry Boileau 2008-04-10 00:47:57 PDT
             Unit testing code coverage "Bao,Sam" <Sam dot Bao at Cerner dot com> "Bao,Sam" <Sam dot Bao at Cerner dot com> 2008-04-10 15:01:15 PDT
                 Re: Unit testing code coverage stephank Stephan Koops 2008-04-10 15:17:41 PDT
                     RE: Re: Unit testing code coverage "Bao,Sam" <Sam dot Bao at Cerner dot com> "Bao,Sam" <Sam dot Bao at Cerner dot com> 2008-04-10 15:42:58 PDT
                         Re: Unit testing code coverage stephank Stephan Koops 2008-04-11 04:07:22 PDT
                             RE: Re: Unit testing code coverage "Bao,Sam" <Sam dot Bao at Cerner dot com> "Bao,Sam" <Sam dot Bao at Cerner dot com> 2008-04-11 06:01:30 PDT
                             Attribute and URI patterns "Bao,Sam" <Sam dot Bao at Cerner dot com> "Bao,Sam" <Sam dot Bao at Cerner dot com> 2008-04-11 12:54:07 PDT
                                 RE: Attribute and URI patterns svacharya Sanjay Acharya 2008-04-11 15:10:24 PDT
                                 Re: Attribute and URI patterns keke keke 2008-04-14 03:08:02 PDT
                                     RE: Re: Attribute and URI patterns "Bao,Sam" <Sam dot Bao at Cerner dot com> "Bao,Sam" <Sam dot Bao at Cerner dot com> 2008-04-15 07:52:32 PDT
                         Re: Unit testing code coverage stephank Stephan Koops 2008-04-14 04:40:12 PDT
                             RE: Re: Unit testing code coverage "Bao,Sam" <Sam dot Bao at Cerner dot com> "Bao,Sam" <Sam dot Bao at Cerner dot com> 2008-04-15 07:41:03 PDT
                                 Re: Unit testing code coverage stephank Stephan Koops 2008-04-15 07:57:12 PDT
                                     RE: Re: Unit testing code coverage "Bao,Sam" <Sam dot Bao at Cerner dot com> "Bao,Sam" <Sam dot Bao at Cerner dot com> 2008-04-15 07:59:09 PDT
                                         Re: Re: Unit testing code coverage steve_l Steve Loughran 2008-04-16 01:55:53 PDT
                                             'method' parameter "Bao,Sam" <Sam dot Bao at Cerner dot com> "Bao,Sam" <Sam dot Bao at Cerner dot com> 2008-04-16 13:17:00 PDT
                                                 Re: 'method' parameter thboileau Thierry Boileau 2008-04-16 13:25:02 PDT
                                                     RE: Re: 'method' parameter "Bao,Sam" <Sam dot Bao at Cerner dot com> "Bao,Sam" <Sam dot Bao at Cerner dot com> 2008-04-16 14:07:42 PDT
                                                         Re: 'method' parameter thboileau Thierry Boileau 2008-04-17 07:05:13 PDT
                                                             RE: Re: 'method' parameter "Bao,Sam" <Sam dot Bao at Cerner dot com> "Bao,Sam" <Sam dot Bao at Cerner dot com> 2008-04-17 07:26:49 PDT
                                                                 Re: 'method' parameter thboileau Thierry Boileau 2008-04-17 07:43:35 PDT
                                                                     RE: Re: 'method' parameter "Bao,Sam" <Sam dot Bao at Cerner dot com> "Bao,Sam" <Sam dot Bao at Cerner dot com> 2008-04-17 07:45:21 PDT
                                                                         getRepresentation(Variant variant) "Bao,Sam" <Sam dot Bao at Cerner dot com> "Bao,Sam" <Sam dot Bao at Cerner dot com> 2008-04-17 09:30:26 PDT
Page: of 2 « Previous | Next »
Messages per page: