You get the XWiki object from the XWikiContext object usually.
And if you have oldcore in your dependencies already the best to get a
XWikiContext is usually to inject the XWikiContext provider like in:
@Inject
private Provider<XWikiContext> xcontextProvider;
See
http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingComponents#HTheXWi…
for more about XWikiContext in components.
On Mon, Dec 14, 2015 at 10:53 AM, Giordano Ninonà
<giordano.ninona(a)gmail.com> wrote:
Hi users,
I am developing a Java Component that offers APIs through a script service.
Those APIs have to modify space and pages' contents of a wiki, thus I was
wondering on how to do that....I already know that if I want to perform
modifications to a Wiki I must add the "xwiki-platform-oldcore" (in my case
the version 7.3) dependency to my pom.xml but I can't still access the
Classes and methods that I need. Meaning that I can't get the wiki from the
context, and this blocks everything because (if i am not wrong) then I
can't get the DocumentReference and the XWikiDocument that allow me to
perfom modification to the Wiki.
It is something related to the *settings.xml* file in the *.m2* folder?
What I've written in there is the same that i found at this page
http://dev.xwiki.org/xwiki/bin/view/Community/Building# but the
"xwiki-platform-oldcore" doesn't appear nor in the repository folder
neither in the Maven Dependencies....either the dependecy is written in the
pom....
Hope to find some help!
Giordano.
_______________________________________________
users mailing list
users(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/users
--
Thomas Mortagne