users@jaxb.java.net

Re: generics in XSD ?

From: Felipe Gaúcho <fgaucho_at_gmail.com>
Date: Wed, 2 Apr 2008 17:45:51 +0200

I know.. but a syntatic sugar very tastefull :) eheheh, really .. not
a big deal.. but I can define an operation

class A<T> {
       processAttachment(T mime) { ... } <-------- this will be
supported by 1 helper class for each mime type..
}

the contract becomes more clean.. the traditional OO alternative, I
must create 1 method for each mime type :(

it is just the difference between declare 20 methods or declare just 1
supported by 20 helper classes,.... not a big deal,

but as "contract", I suppose something understandable by business
people, an an specification with 20 lines is less digestible than 1
line saying "here we pass an attachment".. (the dirty details about
mime types should be restricted to the developers...) I can hide the
types from the business scared eyes using an xsd import, but with OO
Iwill need the 20 different operations to do exactly the same
functionality but with mime types different :(

BTW: my under progress example can be found here:
https://cejug-classifieds.dev.java.net/
the WSDL is here:
https://cejug-classifieds.dev.java.net/source/browse/cejug-classifieds/trunk/cejug-classifieds-server/resources/contract/

thanks for your support.. If you have a good idea on how to define
different attachment operations based on its types....... :)