Hi Team,

I am able to create the virtual xwiki through WikiManagerPluginApi. Now
restful web service is working fine.

Thanks for the help.

Regards
Karamjit.

On Tue, Aug 2, 2011 at 12:21 AM, Karamjit Singh <[email protected]>wrote:

> Does anyone WikiManagerPluginApi to create virtual xwiki? I am developing
>  restful web serivce to create virtual xwiki.
>
> I am getting "You don't have create wiki rights" while creating it
> through WikiManagerPluginApi.  I am not sure how to admin user in
> Xwikicontext with create rights?
>
> Can someone from xwiki team help on this?
>
> Thanks
> Karamjit.
>
> On Mon, Aug 1, 2011 at 12:45 PM, Karamjit Singh <[email protected]>wrote:
>
>> Please help me. I need to fix this .
>>  On Aug 1, 2011 7:58 AM, "Karamjit Singh" <[email protected]> wrote:
>> > HI Team,
>> >
>> > Please help as I am not able to create xwiki through
>> WikiManagerPluginApi
>> > and still getting " You don't have create wiki rights"
>> >
>> > Not sure how to set admin user in context.
>> >
>> > Thanks
>> > karamjit.
>> >
>> > On Sun, Jul 31, 2011 at 8:57 PM, Karamjit Singh <[email protected]
>> >wrote:
>> >
>> >> Hi Eduard,
>> >>
>> >> I am already setting user in context usign below code -
>> >> ctx.setUser("XWiki.Admin");
>> >>
>> >> Please correct if any issue in this code.
>> >>
>> >> Thanks
>> >> Karamjit.
>> >>
>> >>
>> >> On Sun, Jul 31, 2011 at 8:48 PM, Eduard Moraru <[email protected]
>> >wrote:
>> >>
>> >>> Hi Karamjit,
>> >>>
>> >>> WikiManager plugin requires admin rights for handling subwikis.
>> >>>
>> >>> See http://jira.xwiki.org/jira/browse/XEM-113 for details and a
>> >>> workaround.
>> >>>
>> >>> Thanks,
>> >>> Eduard
>> >>>
>> >>> On Jul 31, 2011 5:08 PM, "Karamjit Singh" <[email protected]>
>> wrote:
>> >>> >
>> >>> > Yes. I have installed it already. I am getting bellow error message
>> >>> > " you donot have create wiki rights"
>> >>> >
>> >>> > Looks like a permission issue. Any idea how to set user in
>> wikicontext?
>> >>> > On Jul 31, 2011 7:23 PM, "Eduard Moraru" <[email protected]>
>> wrote:
>> >>> > > Hi Karamjit,
>> >>> > >
>> >>> > > On Sun, Jul 31, 2011 at 2:13 PM, Karamjit Singh <
>> >>> [email protected]
>> >>> > >wrote:
>> >>> > >
>> >>> > >> Hi Team,
>> >>> > >>
>> >>> > >> I am not able to create virtual xwiki through the
>> >>> XwikiManagerPluginAPI.
>> >>> > I
>> >>> > >> have developed just sample restful web service. Below is the code
>> >>> which
>> >>> I
>> >>> > >> am
>> >>> > >> using to create virtual xwiki :-
>> >>> > >>
>> >>> > >> @Component("org.sisgma.xwiki.rest.HelloWorldResource")
>> >>> > >> @Path("/hello/")
>> >>> > >> public class HelloWorldResource extends XWikiResource {
>> >>> > >> public HelloWorldResource(){
>> >>> > >> }
>> >>> > >> @GET
>> >>> > >> public String get(@DefaultValue("world") String myresourcename)
>> >>> throws
>> >>> > >> XWikiException, QueryException {
>> >>> > >> XWikiContext ctx = Utils.getXWikiContext(componentManager);
>> >>> > >> try {
>> >>> > >> WikiManagerPluginApi aoi =
>> >>> > >>
>> >>> > >>
>> >>> >
>> >>>
>> >>>
>> (WikiManagerPluginApi)ctx.getWiki().getPluginApi(WikiManagerPlugin.PLUGIN_NAME,
>> >>> > >> ctx);
>> >>> > >> ctx.setDoc(new XWikiDocument(new DocumentReference("jaspreet",
>> >>> "space",
>> >>> > >> "page")));
>> >>> > >> System.out.println("_____________********* deleting xwiki");
>> >>> > >> aoi.deleteWiki("neenu", true);
>> >>> > >> aoi.deleteWiki("neenu1", true);
>> >>> > >> aoi.deleteWiki("karam", true);
>> >>> > >> System.out.println("_____________********* deleted xwikies");
>> >>> > >> System.out.println("_____________********* Creating new xwiki");
>> >>> > >> aoi.createNewWiki("jaspreet", "templatexe",
>> >>> > null,aoi.createWikiDocument(),
>> >>> > >> true);
>> >>> > >>
>> >>> > >
>> >>> > > Did you install the default template "templatexe"?
>> >>> > >
>> >>> > >
>> >>> > >> } catch (XWikiException e) {
>> >>> > >> e.printStackTrace();
>> >>> > >> }
>> >>> > >> System.out.println("_____________********* " +ctx);
>> >>> > >> System.out.println("_____________"+ctx);
>> >>> > >> return "Hello " + myresourcename;
>> >>> > >> }
>> >>> > >> }
>> >>> > >>
>> >>> > >> Above code is not working. Virtual xwiki is not being created
>> using
>> >>> the
>> >>> > >> API.
>> >>> > >>
>> >>> > >
>> >>> > > You should share the stack trace of the exception that is thrown.
>> >>> > >
>> >>> > > Thanks,
>> >>> > > Eduard
>> >>> > >
>> >>> > >
>> >>> > >> It is very urgent. Please help.
>> >>> > >>
>> >>> > >> Thanks
>> >>> > >> Karamjit.
>> >>> > >> _______________________________________________
>> >>> > >> devs mailing list
>> >>> > >> [email protected]
>> >>> > >> http://lists.xwiki.org/mailman/listinfo/devs
>> >>> > >>
>> >>> > > _______________________________________________
>> >>> > > devs mailing list
>> >>> > > [email protected]
>> >>> > > http://lists.xwiki.org/mailman/listinfo/devs
>> >>> > _______________________________________________
>> >>> > devs mailing list
>> >>> > [email protected]
>> >>> > http://lists.xwiki.org/mailman/listinfo/devs
>> >>> _______________________________________________
>> >>> devs mailing list
>> >>> [email protected]
>> >>> http://lists.xwiki.org/mailman/listinfo/devs
>> >>>
>> >>
>> >>
>>
>
>
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to