If you don't mind depending on the old core then you can access it
from a component as indicated on
http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents#HAccessingLegacycode
. Once you have the XWikiContext object (from the ExecutionContext)
then you have access to all the old core APIs.

Hope this helps,
Marius

On Fri, Jan 20, 2012 at 6:03 PM, jerem <[email protected]> wrote:
> Hello,
>
> I'm trying to convert a groovy class (in a wiki page) to a proper xwiki
> component in Java.
>
> Problem is : my groovy code makes heavy use of the document model, for
> example :
> - setting documents creator/author, dates, with and without triggering
> change events (modifying also internal xwikidocument)
> - accessing multiple objects of same class created in a unique page
> - ...
>
> I could not find anything to do that in the DocumentAccessBridge ...
>
> My question is, would it be better for me to wait for the xwiki model to be
> properly externalized from the old core (so I could target this from my
> component), or expect missing methods to be added to the bridge, ... or add
> them by myself ?
> Obviously, the last option seems both too heavy and too "risky" for me.
> Obviously too, rewriting my (big) groovy class for using the bridge api
> seems cumbersome : I'd prefer to wait for a dedicated component for
> accessing the core model.
>
> Best regards,
> Jeremie
>
> --
> View this message in context: 
> http://xwiki.475771.n2.nabble.com/Components-Bridge-to-old-core-and-objects-tp7208056p7208056.html
> Sent from the XWiki- Users mailing list archive at Nabble.com.
> _______________________________________________
> users mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/users
_______________________________________________
users mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/users

Reply via email to