Skip to main content

Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Difference between revisions of "Talk:Lyo/AdaptorCodeGeneratorWorkshop"

(Jad 2016-01-12)
 
Line 28: Line 28:
  
 
Also, a good idea about a sample MyAdapter.adaptorinstance that one can simply download. I will provide one soon. If you have one available, please feel free to share.
 
Also, a good idea about a sample MyAdapter.adaptorinstance that one can simply download. I will provide one soon. If you have one available, please feel free to share.
 +
 +
= Jad 2016-01-14 =
 +
 +
The instructions are now complemented with a working sample project, which includes a minimal adaptor model.

Latest revision as of 09:35, 14 January 2016

  1. Activate Project Facet JAX-RS
    1. Right click the project & Select properties
    2. Select the Project Facets window
    3. Select JAX-RS (REST Web Services)
    4. Click OK to commit the changes.
    5. Right click again on the project & Select properties
    6. select the new JAX-RS sub-window under Project Facets
    7. Set Type: to Disable Library Configuration
    8. Enter JAX-RS servlet class name: org.apache.wink.server.internal.servlet.RestServlet
    9. Under URL mapping patterns:
      1. Remove the existing pattern
      2. Add a new pattern /services/*
    10. Click OK to commit the changes.

Note that Steps 8..9 are no longer available in the Eclipse Mars 4.5 Java EE dialog for the JAX-RS facet. The web.xml file can, of course, be manually edited to make the indicated changes.

  1. Right-click on the Specification(5) instance and select New Child --> DomainSpecification(7)
    1. For the newly created DomainSpecification instance, fill-in its properties. (Note that the namespacePrefix property refers to an instance of NamespacePrefix(6))
  2. Define Resource(9) and/or ResourceProperty(8) instances as desired.
    1. Note that a Resource instance can refer to ResourceProperties from any other domainSpecification in the model.

Here, a complete MyAdapter.adaptorinstance file for which the Acceleo code generator will generate compilable code would be very useful. As it is, even for an experienced OSLC interface developer, the process of manually adding the necessary adaptorModel elements and property values to get to a compilable code base from an adaptorinstance is time-consuming and rife with opportunities for failures.

Jad 2016-01-12

(I am not sure how this "Talk" page works, so adding a new section to reply)

Concerning the project configuration for Eclipse Mars, I added a note to clarify.

Also, a good idea about a sample MyAdapter.adaptorinstance that one can simply download. I will provide one soon. If you have one available, please feel free to share.

Jad 2016-01-14

The instructions are now complemented with a working sample project, which includes a minimal adaptor model.

Back to the top