Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- @Path("/event/{eventId: [0-9]+}")
- public class EventAPI
- {
- protected EventDescriptor dummyEvent = new EventDescriptor();
- @GET
- @Produces({"application/json", "text/xml"})
- public EventDescriptor getEvent(@PathParam("eventId") Integer eventId)
- {
- return this.dummyEvent;
- }
- }
- public class EventDescriptor
- {
- protected Stuff stuffs = new Stuff();
- {
- // populate with participants
- }
- @GET
- @Produces({"application/json", "text/xml"})
- @Path("/{participantId}")
- public Stuff getStuffForParticipant(@PathParam("participantId") String participantId)
- {
- return this.stuffs.get(participantId);
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement