• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

How URI get mapped to resources

 
Rupali Patwa
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am unable to understand URI maps to resources. and resources are things or domain objects.Because whenever we write rest ful application most of the URIs get mapped to java methods

Suppose I have class Employee

Since client can not directly access domain objects we expose some service to let clients manipulate object of employee class

i.e I may not write

@Path("/emp")
public class Employee{
}

@Path("/employee")
public class EmplyeeService{
@GET
@Path("/{"id"}
public Emplyee getEmployee(@PathParam("id" int id){
............
}

}

So my most of the URIs get mapped to java methods and very few one to domain objects
Can somebody explain this


thanks
Rupali
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic