Julien Anguenot wrote:
Bogdan Stefanescu wrote:
I've implemented a document adapter service.
[...]
-----------------------------------------------
DocumentModel doc = .. get a document model ..
...
AnnotatedDocument annoDoc =
doc.getAdapter(org.nuxeo.ecm.annotation.AnnotatedDocument.class);
annoDoc.setAdapter("myannotation", value);
I guess this is a typo and should be :
annoDoc.setAnnotation("myannotation", value);
Indeed it is a typo.
[...]
Alright, just take some time to take a look at this. It rocks. I'm gonna
use this for the workflows to factor out the interface at client level
while refactoring the web client. This is pretty close to the Zope3
adapter service, actually.
Next step will be to have a generic adapter service DocumentModel
independent (as in Zope3) and we could use this base framework as the
underlying framework for the DocumentModel adapter service implementation.
Yes I planned to do this in NXRuntime (or may be now the right place is
NXCommon)
We can easily re-use the eclipse adapting manager for this to avoid to
re-write an adapter manager from scratch.
Bogdan
Thanks :)
J.
_______________________________________________
ECM mailing list
[email protected]
http://lists.nuxeo.com/mailman/listinfo/ecm