[
https://issues.jboss.org/browse/SHRINKDESC-151?page=com.atlassian.jira.pl...
]
Ralf Battenfeld commented on SHRINKDESC-151:
--------------------------------------------
Hi George and Lincoln
I added version and the transactiontype. Of course, it is done in a reusable way, other
common descriptors would benefit as well. The transactionType enum stressed me a little
bit. I tried several things. At the end, I came to the conclusion that the best approach
between all enum type version e.g. transactionType version 1.0, 1.1 and 1.2 are strings.
All generated enums already accept strings as arguments, and returns the value as string
with the method getXXXXAsString(). I think, this is an acceptable way. I hope:-)
Then some thoughts about the missing Properties type. It took me a long time to analyze
your solution of the common web app descriptor. One thing I realized that this common
descriptor makes only few sub types of the webapp descriptor common. SERVLET,
SERVLET_MAPPING and so on. Other subtypes are not defined or part of the common
descriptor.
So my question is what are the criterias for a common descriptor? And more important, do
you need a common type and inside this as well common subtypes? This is the case of the
properties type. It is a sub time of the persistence-unit type.
I will find a way to make this as well possible.
Stay tuned
Ralf
Descriptors should generate a common parent for different spec
versions
-----------------------------------------------------------------------
Key: SHRINKDESC-151
URL:
https://issues.jboss.org/browse/SHRINKDESC-151
Project: ShrinkWrap Descriptors
Issue Type: Feature Request
Components: api-javaee
Reporter: George Gastaldi
Assignee: Ralf Battenfeld
This affects only the JavaEE API. Some usecases manipulate descriptors regardless of the
version it is currently on. The API could be abstracted to a common interface so that
common element types to the supported complex types could be used.
A sample is provided in
https://github.com/forge/javaee-descriptors/. The IMPL remains
untouched (as generated by the ShrinkWrap generator) and common types are refactored to a
super interface:
Super Interface:
https://github.com/forge/javaee-descriptors/blob/master/api/src/main/java...
Sub Interfaces:
https://github.com/forge/javaee-descriptors/blob/master/api/src/main/java...
https://github.com/forge/javaee-descriptors/blob/master/api/src/main/java...
https://github.com/forge/javaee-descriptors/blob/master/api/src/main/java...
The generated code doesn't need to change either. The existence of the super
interface is what matters most.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see:
http://www.atlassian.com/software/jira