Hi xasima,

the Path.limited was removed in later JAX-RS version. If you use Restlet 
1.1.2 (or Restlet 1.2 M1), you could use regular expressions in the 
path, e.g. 
@Path("openstorage/{version}/{prefix}/{user}/{collection}/{resource : 
<regexp>"). I'm not very familiar with regular expressions, but I think 
it should be ".*" in this case.

best regards
   Stephan

[email protected] schrieb:
> I want to write the Resource that will handle the following URL pattern:
> openstorage/{version}/{prefix}/{user}/{collection}/{resource}
>
> I wish to use the same Resource even if {resource} is complex. For example to 
> server  both 
> openstorage/0.1/test/john/bookmarks/cars  (resource=cars, 
> collection=bookmarks)
> and 
> openstorage/0.1/test/john/bookmarks/cars/lexus (resource=cars/lexus, 
> collection=bookmarks)
>
>
>
> I'll try to implement this using 
> @RestResource
> @Path(value="openstorage/{version}/{prefix}/{user}/{collection}/{resource}", 
> limited=false)
> public class WeaveBasicObjectResource {
>        
>       public WeaveBasicObjectResource(                        
> @PathParam("resource") String resource,                 
> @PathParam("collection") String collection,                     
> @PathParam("user") String user,         @PathParam("prefix") String prefix,   
>   @PathParam("version") String version
>                       ) {
>               System.err.println("WBO for resource " + resource + ", 
> collection " + collection + ", user " + user +
>                               ", prefix " + prefix + ", version " + version); 
>         
>       }       
>
> .....
>
>
> but it constantly add / symbol to anything except resourc, means it reports 
> version="0.1/test" and so on (collection=bookmarks/cars). 
>
> I wish to get in resource the "cars/lexus" only. 
>
> Am i right with uses of limited=false? or how to process this with JAX-RX 
> support.
>
> ------------------------------------------------------
> http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1055349
>

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

Reply via email to