Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [lyo-dev] Where to implement the resource's GET/POST/PUT methods?

Hey, Jad. To me, it's a best practice to have one class than the GET/PUT/POST for one resource type, at least that's how I've usually done it. Of course, there's no limitation that forces you to do it that way. Bugzilla has only one "service" because it really only handles one type, change request.

I sometimes get confused talking about it because of overloaded terms. What we've called a service in the Lyo reference implementations I believe is called a resource in JAX-RS terminology.
--
Samuel Padgett | IBM Rational | spadgett@xxxxxxxxxx
Eclipse Lyo: Enabling tool integration with OSLC


Inactive hide details for Jad El-Khoury ---03/04/2014 04:56:20 PM---Hi, I am wondering where to best implement a given resourceJad El-Khoury ---03/04/2014 04:56:20 PM---Hi, I am wondering where to best implement a given resource's GET/POST/PUT methods.


    From:

Jad El-Khoury <jad@xxxxxx>

    To:

"lyo-dev@eclipse. org (lyo-dev@xxxxxxxxxxx)" <lyo-dev@xxxxxxxxxxx>

    Date:

03/04/2014 04:56 PM

    Subject:

[lyo-dev] Where to implement the resource's GET/POST/PUT methods?

    Sent by:

lyo-dev-bounces@xxxxxxxxxxx




Hi,
 
I am wondering where to best implement a given resource's GET/POST/PUT methods.
 
Using the OSLCWorkshop as a reference (Bugzilla adaptor implementation), the GET/POST/PUT methods for the BugzillaChangeRequest resource were implemented in the class BugzillaChangeRequestService. My understanding here is that this class (annotated @OslcService) is the implementation of an OSLC Service as illustrated in http://open-services.net/bin/view/Main/OslcCoreSpecification?sortcol=table;up=#Overview.
 
Now, this made sense since this service is the only service dealing with  BugzillaChangeRequest resources. And, this services does not handle any other resource type.
 
In a general case where a resource type is managed by more than one service, I wonder where to best place that resource's methods.  Or is it safe to assume that a resource type should be handled within a single service?
 
Regards,
----
Jad El-khoury, PhD
Mechatronics Lab, Department of Machine Design
Royal Institute of Technology (KTH)
S-100 44 Stockholm, Sweden
e-mail: jad@xxxxxx
Phone: +46(0)8 790 6877
Mobile: +46(0)70 773 93 45
 _______________________________________________
lyo-dev mailing list
lyo-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/lyo-dev


GIF image

GIF image


Back to the top