Ticket #1067 (closed Enhancement: fixed)

Opened 8 years ago

Last modified 8 years ago

Core: add pre-create-type events

Reported by: jri Owned by: jri
Priority: Major Milestone: Release 4.8.6
Component: DeepaMehta Standard Distribution Version: 4.8.5
Keywords: Cc: dgf, Malte, JuergeN
Complexity: 3 Area: Application Framework / API
Module: deepamehta-core

Description (last modified by jri) (diff)

Needed for #1060.

Background: since DM 4.8.4 when creating a type the core passes a sole TopicModel to the preCreateTopic() listener (instead a TypeModel). This is a consequence of 4.8.4's "Non-shared type extensions" feature (#1021). So, in the preCreateTopic() listener a plugin can't no longer cast the passed topic model into TypeModel in case it want operate on the type-specific parts. The solution is to introduce preCreateTopicType() and preCreateAssociationType() listeners which receive explicit topic/assoc type models.

Change History

comment:1 Changed 8 years ago by jri

  • Status changed from new to accepted

comment:2 Changed 8 years ago by jri

  • Description modified (diff)

comment:3 Changed 8 years ago by jri

In https://github.com/jri/deepamehta/commit/43b8ccd1898f2189a2456451af7ddc38edbaa68b

Core API: add pre-create-type events (#1067).

2 new event listeners:

import de.deepamehta.core.service.event.PreCreateTopicTypeListener;
import de.deepamehta.core.service.event.PreCreateAssociationTypeListener;

void preCreateTopicType(TopicTypeModel model)

void preCreateAssociationType(AssociationTypeModel model)

See #1067.

comment:4 Changed 8 years ago by jri

  • Status changed from accepted to closed
  • Resolution set to fixed
Note: See TracTickets for help on using tickets.