Hello,
I am new to RESTLet and using 2.0.9. What I want to do is have multiple
methods with @Get & @POST annotation. I have access to the VO classes
(value objects) and so I don't need to use JSON or XML representation. I
have used the excellent tutorial available at
http://wiki.restlet.org/docs_2.0/13-restlet/21-restlet/318-restlet/303-restlet.html#dsy303-restlet_jse.
I have designed the following classes:
User - VO POJO with attributes for an User.
UserResource inteface:
/public interface UserResource {
@Get
public User userLogin();
}
/
For single @Get annotation, the client code works fine.
/ ClientResource cr = new ClientResource(url);
// Get the Contact object
UserResource resource = cr.wrap(UserResource.class);
User user = resource.userLogin();/
Now, I want to use multiple methods with @Get annotation. For e.g., have
two/three flavors of getUser objects similar to what we have in normal DAO
layer in single JVM.
/User getUser(int userId)
User getUser(String domain, String username)
boolean isUserNew(int userid)
/
and similar multiple methods to update and add users [@POST annotation]:
/int addUser(User user)
int updateUser(int userId, User user)/
*Is it possible to achieve some thing like this ? If not what are the
alternative ? Where can I get documentation for Annotations @Get, @Post ?
*
Thanks in advance for help.
Deep
--
View this message in context:
http://restlet-discuss.1400322.n2.nabble.com/RESTLet-2-0-9-Multiple-Get-and-Post-Annotations-or-other-alternatives-tp6843005p6843005.html
Sent from the Restlet Discuss mailing list archive at Nabble.com.
------------------------------------------------------
http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=2847569