Skip to main content

Notice: This Wiki is now read only and edits are no longer possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.

Jump to: navigation, search

Talk:Lyo/AdaptorCodeGeneratorWorkshop

Revision as of 18:04, 12 January 2016 by Unnamed Poltroon (Talk)

  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.

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.

Back to the top