Details
-
Type:
Sub-task
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: None
-
Fix Version/s: 1.3 rc1
-
Component/s: XML code generator - JDO extensions
-
Labels:None
-
Number of attachments :
Description
Amend JDOClassDescriptorResolver(Impl) to use .castor.cdr files for resolution for packages specified through addPackage().
This patch enables Castor to load JDODescriptors via a Class Descriptor Resolution File (cdr). The name of the file (.castor.jdo.cdr) is defined in the JDOConstants interface (see
CASTOR-2445). A ResoultionNature is added to support the adding of packages to ClassDescriptorResolutionCommand (in this case the ClassResoultionByCDR class).The ClassResolutionByCDR adds a getDescriptors(String packageName) method which is not present in the supertype, so a cast is needed to properly compile this (e.g. ((ClassResolutionByCDR) ClassDescriptorResolutionCommand).getDescriptors(packageName)) which is not too beautiful but it works. Any ideas are most welcomed.
A test case is included. Please note the TODO's before committing this code.