[jboss-jira] [JBoss JIRA] (DROOLS-4530) [DMN Designer] Kogito - DMNMarshaller - Improve JsArrayLike-setter-APIs

Guilherme Gomes (Jira) issues at jboss.org
Fri Sep 13 10:02:00 EDT 2019


Guilherme Gomes created DROOLS-4530:
---------------------------------------

             Summary: [DMN Designer] Kogito - DMNMarshaller - Improve JsArrayLike-setter-APIs
                 Key: DROOLS-4530
                 URL: https://issues.jboss.org/browse/DROOLS-4530
             Project: Drools
          Issue Type: Enhancement
          Components: DMN Editor
            Reporter: Guilherme Gomes
            Assignee: Guilherme Gomes
         Attachments: json.png, stack.png

Create new setter APIs:

{code}
JDefinitions {
  
  // Existing read-only API
  List<JSITDRGElement> getDrgElement()

  // New APIs
  void addDRGElement(DRGElement drgElement);
  void addAllDRGElement(DRGElement... drgElements);
  void removeDRGElement(int index)
}
{code}

This API will rely on {{JSUtils.add}}, {{JSUtils.addAll}}, and {{JSUtils.remove}}.

---

*Background*

Currently, the {{DMNMarshaller}} works following this stack:

 !stack.png|width=400! 

However the {{JSITDefinitions}} class (and all other DMN classes related to *Jsonix*) are "artificially" typed JSON objects. This objects define odd list structures, like this: 

 !json.png|width=400! 

Ideally, the list of DRGElements would be a list of the entries in the *value* key, and the entries from the *name* key would be discarded.

This JIRA comprehends to change {{JsArrayLike}}-based APIs to {{java.util.List}} APIs.




--
This message was sent by Atlassian Jira
(v7.13.5#713005)


More information about the jboss-jira mailing list