This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Index: xwiki-rendering/xwiki-rendering-syntaxes/xwiki-rendering-syntax-doxia/pom.xml | |
=================================================================== | |
--- xwiki-rendering/xwiki-rendering-syntaxes/xwiki-rendering-syntax-doxia/pom.xml (revision 5c84b2cc2f38e6f22c74a4e2133dae1a43bc7ff0) | |
+++ xwiki-rendering/xwiki-rendering-syntaxes/xwiki-rendering-syntax-doxia/pom.xml (revision ) | |
@@ -45,6 +45,24 @@ | |
</exclusion> | |
</exclusions> | |
</dependency> | |
+ <dependency> | |
+ <groupId>org.apache.maven.doxia</groupId> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{velocity}} | |
#if("$!{request.xpage}" == 'plain') | |
$response.setContentType('application/json') | |
#end | |
##============================== | |
## Offset = item # at which to start displaying data | |
##============================== | |
#set($offset = $util.parseInt($request.get('offset'))) | |
## offset starts from 0 in velocity and 1 in javascript | |
#set($offset = $offset - 1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{groovy}} | |
import org.xwiki.rendering.transformation.linkchecker.* | |
import com.xpn.xwiki.web.* | |
if (request.get("action") == "clear") { | |
Utils.getComponent(LinkStateManager.class).getLinkStates().clear() | |
} | |
{{/groovy}} | |
{{velocity}} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{velocity}} | |
#set ($states = $services.linkchecker.getLinkStates()) | |
#foreach ($linkReference in $states.keySet()) | |
* $linkReference ((( | |
#set ($contentReferences = $states.get($linkReference)) | |
|=Page|=State|=Last Checked time | |
#foreach ($contentReference in $contentReferences.keySet()) | |
#if ($contentReference != $doc.getPrefixedFullName()) | |
#set ($state = $contentReferences.get($contentReference)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
vmassol@vincent-massols-macbook-pro ~ $ vagrant box add lucid32 http://files.vagrantup.com/lucid32.box | |
[vagrant] Downloading with Vagrant::Downloaders::HTTP... | |
[vagrant] Downloading box: http://files.vagrantup.com/lucid32.box | |
[vagrant] Extracting box... | |
[vagrant] Verifying box... | |
[vagrant] Cleaning up downloaded box... | |
/Library/Ruby/Gems/1.8/gems/vagrant-0.9.1/lib/vagrant/driver/virtualbox.rb:117:in `read_version': private method `split' called for nil:NilClass (NoMethodError) | |
from /Library/Ruby/Gems/1.8/gems/vagrant-0.9.1/lib/vagrant/driver/virtualbox.rb:36:in `initialize' | |
from /Library/Ruby/Gems/1.8/gems/vagrant-0.9.1/lib/vagrant/action/box/verify.rb:13:in `new' | |
from /Library/Ruby/Gems/1.8/gems/vagrant-0.9.1/lib/vagrant/action/box/verify.rb:13:in `call' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
To be added to TestUtil: | |
/** | |
* Sometimes it's useful to execute some script on the server to get information back to the client side. We do | |
* this by using the preview action on a temporary wiki page, passing the specified content. | |
* | |
* @param content the content to execute in a page | |
* @return the result of the page execution with the page rendered in plain mode | |
*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Override | |
public void executeAsUser(DocumentReference executingUserReference, DocumentReference securityDocumentReference, | |
Runnable runnable) throws IRCBotException | |
{ | |
XWikiContext xwikiContext = getXWikiContext(); | |
DocumentReference currentUserReference = xwikiContext.getUserReference(); | |
XWikiDocument currentDocument = xwikiContext.getDoc(); | |
try { | |
// Set executing user in the XWiki Context | |
xwikiContext.setUserReference(executingUserReference); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* See the NOTICE file distributed with this work for additional | |
* information regarding copyright ownership. | |
* | |
* This is free software; you can redistribute it and/or modify it | |
* under the terms of the GNU Lesser General Public License as | |
* published by the Free Software Foundation; either version 2.1 of | |
* the License, or (at your option) any later version. | |
* | |
* This software is distributed in the hope that it will be useful, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private String append(Object... objects) | |
{ | |
StringBuffer buffer = new StringBuffer(); | |
for (int i = 0; i < objects.length; i += 2) { | |
String key = (String) objects[i]; | |
Object value = objects[i + 1]; | |
if (value instanceof List) { | |
appendList(buffer, key, (List) value); | |
} else { | |
appendLiteral(buffer, key, value); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
private class XWikiStyle extends StandardToStringStyle | |
{ | |
public XWikiStyle() | |
{ | |
super(); | |
setUseClassName(false); | |
setUseIdentityHashCode(false); | |
setContentStart(""); | |
setContentEnd("]"); | |
setFieldNameValueSeparator(" = ["); |
OlderNewer