Ticket #265 (accepted Defect)

Opened 8 years ago

Last modified 7 years ago

Core: associations are fetched without their composite structure

Reported by: jri Owned by: jri
Priority: Major Milestone:
Component: DeepaMehta Standard Distribution Version: 4.0.11
Keywords: Cc: dgf
Complexity: 3 Area: Application Framework / API
Module: deepamehta-core

Description

The core association API is not on a par with the topic API.
The getAssociation...() methods lacking a "fetchComposite" parameter.

This should be implemented analogous to the topic methods:

  • for methods returning a single association fetchComposite is *true* by default.
  • for methods returning an association collection fetchComposite is *false* by default.

The webclient's RESTClient should be extended correspondingly.

Change History

comment:1 Changed 8 years ago by jri

  • Status changed from new to accepted

comment:2 Changed 8 years ago by Jörg Richter

Core: fetch associations with composite (#265).

"fetchComposite" (and "clientState") parameters are added to 2 core service methods:

Association getAssociation(long assocId, boolean fetchComposite, ClientState? clientState);
Association getAssociation(String assocTypeUri, long topic1Id, long topic2Id,

String roleTypeUri1, String roleTypeUri2,
boolean fetchComposite, ClientState? clientState);

The REST client is adapted accordingly:

dm4c.restc.get_association_by_id(assoc_id, fetch_composite)
dm4c.restc.get_association(assoc_type_uri, topic1_id, topic2_id, role_type1_uri, role_type2_uri, fetch_composite)

In both cases the "fetch_composite" parameter is optional. By default it is true.

Note: the former "get_association" function is renamed to "get_association_by_id" and "get_association" is a new function.

IMPORTANT: developers must adapt their plugins. "dm4c.restc.get_association" calls must be renamed to "dm4c.restc.get_association_by_id". Also note that the association's composite is now fetched by default (before it was not).

Pending: add the fetchComposite parameter to the getAssociations() -- plural -- methods as well.

See ticket 265.

comment:3 Changed 8 years ago by Jörg Richter

Core: fetch associations with composite (#265).

"fetchComposite" (and "clientState") parameters are added to 2 core service methods:

Association getAssociation(long assocId, boolean fetchComposite, ClientState? clientState);
Association getAssociation(String assocTypeUri, long topic1Id, long topic2Id,

String roleTypeUri1, String roleTypeUri2,
boolean fetchComposite, ClientState? clientState);

The REST client is adapted accordingly:

dm4c.restc.get_association_by_id(assoc_id, fetch_composite)
dm4c.restc.get_association(assoc_type_uri, topic1_id, topic2_id, role_type1_uri, role_type2_uri, fetch_composite)

In both cases the "fetch_composite" parameter is optional. By default it is true.

Note: the former "get_association" function is renamed to "get_association_by_id" and "get_association" is a new function.

IMPORTANT: developers must adapt their plugins. "dm4c.restc.get_association" calls must be renamed to "dm4c.restc.get_association_by_id". Also note that the association's composite is now fetched by default (before it was not).

Pending: add the fetchComposite parameter to the getAssociations() -- plural -- methods as well.

See ticket 265.

comment:4 Changed 8 years ago by jri

  • Milestone changed from Release 4.1 to Release 4.2

comment:5 Changed 7 years ago by jri

  • Milestone Release 4.2 deleted
Note: See TracTickets for help on using tickets.