Project

General

Profile

task #3485

object graph returned by REST services can be specified by initstrategy

Added by Andreas Kohlbecker almost 8 years ago. Updated 3 months ago.

Status:
New
Priority:
New
Category:
cdmlib-remote
Target version:
-
Start date:
05/21/2013
Due date:
% Done:

0%

Severity:
normal

Description

The extend of the object graph retured by REST services is defined by three mechanisms:

  1. The CardinalityPropertyFilter

  2. Bean initialization strategies defined in the web service controllers

  3. The AutoPropertyInitializer

see CdmRestServicesEntitySerialization and CdmEntityInitalization for more on this.

The two main REST service sections: generic REST API, Portal REST API are configured differently weheras the generic api id returning rather atomized entities and the portal service returns rather big object graphs.

Both service section could be merged into one if it would be possible to request for a specific object graph by supplying a initStrategy to the REST service. This would not only simplify the REST service layer but would also mean to improve the performance of client applications as the data portal since it would be possible to request exactly for the data which is needed.

Basically two things must be implemented for this:

  1. All REST controllers must generally allow to specify the object bounds in form of an initStrategy / property path as request parameter: e.g.: bounds=media,authors.titleCache the properties defined in this parameter must be initialized and also those defined in the AutoPropertyInitializer

What is a good name for this parameter? properties, bounds, ... ???

  1. The serialization must also respect this request parameter and thus must only serialize the

properties defined in the initStrategy of in the {{AutoPropertyInitializer}}}s. It seems as if the BeanInitializer is the best place to implement this. The BeanInitializer therefore set all unwanted properties to NULL. Null properties are not initialized.

History

#1 Updated by Andreas Kohlbecker almost 8 years ago

  • Subject changed from object graph retured by REST services and be specified by initstrategy to object graph retured by REST services can be specified by initstrategy

#2 Updated by Andreas Müller 3 months ago

  • Subject changed from object graph retured by REST services can be specified by initstrategy to object graph returned by REST services can be specified by initstrategy
  • Description updated (diff)
  • Private changed from Yes to No

target version is missing! Is this still an open issue?

Also available in: Atom PDF

Add picture from clipboard (Maximum size: 40 MB)