Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 326717 - Containment Mappings for generic JAXB to support validation
Summary: Containment Mappings for generic JAXB to support validation
Status: RESOLVED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: JAXB (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 7
: P3 enhancement (vote)
Target Milestone: 3.0 M5   Edit
Assignee: Karen Butzke CLA
QA Contact:
URL:
Whiteboard: JAXB
Keywords: plan
Depends on:
Blocks:
 
Reported: 2010-09-30 17:06 EDT by Neil Hauge CLA
Modified: 2011-01-28 14:48 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Neil Hauge CLA 2010-09-30 17:06:43 EDT
This enhancement covers context model for the generic JAXB containment mappings, specifically:

XmlAttribute
XmlElement
XmlAdapter


See http://wiki.eclipse.org/EclipseLink/DesignDocs/277920/Phase3 for detailed info and examples for these annotations.

Context model should include standard state and behavior required for validation purposes.
Comment 1 Karen Butzke CLA 2011-01-18 16:22:02 EST
I added validation for XmlJavaTypeAdapter on a package and on an attribute.

1.If you specify an @XmlJavaTypeAdapter on a package and don't specify the type element, you get this validation message:
'The type must be specified for an XML Java type adapter on a package'

2.If you specify an @XmlJavaTypeAdapter on an attribute with a non-generic List or Collection and don't specify the type element, you get this validation message:
'The type for XML Java type adapter is not defined'
Here are 2 examples:

@XmlAttribute
@XmlJavaTypeAdapter(value=MyAdapter.class)
public List foo;

@XmlAttribute
@XmlJavaTypeAdapter(value=MyAdapter.class)
public List getFoo() {
    return this.foo;
}
Comment 2 Karen Butzke CLA 2011-01-28 14:48:04 EST
This bug has been completed for 3.0M5. Remaining issues are logged for validation (bug 335731, bug 333484), icons (bug 333664), XmlElement default mapping (bug 335697)