Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipselink-users] [MOXy] post-processing after unmarshalling

Hi Matt,

This looks great!  I just need a few more clarifications:

1.  In DescriptorEvent, do I use getObject() or getOriginalObject() to get
the object with the unmarshalled data?

2.  It looks like it's possible to use this in the project.xml file using
the <events xsi:type="event-policy"/>  element.  Is that right?  I can see
by the schema to put the name of the event listener class in the
"event-listener" element, but should I also set "post-build-method" element?

3.  Just out of curiosity in case I need this later, do you have another
event callback for marshalling?

Thanks!
--Polly


Matt MacIvor wrote:
> 
> Hi Polly,
> 
> You can add a DescriptorEventListener on a given XMLDescriptor's event 
> manager (descriptor.getEventManager().addListener(listener)).
> 
> For moxy, the only event that's invoked on DescriptorEventListeners is 
> the postBuild event, which will be invoked after an object is finished 
> being built. From your email, it sounds like that event callback should 
> do the trick though.
> 
> Hope this helps,
> 
> -Matt
> 
> polly.c.chang wrote:
> 
>>Hi,
>>
>>Is there a way for EclipseLink to call a handler to do post-processing
work
>>after unmarshalling a certain class?  I found some information in the
>>documentation about the XMLUnmarshalListener, but it seems to listen to
>>unmarshal events for everything.  Is there something else that I can
attach
>>to just one class or one XMLDescriptor?
>>
>>Thanks,
>>Polly
>>
>>
>>  
>>
> _______________________________________________
> eclipselink-users mailing list
> eclipselink-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/eclipselink-users
> 
> 

-- 
View this message in context: http://www.nabble.com/-MOXy--post-processing-after-unmarshalling-tp20606821p20609646.html
Sent from the EclipseLink - Users mailing list archive at Nabble.com.



Back to the top