« Cairngorm 2 Security | Main | FDS Plugin for Eclipse Web Tools Platform »
June 30, 2006
Cairngorm 2 + XDoclet2
With the release of Cairngorm on Adobe Labs the package name has changed from org.nevis.cairngorm to com.adobe.cairngorm. I have updated the AS3 plugin for XDoclet2 to reflect the new package name so all generated VOs will now implement com.adobe.cairngorm.vo.ValueObject. You can also download the source from here.
For more information on XDoclet2 please see my earlier blogs:
Posted by at June 30, 2006 2:41 PM
Comments
First, I would like to thank you and Joe Berkovich for providing this plugin. For those developers who have a lot of DTOs that need to be mapped to AS classes, this tool is a real boon.
One thing that I have noticed is that it does not seem to map several java classes properly. For example these classes are mapped as follows,
java.util.Date -> java.util.Date
java.util.Timestamp -> java.util.Timestamp
java.util.Set -> java.util.Set
Perhaps there are annotations that I am supposed to provide to facilitate the proper mapping but I saw no reference to them.
I have all the latest jars as per your other blog articles. Is this an issue or do I have some misconception about how this is supposed to work?
Thanks
Posted by: Mike Robinson at July 15, 2006 12:12 AM
Thanks Mike.
I have refreshed the plugin. It now supports java.util.Set and the different java.sql types.
Posted by: Peter Martin at August 3, 2006 10:09 AM
Hi Peter,
I've tried to use your plugin and I must say I really like the idea of having such a tool, however I found some issues/limitations:
1. There are no mappings for BigDecimal and BigInteger
2. Types of array members are not imported and are not referenced so they are not deserialized to the proper type but they are just ActionScript Objects.
3. The plugin seems to be unable to generate values of static members which are not Strings, Numbers or primitives. It's a quite advanced feature but very likely in a real project i.e. when a class has an enumeration consisted of its own instances.
A potential solution would be to declare statics in the following manner:
public static const MY_CONST: MyObjectA = new MyObjectA(new ClassA(...),new ClassB(...), 5, ...., true);
All generated constructors would look like this:
public ObjectA(fieldA: ClassA =null, fieldB: ClassB=null, fieldC: int =0....fieldZ:Boolean=false){
this.fieldA = fieldA;
...
.................................
...
this.fieldZ = fieldZ;
}
Having nullable parameters should allow the serialization mechanism to invoke the constructor without any parameters as, I think it does normally.
I am not sure if it can be easily achieved using templates but I was using this kind of solution (implemented as a simple Java class) for JavaScritpt. Just an idea...
Thanks,
Bartek
Posted by: Bartosz Doszczak at December 7, 2006 3:28 PM
Thanks Mike. I have refreshed the plugin. It now supports java.util.Set and the different java.sql types.
Posted by: gazeteler at February 11, 2007 11:13 AM
The source dist is missing 3 files that are in the jar.
org.xdoclet.plugin.actionscript.qtags.ActionscriptClassTagImpl;
org.xdoclet.plugin.actionscript.qtags.ActionscriptPropertyTagImpl;
org.xdoclet.plugin.actionscript.qtags.TagLibrary;
Can you post a new copy of the source?
Posted by: Ted Bergeron at May 1, 2007 2:43 AM
confirmed Source Distros are Missing
org.xdoclet.plugin.actionscript.qtags.ActionScriptClassTagImpl
is there svn access?
Posted by: Martin Gainty at October 2, 2007 10:42 PM
