Re: [xwiki-users] Looking for these xwiki java API'S or java class containing these functionality?
Hi Recardo, After implementation i successfully created the space *but could not assgin the assign the rights successfully(point 2 in below mail trail)*. Here is the code snippet that created the space and assign the rights to user (MySpaceUser) on this created space. I am trying to give admin rights to user MySpaceUser on space MySpace but when i go space preferences of MySpace, i do not see admin right checkbox as checked. Not sure am i missing something here? *com.xpn.xwiki.api.XWiki xwikiApi= new com.xpn.xwiki.api.XWiki(context.getWiki(),context); Document doc=xwikiApi.getDocument(MySpace.WebHome); doc.setContent(Created the space programmatically); doc.save(); com.xpn.xwiki.api.Object rightsObject=doc.getObject(XWiki.XWikiGlobalRights, true); rightsObject.set(users, XWiki.MySpaceUser); rightsObject.set(levels, admin); rightsObject.set(allow, 1); doc.save(); * On Sat, Apr 7, 2012 at 3:29 AM, ricardo.julio.rodriguez.fernan...@sergas.es wrote: Hi! From: users-boun...@xwiki.org [users-boun...@xwiki.org] On Behalf Of mohit gupta [motgu...@gmail.com] Sent: 06 April 2012 19:42 To: XWiki Users Subject: [xwiki-users] Looking for these xwiki java API'S or java class containing these functionality? The first thing I would like to understand someday is what does API apply to! I mean, has XWiki a single API? Or has it a lot of them? Perhaps it is only a matter of taste, but I do really like to know how to correctly use this concept. Can Method and API be indistinctly used? Hi Folks, I am looking for three xwiki java api's that do the following functionality 1) I give the space name to api and it creates the space with default home page . Perhaps this could be useful: {{velocity}} #set ($mydoc = $xwiki.getDocument(Dummy.WebHome)) $mydoc.setContent(content) $mydoc.save() {{/velocity}} 2)I give userName,SpaceName and rightsName(like view,edit,delete,admin) to api and it gives these rights on given space name for the given username Does this page through any light to your doubt? http://extensions.xwiki.org/xwiki/bin/view/Extension/Setting+Rights 3)I give spaceName to api and it gives me whether the given space exists or not? I don't know how XWiki checks if a space exists when entered in an URL, but perhaps this could help... $xwiki.getSpaceDocsName('YourSpaceHere).size() If size 0 does mean that YourSpace exists! I was looking for three apis in classes ---com.xpn.xwiki.xwiki.java and com.xpn.xwiki.api.xwiki.java but i could not locate these. But i am sure these api's must be existing (as user is able to do these stuff from user interface). I will be grateful if i can be directed to these apis? Thanks in advance. HTH! Ricardo ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users Nota: A informaci?n contida nesta mensaxe e os seus posibles documentos adxuntos ? privada e confidencial e est? dirixida ?nicamente ? seu destinatario/a. Se vostede non ? o/a destinatario/a orixinal desta mensaxe, por favor elim?nea. A distribuci?n ou copia desta mensaxe non est? autorizada. Nota: La informaci?n contenida en este mensaje y sus posibles documentos adjuntos es privada y confidencial y est? dirigida ?nicamente a su destinatario/a. Si usted no es el/la destinatario/a original de este mensaje, por favor elim?nelo. La distribuci?n o copia de este mensaje no est? autorizada. See more languages: http://www.sergas.es/aviso_confidencialidad.htm ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Looking for these xwiki java API'S or java class containing these functionality?
Thanks Ricardo. I really appreciate your precise and quick replies. That should solve my issues. Once i implement, will let you know. *Again i thank you from bottom of my heart. I can not express my gratitude in words. * On Sat, Apr 7, 2012 at 3:29 AM, ricardo.julio.rodriguez.fernan...@sergas.es wrote: Hi! From: users-boun...@xwiki.org [users-boun...@xwiki.org] On Behalf Of mohit gupta [motgu...@gmail.com] Sent: 06 April 2012 19:42 To: XWiki Users Subject: [xwiki-users] Looking for these xwiki java API'S or java class containing these functionality? The first thing I would like to understand someday is what does API apply to! I mean, has XWiki a single API? Or has it a lot of them? Perhaps it is only a matter of taste, but I do really like to know how to correctly use this concept. Can Method and API be indistinctly used? Hi Folks, I am looking for three xwiki java api's that do the following functionality 1) I give the space name to api and it creates the space with default home page . Perhaps this could be useful: {{velocity}} #set ($mydoc = $xwiki.getDocument(Dummy.WebHome)) $mydoc.setContent(content) $mydoc.save() {{/velocity}} 2)I give userName,SpaceName and rightsName(like view,edit,delete,admin) to api and it gives these rights on given space name for the given username Does this page through any light to your doubt? http://extensions.xwiki.org/xwiki/bin/view/Extension/Setting+Rights 3)I give spaceName to api and it gives me whether the given space exists or not? I don't know how XWiki checks if a space exists when entered in an URL, but perhaps this could help... $xwiki.getSpaceDocsName('YourSpaceHere).size() If size 0 does mean that YourSpace exists! I was looking for three apis in classes ---com.xpn.xwiki.xwiki.java and com.xpn.xwiki.api.xwiki.java but i could not locate these. But i am sure these api's must be existing (as user is able to do these stuff from user interface). I will be grateful if i can be directed to these apis? Thanks in advance. HTH! Ricardo ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users Nota: A informaci?n contida nesta mensaxe e os seus posibles documentos adxuntos ? privada e confidencial e est? dirixida ?nicamente ? seu destinatario/a. Se vostede non ? o/a destinatario/a orixinal desta mensaxe, por favor elim?nea. A distribuci?n ou copia desta mensaxe non est? autorizada. Nota: La informaci?n contenida en este mensaje y sus posibles documentos adjuntos es privada y confidencial y est? dirigida ?nicamente a su destinatario/a. Si usted no es el/la destinatario/a original de este mensaje, por favor elim?nelo. La distribuci?n o copia de este mensaje no est? autorizada. See more languages: http://www.sergas.es/aviso_confidencialidad.htm ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Looking for these xwiki java API'S or java class containing these functionality?
Hi Folks, I am looking for three xwiki java api's that do the following functionality 1) I give the space name to api and it creates the space with default home page . 2)I give userName,SpaceName and rightsName(like view,edit,delete,admin) to api and it gives these rights on given space name for the given username 3)I give spaceName to api and it gives me whether the given space exists or not? I was looking for three apis in classes ---com.xpn.xwiki.xwiki.java and com.xpn.xwiki.api.xwiki.java but i could not locate these. But i am sure these api's must be existing (as user is able to do these stuff from user interface). I will be grateful if i can be directed to these apis? Thanks in advance. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Looking for these xwiki java API'S or java class containing these functionality?
Hi! From: users-boun...@xwiki.org [users-boun...@xwiki.org] On Behalf Of mohit gupta [motgu...@gmail.com] Sent: 06 April 2012 19:42 To: XWiki Users Subject: [xwiki-users] Looking for these xwiki java API'S or java class containing these functionality? The first thing I would like to understand someday is what does API apply to! I mean, has XWiki a single API? Or has it a lot of them? Perhaps it is only a matter of taste, but I do really like to know how to correctly use this concept. Can Method and API be indistinctly used? Hi Folks, I am looking for three xwiki java api's that do the following functionality 1) I give the space name to api and it creates the space with default home page . Perhaps this could be useful: {{velocity}} #set ($mydoc = $xwiki.getDocument(Dummy.WebHome)) $mydoc.setContent(content) $mydoc.save() {{/velocity}} 2)I give userName,SpaceName and rightsName(like view,edit,delete,admin) to api and it gives these rights on given space name for the given username Does this page through any light to your doubt? http://extensions.xwiki.org/xwiki/bin/view/Extension/Setting+Rights 3)I give spaceName to api and it gives me whether the given space exists or not? I don't know how XWiki checks if a space exists when entered in an URL, but perhaps this could help... $xwiki.getSpaceDocsName('YourSpaceHere).size() If size 0 does mean that YourSpace exists! I was looking for three apis in classes ---com.xpn.xwiki.xwiki.java and com.xpn.xwiki.api.xwiki.java but i could not locate these. But i am sure these api's must be existing (as user is able to do these stuff from user interface). I will be grateful if i can be directed to these apis? Thanks in advance. HTH! Ricardo ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users Nota: A informaci?n contida nesta mensaxe e os seus posibles documentos adxuntos ? privada e confidencial e est? dirixida ?nicamente ? seu destinatario/a. Se vostede non ? o/a destinatario/a orixinal desta mensaxe, por favor elim?nea. A distribuci?n ou copia desta mensaxe non est? autorizada. Nota: La informaci?n contenida en este mensaje y sus posibles documentos adjuntos es privada y confidencial y est? dirigida ?nicamente a su destinatario/a. Si usted no es el/la destinatario/a original de este mensaje, por favor elim?nelo. La distribuci?n o copia de este mensaje no est? autorizada. See more languages: http://www.sergas.es/aviso_confidencialidad.htm ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users