[ https://issues.jboss.org/browse/SHRINKDESC-151?page=com.atlassian.jira.pl... ]
George Gastaldi edited comment on SHRINKDESC-151 at 2/26/14 5:06 AM:
---------------------------------------------------------------------
I'd go even further and remove the "Common" suffix from the generated classes (eg: ValidationDescriptor in org.jboss.shrinkwrap.descriptors.api.validation is the parent interface for the ValidationDescriptor in validation10 and validation11 subpackages). Makes sense? :)
was (Author: gastaldi):
I'd go even further and remove the "Common" suffix from the generated classes (eg: ValidationDescriptor in org.jboss.shrinkwrap.descriptors.javaee.validation is the parent interface for the ValidationDescriptor in validation10 and validation11 subpackages). Makes sense? :)
> 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
[ https://issues.jboss.org/browse/SHRINKDESC-151?page=com.atlassian.jira.pl... ]
Lincoln Baxter III commented on SHRINKDESC-151:
-----------------------------------------------
Hey Guys,
Just weighing in here. I think I tend to lean toward George's perspective here:
{code}
org.jboss.shrinkwrap.descriptor.api.persistence // persistence common interfaces/classes live here
org.jboss.shrinkwrap.descriptor.api.persistence20
org.jboss.shrinkwrap.descriptor.api.persistence21
org.jboss.shrinkwrap.descriptor.api.beans // cdi common goes here
org.jboss.shrinkwrap.descriptor.api.beans10
org.jboss.shrinkwrap.descriptor.api.beans11
org.jboss.shrinkwrap.descriptor.api.ejb // ejb common goes here
org.jboss.shrinkwrap.descriptor.api.ejb20
org.jboss.shrinkwrap.descriptor.api.ejb25
{code}
The above is intuitive because it keeps each spec/descriptor contained in its own base package, as opposed to blending them all into:
{code}
org.jboss.shrinkwrap.descriptor.api.common // every parent goes here seems a bit cluttered
org.jboss.shrinkwrap.descriptor.api.persistence20
org.jboss.shrinkwrap.descriptor.api.persistence21
org.jboss.shrinkwrap.descriptor.api.beans10
org.jboss.shrinkwrap.descriptor.api.beans11
org.jboss.shrinkwrap.descriptor.api.ejb20
org.jboss.shrinkwrap.descriptor.api.ejb25
{code}
I understand it's just a preference, but I would lean toward the former, rather than the latter approach. Up to you in the end :)
> 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
[ https://issues.jboss.org/browse/SHRINKDESC-151?page=com.atlassian.jira.pl... ]
Ralf Battenfeld commented on SHRINKDESC-151:
--------------------------------------------
Hi George, can you give me a code snippet that explains your problem. I simply cannot see what your package structure will help except a hell of work in the generator. May there are some javadoc infos I could generate and with eclipse you will see it but again, I am lost in what you wish... Does eclipse not help you for such things? parent classes, direct implementation class etc?
> 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
[ https://issues.jboss.org/browse/SHRINKDESC-151?page=com.atlassian.jira.pl... ]
Ralf Battenfeld edited comment on SHRINKDESC-151 at 2/25/14 4:55 PM:
---------------------------------------------------------------------
Hi George, can you give me a code snippet that explains your problem? I simply cannot see what your package structure will help except a hell of work in the generator. May there are some javadoc infos I could generate and with eclipse you will see it but again, I am lost in what you wish... Does eclipse not help you for such things? parent classes, direct implementation class etc?
was (Author: rbattenfeld):
Hi George, can you give me a code snippet that explains your problem. I simply cannot see what your package structure will help except a hell of work in the generator. May there are some javadoc infos I could generate and with eclipse you will see it but again, I am lost in what you wish... Does eclipse not help you for such things? parent classes, direct implementation class etc?
> 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
[ https://issues.jboss.org/browse/SHRINKDESC-151?page=com.atlassian.jira.pl... ]
Ralf Battenfeld commented on SHRINKDESC-151:
--------------------------------------------
There is a commonAPI element indeed. But I prefer to have one common folder for all these classes. It will be a very difficult to generated all these common classes.
I remember we discussed this already, right? As long as there is no hard requirement for spreading common classes into tons of different folders, I would like to stay with this solution. Its much clearer to understand and easier to process.
> 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