Sunday, 15 January 2012

java - REST auto resources creation -


I am trying to find a way to automate automatic resources. I have a lot of RSSE resources, but I already knew how much they were going, like / users / {user id}, act.

Now what I am facing, a user uploads a URL like A / B / C and I need access to A, B, C through RAST.

The user can upload the rest / A / B / C / D / E / F / G / H resource / data / A / B / C / D / E / F / G / H

Or something like this: school / teacher / teacher ID / classes / math / first class and this data / school / teacher / teacher ID / classes / math / first class

this Depends on the user and can not predict how much resources the user creates.

Is there a way around this?

Thanks in advance for your help

Technologies: Java + Jersey (Jacques-RS)

@PyRnja and @DayRay, I managed to work it out. Someone needs to do this, here is the solution to the above example:

  @GET @ path ("/ {pathId:. +}") @products (mediaTip.ipilication_jsn) Public feedback GetPathOfElements (@PathParam ("Path ID" list> PathSegment> pathList) {System.out.println ("I have found"); For (int i = 0; i & lt; pathList.size (); I ++) {System.out.println (pathList.get (i) .getPath ());} Return response.status (Status.OK). Despicable (appId) .build ();}    

No comments:

Post a Comment