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

Difference between revisions of "EclipseLink/Development/2.4.0/ResourceModel"

(Requirements)
(Requirements)
Line 6: Line 6:
  
 
# Specify the resource scope of an object that will be marshalled or unmarshalled with a JAX-RS method call
 
# Specify the resource scope of an object that will be marshalled or unmarshalled with a JAX-RS method call
** JPA Models with MOXy mappings
+
#* JPA Models with MOXy mappings
** Just MOXy mapped models
+
#* MOXy mapped models
 
# All relationships not included in the resource should return a link URI to retrieve the referenced resource
 
# All relationships not included in the resource should return a link URI to retrieve the referenced resource
 
# (Advanced) Using header properties allow alternate resource model definitions to be returned and consumed.
 
# (Advanced) Using header properties allow alternate resource model definitions to be returned and consumed.

Revision as of 13:44, 2 February 2012

EclipseLink Resource Model

The EclipseLink Resource Model defines the structure of objects marshalled and unmarshalled with XML or JSON when used in a JAX-RS service. By default the JAXB marshaller will return the entire accessible graph of what is returned from the JAX-RS method call. While this approach is functional it is very naive and may not provide a proper resource model required by REST.

Requirements

  1. Specify the resource scope of an object that will be marshalled or unmarshalled with a JAX-RS method call
    • JPA Models with MOXy mappings
    • MOXy mapped models
  2. All relationships not included in the resource should return a link URI to retrieve the referenced resource
  3. (Advanced) Using header properties allow alternate resource model definitions to be returned and consumed.

Back to the top