Re: [xwiki-users] Importing XAR File Programatically
There is two main ways depending on your context: * from outside: use the REST API for that, see http://platform.xwiki.org/xwiki/bin/view/Features/XWikiRESTfulAPI#H2Fwikis2F7BwikiName7D * in Java (or Groovy and other advanced programming script languages): using old package plugin before 6.0 and using WikiStream after, you can see an example of both in recent Import action sources (1): * in a Velocity script: same as java but the API is a bit different for WikiStream since you will use a dedicated (young and not much documented yet) script service ($services.wikistream) (2). You can look at WikiStream generic UI (2) for example of its use. In velocity you access the old plugin API using $xwiki.package and you end up with the exact same object than in Java. 1: https://github.com/xwiki/xwiki-platform/blob/master/xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/ImportAction.java 2: http://nexus.xwiki.org/nexus/service/local/repositories/releases/archive/org/xwiki/platform/xwiki-platform-wikistream-script/6.0.1/xwiki-platform-wikistream-script-6.0.1-javadoc.jar/!/index.html 3: https://github.com/xwiki/xwiki-platform/tree/master/xwiki-platform-core/xwiki-platform-wikistream/xwiki-platform-wikistream-ui and http://extensions.xwiki.org/xwiki/bin/view/Extension/XWiki+Platform+-+WikiStream+-+UI What WikiStream brings compared to the old plugin for XAR import is streaming support, when importing with the old plugin you load the entire XAR in memory before saving it in database which is not exactly the best for big XARs. On Wed, May 28, 2014 at 11:10 PM, Brockmeier, Chris S chris.s.brockme...@lmco.com wrote: Hey All, I've seen a couple of threads out in the web about importing an XAR file programatically, however it seems they might be out of date a bit. Has anyone had any luck using the API that xwiki has to do such a thing? Thanks, Chris. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users -- Thomas Mortagne ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Multiple problems with PDF export!
On Thu, May 29, 2014 at 6:06 AM, mcto...@gmail.com wrote: Arghh! This is a bit disappointing - the PDF exporter seems a bit underbaked? * Bold face markup is lost on export. * Export of a slab of plain text wrapped in {{{ }}} loses newlines on export. I have no problem with these. * Box macro lost on export. Only the grey background is lost. ___ 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] Reusing macro
Sorry but I didn't undrstand the suggestion. If I include the page I see the page content in my host page and I don't want it. I need only to include only my few lines of code in order to avoid to rewrite them every time. Tks Tullio -- View this message in context: http://xwiki.475771.n2.nabble.com/Reusing-macro-tp7590736p7590754.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Reusing macro
You put the Velocity macro in a separate page inside {{velocity output=false}} ..Your macro here.. {{/velocity}} and then you include this page in all the pages that need to use that macro. Of course, you don't need a page for each Velcity macro. You just need a page where to put Velocity macros that are used all over your code. Hope this helps, Marius On Thu, May 29, 2014 at 12:13 PM, tullio0106 tbettina...@axioma.it wrote: Sorry but I didn't undrstand the suggestion. If I include the page I see the page content in my host page and I don't want it. I need only to include only my few lines of code in order to avoid to rewrite them every time. Tks Tullio -- View this message in context: http://xwiki.475771.n2.nabble.com/Reusing-macro-tp7590736p7590754.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ 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] Reusing macro
Tks. But when I include such page how can I recall the macro in the host page ? Tks -- View this message in context: http://xwiki.475771.n2.nabble.com/Reusing-macro-tp7590736p7590757.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Multiple problems with PDF export!
* Bold face markup is lost on export. Hmm... what could account for this difference - perhaps choice of font for PDF... I did change it to san serif. Maybe there is an issue with selecting the bold version of the font at export time. * Export of a slab of plain text wrapped in {{{ }}} loses newlines on export. To clarify... ##{{{ }}## was giving trouble. I removed the ##, it then worked ok then, but I also had to make sure the blank lines had a couple of blank spaces for the monospace to actually not end prematurely. * Box macro lost on export. Actually I don't even get a line drawn around in the form of a box outline in web view...just the shading. (And nothing at all in pdf) So something not quite right...need to check if something got broke in my custom skin css ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] Differences between extensions (observation Module)
Hello People, I am needing to create an observation module In my XWiki to monitor the comments creation actions of a specific space. All time that someone put a comment I need to send an email to a specific group. I have found these two instructions: http://extensions.xwiki.org/xwiki/bin/view/Extension/Observation+Module+Local http://platform.xwiki.org/xwiki/bin/view/DevGuide/JavaScriptAPI When I use one or other? What is the event that the XWiki generates when someone input a comment? DocumentUpdatedEvent? Thanks! Danilo Grupo Energisa Danilo Oliveira Analista Suporte Aplicacao TI - DPTO CORP. DE INFRAESTR. TI e-mail: danilo.olive...@energisa.com.br | tel: (32) 3429-6342 | cel: (32) 8452-9478 Esta mensagem contém informação confidencial. Se você a recebeu por engano, não divulgue ou copie seu conteúdo. Por favor, avise ao remetente imediatamente e apague-a do computador. Privileged and confidential. If this message has been received by mistake, do not disclose or copy its contents. Please notify sender and delete immediately. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Differences between extensions (observation Module)
Hi, On 29 May 2014 at 15:31:33, Danilo Amaral de Oliveira (danilo.olive...@energisa.com.br(mailto:danilo.olive...@energisa.com.br)) wrote: Hello People, I am needing to create an observation module In my XWiki to monitor the comments creation actions of a specific space. All time that someone put a comment I need to send an email to a specific group. I have found these two instructions: http://extensions.xwiki.org/xwiki/bin/view/Extension/Observation+Module+Local http://platform.xwiki.org/xwiki/bin/view/DevGuide/JavaScriptAPI When I use one or other? You need the first one. The second one is for JS events not document-related events. What is the event that the XWiki generates when someone input a comment? DocumentUpdatedEvent? Best is to use CommentAddedEvent. Thanks -Vincent Thanks! Danilo ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Differences between extensions (observation Module)
On 29 May 2014 at 15:44:49, vinc...@massol.net (vinc...@massol.net(mailto:vinc...@massol.net)) wrote: Hi, On 29 May 2014 at 15:31:33, Danilo Amaral de Oliveira (danilo.olive...@energisa.com.br(mailto:danilo.olive...@energisa.com.br)) wrote: Hello People, I am needing to create an observation module In my XWiki to monitor the comments creation actions of a specific space. All time that someone put a comment I need to send an email to a specific group. I have found these two instructions: http://extensions.xwiki.org/xwiki/bin/view/Extension/Observation+Module+Local http://platform.xwiki.org/xwiki/bin/view/DevGuide/JavaScriptAPI When I use one or other? You need the first one. The second one is for JS events not document-related events. What is the event that the XWiki generates when someone input a comment? DocumentUpdatedEvent? Best is to use CommentAddedEvent. com.xpn.xwiki.internal.event.CommentAddedEvent to be precise -Vincent Thanks -Vincent Thanks! Danilo ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] XWiki Documentation day - Idea
Well, WE don’t have more time to organize anything today, I think that we could plan a Wiki Document day to June, I will be glad to help too. Danilo Grupo Energisa Danilo Oliveira Analista Suporte Aplicacao TI - DPTO CORP. DE INFRAESTR. TI e-mail: danilo.olive...@energisa.com.br | tel: (32) 3429-6342 | cel: (32) 8452-9478 Esta mensagem contém informação confidencial. Se você a recebeu por engano, não divulgue ou copie seu conteúdo. Por favor, avise ao remetente imediatamente e apague-a do computador. Privileged and confidential. If this message has been received by mistake, do not disclose or copy its contents. Please notify sender and delete immediately. -Mensagem original- De: users [mailto:users-boun...@xwiki.org] Em nome de vinc...@massol.net Enviada em: quarta-feira, 28 de maio de 2014 11:25 Para: XWiki Users Assunto: Re: [xwiki-users] XWiki Documentation day - Idea Hi Danilo, This is definitely a good idea and one that we’ve proposed already (see http://markmail.org/message/avl4tl5xuefe7s7w). FTR on this page we’ve listed all our ideas for the XWiki Day: http://dev.xwiki.org/xwiki/bin/view/Community/XWikiDays Now we’ve had a lot of bank holidays in France in May that were on Thursdays (our XWiki Day!) and thus I have not been very active on pushing this forward lately. Tomorrow is again a bank holiday in France and I won’t be there and several xwiki committers won’t be here either (Guillaume, Thomas, just to name a few). So if someone wants to organize an XWiki Day tomorrow please stand up! :) I’m sending a new mail on the devs list to decide what type of day to do next. Thanks -Vincent On 28 May 2014 at 13:34:58, Danilo Amaral de Oliveira (danilo.olive...@energisa.com.br(mailto:danilo.olive...@energisa.com.br)) wrote: Hello XWiki community, I have been following other open source communities and there one, the XenServer community, that has a nice initiative, the Xen Document Day: http://wiki.xenproject.org/wiki/Xen_Document_Days/TODO Xen Project document days are all day IRC events, facilitated by members of the Xen Project community. The purpose of Xen Project Document Days is to Improve user documentation Improve developer documentation, including the creation of man pages, etc. Improve and maintaining the wiki: this means fixing important pages, retiring old ones, help identify what is and isn't important, write new pages, etc. Do you think that this idea could be applicable to XWiki? Danilo ___ 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] More than a Wiki macro in a page.
I need to create 3 wiki macros in my wiki space. In order to make my life easier I create a page, named Macros, and created all macros in that page. Trying to use them I saw only one, the first, is visible and usable. Other 2 are not visible and not usable in all pages (included Macros). What's wrong ? What should I do to make all visible. Tks -- View this message in context: http://xwiki.475771.n2.nabble.com/More-than-a-Wiki-macro-in-a-page-tp7590764.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Reusing macro
{{velocity}} macros in a page are not isolated, they behave as you everything was in the same script so all you have to do is include you page at the beginning and then write a new Velocity script which uses what's in the page you included. On Thu, May 29, 2014 at 1:07 PM, tullio0106 tbettina...@axioma.it wrote: Tks. But when I include such page how can I recall the macro in the host page ? Tks -- View this message in context: http://xwiki.475771.n2.nabble.com/Reusing-macro-tp7590736p7590757.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users -- Thomas Mortagne ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Reusing macro
This means there's no way to define a macro someware and use it like a function (with or without parameters) like {{mymacro}} ? Tks -- View this message in context: http://xwiki.475771.n2.nabble.com/Reusing-macro-tp7590736p7590766.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Reusing macro
You are mixing several things. What you are talking about in your last mail is a wiki macro and does not have much to do with Velocity (except for the fact that can put Velocity like any other wiki content in wiki macros) and wiki macros are registered for a wiki (or a whole farm) and can then be used in any page of that wiki. But wiki macro are wiki syntax for which parameters are just text, you can't pass complex objects to a wiki macros, something you can do with Velocity macro. In short wiki macro are more configurable display elements which don't require any include where velocity macro are the functions of the Velocity language and require to be included some way. More about wiki macros: http://platform.xwiki.org/xwiki/bin/view/DevGuide/WikiMacroTutorial On Thu, May 29, 2014 at 6:00 PM, tullio0106 tbettina...@axioma.it wrote: This means there's no way to define a macro someware and use it like a function (with or without parameters) like {{mymacro}} ? Tks -- View this message in context: http://xwiki.475771.n2.nabble.com/Reusing-macro-tp7590736p7590766.html Sent from the XWiki- Users mailing list archive at Nabble.com. ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users -- Thomas Mortagne ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
[xwiki-users] New Notifications Tutorial (a.k.a Event Listener)
Dear XWiki users, Since I’ve seen several questions recently on the list related to XWiki events, I’ve spent several hours rewriting the XWiki Notifications Tutorial here: http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingEventListenerTutorial You’ll learn for example: - Adding content to pages on save - Log when a document is modified - Send a mail whenever a comment is added Enjoy! Thanks -Vincent ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] Differences between extensions (observation Module)
I’ve created the following for you: http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingEventListenerTutorial#HSendamailwheneveracommentisadded ;-) -Vincent On 29 May 2014 at 15:31:33, Danilo Amaral de Oliveira (danilo.olive...@energisa.com.br(mailto:danilo.olive...@energisa.com.br)) wrote: Hello People, I am needing to create an observation module In my XWiki to monitor the comments creation actions of a specific space. All time that someone put a comment I need to send an email to a specific group. I have found these two instructions: http://extensions.xwiki.org/xwiki/bin/view/Extension/Observation+Module+Local http://platform.xwiki.org/xwiki/bin/view/DevGuide/JavaScriptAPI When I use one or other? What is the event that the XWiki generates when someone input a comment? DocumentUpdatedEvent? Thanks! Danilo Grupo Energisa Danilo Oliveira Analista Suporte Aplicacao TI - DPTO CORP. DE INFRAESTR. TI e-mail: danilo.olive...@energisa.com.br | tel: (32) 3429-6342 | cel: (32) 8452-9478 Esta mensagem contém informação confidencial. Se você a recebeu por engano, não divulgue ou copie seu conteúdo. Por favor, avise ao remetente imediatamente e apague-a do computador. Privileged and confidential. If this message has been received by mistake, do not disclose or copy its contents. Please notify sender and delete immediately. ___ 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] RES: Differences between extensions (observation Module)
Vicent, Awsome! I was exploring XWiki documentation and this page appeared to me, and I asked myself, how I could not find this page before, It could avoid unnecessarily question in the mail list. Now I see that was created today. Hahaha Thank you very much. Just one question. I have noticed that your are using the EventListener class. It was not replaced with the AbstractEventListener class? Thanks, Danilo De: Vincent Massol [mailto:vmas...@gmail.com] Em nome de vinc...@massol.net Enviada em: quinta-feira, 29 de maio de 2014 13:41 Para: XWiki Users Cc: Danilo Amaral de Oliveira Assunto: Re: [xwiki-users] Differences between extensions (observation Module) I’ve created the following for you: http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingEventListenerTutorial#HSendamailwheneveracommentisadded ;-) -Vincent On 29 May 2014 at 15:31:33, Danilo Amaral de Oliveira (danilo.olive...@energisa.com.br(mailto:danilo.olive...@energisa.com.br)) wrote: Hello People, I am needing to create an observation module In my XWiki to monitor the comments creation actions of a specific space. All time that someone put a comment I need to send an email to a specific group. I have found these two instructions: http://extensions.xwiki.org/xwiki/bin/view/Extension/Observation+Module+Local http://platform.xwiki.org/xwiki/bin/view/DevGuide/JavaScriptAPI When I use one or other? What is the event that the XWiki generates when someone input a comment? DocumentUpdatedEvent? Thanks! Danilo Grupo Energisa Danilo Oliveira Analista Suporte Aplicacao TI - DPTO CORP. DE INFRAESTR. TI e-mail: danilo.olive...@energisa.com.br | tel: (32) 3429-6342 | cel: (32) 8452-9478 Esta mensagem contém informação confidencial. Se você a recebeu por engano, não divulgue ou copie seu conteúdo. Por favor, avise ao remetente imediatamente e apague-a do computador. Privileged and confidential. If this message has been received by mistake, do not disclose or copy its contents. Please notify sender and delete immediately. Grupo Energisa Danilo Oliveira Analista Suporte Aplicacao TI - DPTO CORP. DE INFRAESTR. TI e-mail: danilo.olive...@energisa.com.br | tel: (32) 3429-6342 | cel: (32) 8452-9478 Esta mensagem contém informação confidencial. Se você a recebeu por engano, não divulgue ou copie seu conteúdo. Por favor, avise ao remetente imediatamente e apague-a do computador. Privileged and confidential. If this message has been received by mistake, do not disclose or copy its contents. Please notify sender and delete immediately. ___ 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] RES: Differences between extensions (observation Module)
On Thu, May 29, 2014 at 7:40 PM, Danilo Amaral de Oliveira danilo.olive...@energisa.com.br wrote: Vicent, Awsome! I was exploring XWiki documentation and this page appeared to me, and I asked myself, how I could not find this page before, It could avoid unnecessarily question in the mail list. Now I see that was created today. Hahaha Thank you very much. Just one question. I have noticed that your are using the EventListener class. It was not replaced with the AbstractEventListener class? What is important is to implement EventListener, AbstractLogEventListener (which partially implements EventListener) is a helper which feets your use case or not but you don't have to use it. Thanks, Danilo De: Vincent Massol [mailto:vmas...@gmail.com] Em nome de vinc...@massol.net Enviada em: quinta-feira, 29 de maio de 2014 13:41 Para: XWiki Users Cc: Danilo Amaral de Oliveira Assunto: Re: [xwiki-users] Differences between extensions (observation Module) I’ve created the following for you: http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingEventListenerTutorial#HSendamailwheneveracommentisadded ;-) -Vincent On 29 May 2014 at 15:31:33, Danilo Amaral de Oliveira (danilo.olive...@energisa.com.br(mailto:danilo.olive...@energisa.com.br)) wrote: Hello People, I am needing to create an observation module In my XWiki to monitor the comments creation actions of a specific space. All time that someone put a comment I need to send an email to a specific group. I have found these two instructions: http://extensions.xwiki.org/xwiki/bin/view/Extension/Observation+Module+Local http://platform.xwiki.org/xwiki/bin/view/DevGuide/JavaScriptAPI When I use one or other? What is the event that the XWiki generates when someone input a comment? DocumentUpdatedEvent? Thanks! Danilo Grupo Energisa Danilo Oliveira Analista Suporte Aplicacao TI - DPTO CORP. DE INFRAESTR. TI e-mail: danilo.olive...@energisa.com.br | tel: (32) 3429-6342 | cel: (32) 8452-9478 Esta mensagem contém informação confidencial. Se você a recebeu por engano, não divulgue ou copie seu conteúdo. Por favor, avise ao remetente imediatamente e apague-a do computador. Privileged and confidential. If this message has been received by mistake, do not disclose or copy its contents. Please notify sender and delete immediately. Grupo Energisa Danilo Oliveira Analista Suporte Aplicacao TI - DPTO CORP. DE INFRAESTR. TI e-mail: danilo.olive...@energisa.com.br | tel: (32) 3429-6342 | cel: (32) 8452-9478 Esta mensagem contém informação confidencial. Se você a recebeu por engano, não divulgue ou copie seu conteúdo. Por favor, avise ao remetente imediatamente e apague-a do computador. Privileged and confidential. If this message has been received by mistake, do not disclose or copy its contents. Please notify sender and delete immediately. ___ 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 -- Thomas Mortagne ___ users mailing list users@xwiki.org http://lists.xwiki.org/mailman/listinfo/users
Re: [xwiki-users] New Notifications Tutorial (a.k.a Event Listener)
Event listeners should not keep a reference to the XWiki context from when they were created. XWiki context is created per request while the event listener is used on multiple requests. I updated the LoggingEventListener. Thanks, Marius On Thu, May 29, 2014 at 7:39 PM, vinc...@massol.net vinc...@massol.net wrote: Dear XWiki users, Since I’ve seen several questions recently on the list related to XWiki events, I’ve spent several hours rewriting the XWiki Notifications Tutorial here: http://platform.xwiki.org/xwiki/bin/view/DevGuide/WritingEventListenerTutorial You’ll learn for example: - Adding content to pages on save - Log when a document is modified - Send a mail whenever a comment is added Enjoy! Thanks -Vincent ___ 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