[
http://jira.jboss.com/jira/browse/GPD-111?page=comments#action_12369857 ]
Matthew Sandoz commented on GPD-111:
------------------------------------
I just signed the agreement!
Add ability to forward and reverse map Semantic Elements to/from Dom
Node/Xml Adapters jpdl
-------------------------------------------------------------------------------------------
Key: GPD-111
URL:
http://jira.jboss.com/jira/browse/GPD-111
Project: JBoss jBPM GPD
Issue Type: Feature Request
Components: jpdl
Environment: all? :)
Reporter: Matthew Sandoz
Assigned To: Koen Aers
Fix For: jBPM JPDL Designer 3.1.0.beta2
Attachments: solution.zip
Addresses need to add new semantic elements without adding new xml types. Current mapping
forces 1-1 mapping between them.
this change allows one-to-many mapping between elements by introducing a mapping object
for each semantic element.
this mapping object's responsibility is to determine if a chunk of xml should map to
a semantic element and xml adapter or not.
the xml adapter registry holds a set of these mappers and loops through them all, giving
each a chance to accept the xml chunk. all accepting
mappers are then sorted by priority and the lowest priority number is selected. mappings
with no priority are given Integer.MAX priority. Mappings with
no mapperClass are given a default mapper class of ConfiguredSemanticElementDomMapper so
that existing plugin.xml should continue to function
normally.
The priority property allows the maintainer of the plugin.xml to change priorities for
different circumstances, giving different potentially conflicting mappers
a specific preference order.
Details of change:
Added two elements to xmlMappings.exsd: mapperClass and mapperClassPriority
Created interface SemanticElementDomMapper to determine if a given Dom Node can be
assigned to a semantic element
Created class ConfiguredSemanticElementDomMapper as a base implementation of the
SemanticElementDomMapper. This
default implementation checks the current configured xml node name against the node name
of the passed Dom Node. This should
duplicate the existing functionality for existing standard jpdl xml node types.
JythonNodeDomMapper is included as an example but should not be committed to the project
as it is for specialized use.
XmlAdapterRegistry constructs a HashMap of Mappers and has a new
getConfigurationElementByNode method.
XmlAdapter has 2 lines modified in the createSemanticElementFor method to use the new
registry method.
XmlAdapterFactory has modifications in createAdapter and createAdapterFromModel
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira