More than one way to skin a cat here but you could do it with one
PatientResource like this...

POST /patients
DELETE /patient/{patientId}
GET /patient/{patientId}
PUT /patient/{patientId}

@Post
public Representation createPatient(Representation patient)

@Delete
public void deletePatient(String patientId)

@Get

public Representation retrievePatient(String patientId)

@Put
public void updatePatient(Representation patient)

...or you could break the POST operation out into another class like
PatientFactoryResource or something.



-- 
Paul Morris, Software Developer
Northwestern Memorial Physicians Group <http://www.nmpg.com>
773.469.4330 | 312.926.6674 | [email protected]





On 4/24/12 3:37 PM, "Dalia Sobhy" <[email protected]> wrote:

>If I have a patient resource class which contains 4 methods:
>1. AddPatient (Patient p)
>2. DeletePatient (String ID)
>3. RetrievePatient(String ID)
>4.UpdatePatientAddress(String ID, String Address)
>
>Can I implement them in one resource class, if so how could I perform the
>server-side routing??
>
>Thanks in advance, you are saving me....
>
>--
>View this message in context:
>http://restlet-discuss.1400322.n2.nabble.com/Restlet-Resources-tp7497363p7
>497363.html
>Sent from the Restlet Discuss mailing list archive at Nabble.com.
>
>------------------------------------------------------
>http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=295
>1527

This message and any included attachments are intended only for the addressee. 
The information contained in this message is confidential and may constitute 
proprietary or non-public information under international, federal, or state 
laws. Unauthorized forwarding, printing, copying, distribution, or use of such 
information is strictly prohibited and may be unlawful. If you are not the 
addressee, please promptly delete this message and notify the sender of the 
delivery error by e-mail.

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

Reply via email to