Niels Mayer wrote:
>
> PS: Why not just have xwiki.cfg's default be: 'xwiki.encoding=UTF-8' ;
> likewise have web.xml's default for
> com.xpn.xwiki.web.SetCharacterEncodingFilter's 'encoding' be UTF-8. These
> encoding errors that oft go unnoticed are probably resulting in a number of
> configuration errors, and perhaps other bug-reports that aren't entirely
> valid, should they depend on encoding issues.
Big +1
This is one of the oldest issues open
(http://jira.xwiki.org/jira/browse/XWIKI-94). I guess that since we're
nearing 2.0, it would be a good thing to set this on trunk, before the
1.9M1 release.
WDYT?
--
Sergiu Dumitriu
http://purl.org/net/sergiu/
Hi devs,
The new WYSIWYG editor uses an enhanced DOM API to manipulate the edited
document. This API extends the default DOM API found in GWT adding:
* W3C Range and Selection support ( http://tinyurl.com/cvsm3a )
* Multiple-window support ( http://tinyurl.com/cphdep )
* Depth-first pre-order iterator (part of Document traversal support)
* Lots of DOM utility methods
I'd like to move this API in a separate build module to make it reusable
inside and outside XWiki. We could name it xwiki-web-gwt-dom (or
xwiki-gwt-dom?) and place it, at list for now, in platform/web/gwt-dom
(or platform/web/xwiki-gwt-dom?).
Also, I'd like to rename the package name from
com.xpn.xwiki.wysiwyg.client.dom to org.xwiki.gwt.dom.
WDYT?
Marius
This could be an interesting way to select media (images, video/audio,
documents) in xwiki:
http://www.simile-widgets.org/runway/
> This widget lets you display images in a rich interactive visualization
> similar to that of Apple iTunes known as Cover Flow. It is a Flash-based
> implementation ... The Flash widget can fire events to update the web page's
> Javascript. .... The web page's Javascript can change the Flash widget on
> the fly. Documentation<http://code.google.com/p/simile-widgets/wiki/Runway>
> Mailing List <http://groups.google.com/group/simile-widgets> (for
> technical support, etc.) Code<http://code.google.com/p/simile-widgets/source/browse/#svn/runway/trunk>(open source, BSD license)...
>
I think it would be useful in the anchor/link wizard in the wysiwyg editor,
lending an itunes style album-cover-flipping style interface to process of
link and image. selection in xwiki. It would be great if we could render
semi-readable scaled-down thumbnails of existing xwiki documents in the
cover-flow browser.
Yet another GSOC project... though I bet the basic interface to 'runway' is
pretty trivial in xwiki ... (e.g. of similar complexity and
interface-ability is the youtube chromeless player:
http://nielsmayer.com/xwiki/bin/view/Todo/YoutubeChromelessPlayer then again
... I can't figure out why my example doesn't work in IE, yet fine in
safari&firefox -- probably because having a menagerie-a-trois of languages
to deal with by adding flash to the picture always leads to trouble...)
Niels
http://nielsmayer.com
Hello Devs,
I'm starting to think about the integration of JCaptcha 2.0
(http://forge.octo.com/jcaptcha/confluence/display/general/Simple+Servlet+In…)
that would deprecated our current Captcha plugin.
I think we need it as a component, for example xwiki-captcha
We can have a CaptchaedRequestValidator component interface that
declares the following method :
boolean validateCaptcha(HttpServletRequest request);
which would be called from the register action, comment add action, etc.
(anywhere a captcha is needed - we could even expose a velocity API if
we need it)
WDYT ?
Regards,
Jerome.
The RSS macro and its RSSMAcroParameters class should extends the Box
macro since it's exactly the goal of AbstractBoxMacro. The way it
works currently make copy the same parameters in BoxMacroParameters
and RssMacroParameters when we should have RssMacroParameters extends
BoxMacroParameters. This would remove some useless code in rss
macro...
On Sat, Mar 14, 2009 at 11:00, SVN jvelociter
<platform-notifications(a)xwiki.org> wrote:
> Author: jvelociter
> Date: 2009-03-14 11:00:44 +0100 (Sat, 14 Mar 2009)
> New Revision: 17624
>
> Modified:
> Â platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-box/src/main/java/org/xwiki/rendering/macro/box/AbstractBoxMacro.java
> Â platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-box/src/main/java/org/xwiki/rendering/macro/box/BoxMacroParameters.java
> Â platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/main/java/org/xwiki/rendering/internal/macro/rss/RssMacro.java
> Â platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/main/java/org/xwiki/rendering/macro/rss/RssMacroParameters.java
> Log:
> XWIKI-3359 Add "width" parameter to box macro
> XWIKI-3358 Add ability to control the width of the box containing the output of the RSS macro 2.0
>
> Merged from branch 1.8
>
>
> Modified: platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-box/src/main/java/org/xwiki/rendering/macro/box/AbstractBoxMacro.java
> ===================================================================
> --- platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-box/src/main/java/org/xwiki/rendering/macro/box/AbstractBoxMacro.java    2009-03-14 09:58:04 UTC (rev 17623)
> +++ platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-box/src/main/java/org/xwiki/rendering/macro/box/AbstractBoxMacro.java    2009-03-14 10:00:44 UTC (rev 17624)
> @@ -21,6 +21,7 @@
>
> Â import java.io.StringReader;
> Â import java.util.Collections;
> +import java.util.HashMap;
> Â import java.util.List;
> Â import java.util.Map;
>
> @@ -123,19 +124,24 @@
> Â Â Â Â String titleParameter = parameters.getTitle();
> Â Â Â Â List< ? extends Block> titleBlockList = parameters.getBlockTitle();
>
> + Â Â Â Â Map<String, String> boxParameters = new HashMap<String, String>();
> Â Â Â Â String classParameter = parameters.getCssClass();
> Â Â Â Â String cssClass =
> Â Â Â Â Â Â StringUtils.isEmpty(classParameter) ? getClassProperty() : getClassProperty() + " " + classParameter;
> - Â Â Â Â Map<String, String> classParameterMap = Collections.singletonMap("class", cssClass);
> + Â Â Â Â boxParameters.put("class", cssClass);
>
> + Â Â Â Â if (!StringUtils.isEmpty(parameters.getWidth())) {
> + Â Â Â Â Â Â boxParameters.put("style", "width:" + parameters.getWidth());
> + Â Â Â Â }
> +
> Â Â Â Â Block boxBlock;
> Â Â Â Â if (context.isInline()) {
> Â Â Â Â Â Â List<Block> contentBlocks = parseContent(parameters, content, context);
> Â Â Â Â Â Â FormatBlock spanBlock = new FormatBlock(contentBlocks, Format.NONE);
> - Â Â Â Â Â Â spanBlock.setParameters(classParameterMap);
> + Â Â Â Â Â Â spanBlock.setParameters(boxParameters);
> Â Â Â Â Â Â boxBlock = spanBlock;
> Â Â Â Â } else {
> - Â Â Â Â Â Â boxBlock = new XMLBlock(new XMLElement("div", classParameterMap));
> + Â Â Â Â Â Â boxBlock = new XMLBlock(new XMLElement("div", boxParameters));
>
> Â Â Â Â Â Â // we add the image, if there is one
> Â Â Â Â Â Â if (!StringUtils.isEmpty(imageParameter)) {
>
> Modified: platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-box/src/main/java/org/xwiki/rendering/macro/box/BoxMacroParameters.java
> ===================================================================
> --- platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-box/src/main/java/org/xwiki/rendering/macro/box/BoxMacroParameters.java   2009-03-14 09:58:04 UTC (rev 17623)
> +++ platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-box/src/main/java/org/xwiki/rendering/macro/box/BoxMacroParameters.java   2009-03-14 10:00:44 UTC (rev 17624)
> @@ -48,6 +48,11 @@
> Â Â private String image = StringUtils.EMPTY;
>
> Â Â /**
> + Â Â * Refer to {@link #getWidth()}.
> + Â Â */
> + Â Â private String width = StringUtils.EMPTY;
> +
> + Â Â /**
> Â Â Â * @return the title to be displayed in the message box. Note that it can be specified using Wiki 2.0 syntax.
> Â Â Â */
> Â Â private List< ? extends Block> blockTitle;
> @@ -117,10 +122,26 @@
> Â Â /**
> Â Â Â * @param cssClass - refer to {@link BoxMacroParameters#getCssClass()}
> Â Â Â */
> - Â Â @ParameterDescription("the CSS sheet used for rendering the document")
> + Â Â @ParameterDescription("A CSS class to add to the box element")
> Â Â public void setCssClass(String cssClass)
> Â Â {
> Â Â Â Â this.cssClass = cssClass;
> Â Â }
>
> + Â Â /**
> + Â Â * @return an optional width to enforce as an inline style on the DIV element the box will be formed of.
> + Â Â */
> + Â Â public String getWidth()
> + Â Â {
> + Â Â Â Â return this.width;
> + Â Â }
> +
> + Â Â /**
> + Â Â * @param width - refer to {@link BoxMacroParameters#getWidth()}
> + Â Â */
> + Â Â @ParameterDescription("An optional width for the box, expressed in px or %")
> + Â Â public void setWidth(String width)
> + Â Â {
> + Â Â Â Â this.width = width;
> + Â Â }
> Â }
>
> Modified: platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/main/java/org/xwiki/rendering/internal/macro/rss/RssMacro.java
> ===================================================================
> --- platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/main/java/org/xwiki/rendering/internal/macro/rss/RssMacro.java   2009-03-14 09:58:04 UTC (rev 17623)
> +++ platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/main/java/org/xwiki/rendering/internal/macro/rss/RssMacro.java   2009-03-14 10:00:44 UTC (rev 17624)
> @@ -28,6 +28,7 @@
> Â import com.sun.syndication.io.SyndFeedInput;
> Â import com.sun.syndication.io.XmlReader;
>
> +import org.apache.commons.lang.StringUtils;
> Â import org.xwiki.rendering.block.Block;
> Â import org.xwiki.rendering.block.LinkBlock;
> Â import org.xwiki.rendering.block.MacroBlock;
> @@ -178,6 +179,11 @@
> Â Â Â Â if (parameters.isCss()) {
> Â Â Â Â Â Â boxParameters.setCssClass("rssfeed");
> Â Â Â Â }
> +
> + Â Â Â Â if (!StringUtils.isEmpty(parameters.getWidth())) {
> + Â Â Â Â Â Â boxParameters.setWidth(parameters.getWidth());
> + Â Â Â Â }
> +
> Â Â Â Â renderFeedOrEntryTitle(boxParameters, parameters.isCss(), "rsschanneltitle", feed.getTitle(), feed.getLink());
>
> Â Â Â Â List<Block> result = null;
>
> Modified: platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/main/java/org/xwiki/rendering/macro/rss/RssMacroParameters.java
> ===================================================================
> --- platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/main/java/org/xwiki/rendering/macro/rss/RssMacroParameters.java   2009-03-14 09:58:04 UTC (rev 17623)
> +++ platform/core/trunk/xwiki-rendering/xwiki-rendering-macros/xwiki-rendering-macro-rss/src/main/java/org/xwiki/rendering/macro/rss/RssMacroParameters.java   2009-03-14 10:00:44 UTC (rev 17624)
> @@ -22,6 +22,7 @@
>
> Â import java.net.URL;
>
> +import org.apache.commons.lang.StringUtils;
> Â import org.xwiki.rendering.macro.descriptor.ParameterDescription;
> Â import org.xwiki.rendering.macro.descriptor.ParameterMandatory;
>
> @@ -55,6 +56,11 @@
> Â Â private boolean image;
>
> Â Â /**
> + Â Â * The width of the enclosing box containing the RSS macro output.
> + Â Â */
> + Â Â private String width = StringUtils.EMPTY;
> +
> + Â Â /**
> Â Â Â * If "true" then adds class id elements (rssitem, rssitemtitle, rssitemdescription, rsschanneltitle, etc) which you
> Â Â Â * can style by modifying your skin's CSS file.
> Â Â Â */
> @@ -103,6 +109,23 @@
> Â Â }
>
> Â Â /**
> + Â Â * @param width the width of the RSS box, that will dismiss potential CSS rules defining its default value.
> + Â Â */
> + Â Â @ParameterDescription("The width, in px or %, of the box containing the RSS output (default is 30%)")
> + Â Â public void setWidth(String width)
> + Â Â {
> + Â Â Â Â this.width = width;
> + Â Â }
> +
> + Â Â /**
> + Â Â * @return the width of the RSS box, that will dismiss potential CSS rules defining its default value.
> + Â Â */
> + Â Â public String getWidth()
> + Â Â {
> + Â Â Â Â return this.width;
> + Â Â }
> +
> + Â Â /**
> Â Â Â * @param css whether to add class id elements (rssitem, rssitemtitle, rssitemdescription, rsschanneltitle, etc).
> Â Â Â */
> Â Â @ParameterDescription("Specifies whether to add class id elements (rssitem, rssitemtitle, rssitemdescription etc).")
>
> _______________________________________________
> notifications mailing list
> notifications(a)xwiki.org
> http://lists.xwiki.org/mailman/listinfo/notifications
>
--
Thomas Mortagne
On Fri, Mar 13, 2009 at 16:50, SVN jvelociter
<platform-notifications(a)xwiki.org> wrote:
> Author: jvelociter
> Date: 2009-03-13 16:50:43 +0100 (Fri, 13 Mar 2009)
> New Revision: 17618
>
> Modified:
> Â platform/core/trunk/xwiki-rendering/xwiki-rendering-api/src/main/java/org/xwiki/rendering/internal/transformation/MacroTransformation.java
> Â platform/core/trunk/xwiki-rendering/xwiki-rendering-tests/src/test/resources/macros/macro7.test
> Â platform/core/trunk/xwiki-rendering/xwiki-rendering-tests/src/test/resources/macros/macro8.test
> Â platform/core/trunk/xwiki-rendering/xwiki-rendering-tests/src/test/resources/macros/macro9.test
> Log:
> XWIKI-3352 Wrap rendering error descriptions in a <pre> tag
>
> Merged from branch 1.8
>
>
> Modified: platform/core/trunk/xwiki-rendering/xwiki-rendering-api/src/main/java/org/xwiki/rendering/internal/transformation/MacroTransformation.java
> ===================================================================
> --- platform/core/trunk/xwiki-rendering/xwiki-rendering-api/src/main/java/org/xwiki/rendering/internal/transformation/MacroTransformation.java  2009-03-13 15:43:26 UTC (rev 17617)
> +++ platform/core/trunk/xwiki-rendering/xwiki-rendering-api/src/main/java/org/xwiki/rendering/internal/transformation/MacroTransformation.java  2009-03-13 15:50:43 UTC (rev 17618)
> @@ -226,15 +226,17 @@
> Â Â Â Â Map<String, String> errorDescriptionBlockParams =
> Â Â Â Â Â Â Collections.singletonMap("class", "xwikirenderingerrordescription hidden");
>
> + Â Â Â Â Block descriptionBlock = new XMLBlock(Arrays.asList((Block) new WordBlock(description)), new XMLElement("pre", Collections.EMPTY_MAP));
You should use VerbatimBlock instead, it's its job.
> +
> Â Â Â Â if (macroToReplace.isInline()) {
> Â Â Â Â Â Â errorBlocks.add(new XMLBlock(Arrays.asList((Block) new WordBlock(message)), new XMLElement("span",
> Â Â Â Â Â Â Â Â errorBlockParams)));
> - Â Â Â Â Â Â errorBlocks.add(new XMLBlock(Arrays.asList((Block) new WordBlock(description)), new XMLElement("span",
> + Â Â Â Â Â Â errorBlocks.add(new XMLBlock(Arrays.asList((Block) descriptionBlock), new XMLElement("span",
> Â Â Â Â Â Â Â Â errorDescriptionBlockParams)));
> Â Â Â Â } else {
> Â Â Â Â Â Â errorBlocks.add(new XMLBlock(Arrays.asList((Block) new WordBlock(message)), new XMLElement("div",
> Â Â Â Â Â Â Â Â errorBlockParams)));
> - Â Â Â Â Â Â errorBlocks.add(new XMLBlock(Arrays.asList((Block) new WordBlock(description)), new XMLElement("div",
> + Â Â Â Â Â Â errorBlocks.add(new XMLBlock(Arrays.asList((Block) descriptionBlock), new XMLElement("div",
> Â Â Â Â Â Â Â Â errorDescriptionBlockParams)));
> Â Â Â Â }
>
>
> Modified: platform/core/trunk/xwiki-rendering/xwiki-rendering-tests/src/test/resources/macros/macro7.test
> ===================================================================
> --- platform/core/trunk/xwiki-rendering/xwiki-rendering-tests/src/test/resources/macros/macro7.test   2009-03-13 15:43:26 UTC (rev 17617)
> +++ platform/core/trunk/xwiki-rendering/xwiki-rendering-tests/src/test/resources/macros/macro7.test   2009-03-13 15:50:43 UTC (rev 17618)
> @@ -16,7 +16,9 @@
> Â onWord [Unknown macro: unknown]
> Â endXMLNode [span] [class=xwikirenderingerror]
> Â beginXMLNode [span] [class=xwikirenderingerrordescription hidden]
> +beginXMLNode [pre]
> Â onWord [The "unknown" macro is not in the list of registered macros. Verify the spelling or contact your administrator.]
> +endXMLNode [pre]
> Â endXMLNode [span] [class=xwikirenderingerrordescription hidden]
> Â endMacroMarkerInline [unknown] [] []
> Â onSpace
> @@ -26,7 +28,7 @@
> Â .#-----------------------------------------------------
> Â .expect|xhtml/1.0
> Â .#-----------------------------------------------------
> -<p>Unknown <!--startmacro:unknown|-||-|--><span class="xwikirenderingerror">Unknown macro: unknown</span><span class="xwikirenderingerrordescription hidden">The "unknown" macro is not in the list of registered macros. Verify the spelling or contact your administrator.</span><!--stopmacro--> macro</p>
> +<p>Unknown <!--startmacro:unknown|-||-|--><span class="xwikirenderingerror">Unknown macro: unknown</span><span class="xwikirenderingerrordescription hidden"><pre>The "unknown" macro is not in the list of registered macros. Verify the spelling or contact your administrator.</pre></span><!--stopmacro--> macro</p>
> Â .#-----------------------------------------------------
> Â .expect|xwiki/2.0
> Â .#-----------------------------------------------------
> @@ -34,4 +36,4 @@
> Â .#-----------------------------------------------------
> Â .input|xhtml/1.0
> Â .#-----------------------------------------------------
> -<html><p>Unknown <!--startmacro:unknown|-||-|--><span class="xwikirenderingerror">Unknown macro: unknown</span><span class="xwikirenderingerrordescription hidden">The "unknown" macro is not in the list of registered macros. Verify the spelling or contact your administrator.</span><!--stopmacro--> macro</p></html>
> \ No newline at end of file
> +<html><p>Unknown <!--startmacro:unknown|-||-|--><span class="xwikirenderingerror">Unknown macro: unknown</span><span class="xwikirenderingerrordescription hidden"><pre>The "unknown" macro is not in the list of registered macros. Verify the spelling or contact your administrator.</pre></span><!--stopmacro--> macro</p></html>
> \ No newline at end of file
>
> Modified: platform/core/trunk/xwiki-rendering/xwiki-rendering-tests/src/test/resources/macros/macro8.test
> ===================================================================
> --- platform/core/trunk/xwiki-rendering/xwiki-rendering-tests/src/test/resources/macros/macro8.test   2009-03-13 15:43:26 UTC (rev 17617)
> +++ platform/core/trunk/xwiki-rendering/xwiki-rendering-tests/src/test/resources/macros/macro8.test   2009-03-13 15:50:43 UTC (rev 17618)
> @@ -17,7 +17,9 @@
> Â onWord [Not an inline macro]
> Â endXMLNode [span] [class=xwikirenderingerror]
> Â beginXMLNode [span] [class=xwikirenderingerrordescription hidden]
> +beginXMLNode [pre]
> Â onWord [This macro can only be used by itself on a new line]
> +endXMLNode [pre]
> Â endXMLNode [span] [class=xwikirenderingerrordescription hidden]
> Â endMacroMarkerInline [testsimplemacro] [] []
> Â onSpace
> @@ -27,7 +29,7 @@
> Â .#-----------------------------------------------------
> Â .expect|xhtml/1.0
> Â .#-----------------------------------------------------
> -<p>Not inline <!--startmacro:testsimplemacro|-||-|--><span class="xwikirenderingerror">Not an inline macro</span><span class="xwikirenderingerrordescription hidden">This macro can only be used by itself on a new line</span><!--stopmacro--> macro</p>
> +<p>Not inline <!--startmacro:testsimplemacro|-||-|--><span class="xwikirenderingerror">Not an inline macro</span><span class="xwikirenderingerrordescription hidden"><pre>This macro can only be used by itself on a new line</pre></span><!--stopmacro--> macro</p>
> Â .#-----------------------------------------------------
> Â .expect|xwiki/2.0
> Â .#-----------------------------------------------------
> @@ -35,4 +37,4 @@
> Â .#-----------------------------------------------------
> Â .input|xhtml/1.0
> Â .#-----------------------------------------------------
> -<html><p>Not inline <!--startmacro:testsimplemacro|-||-|--><span class="xwikirenderingerror">Not an inline macro</span><span class="xwikirenderingerrordescription hidden">This macro can only be used by itself on a new line</span><!--stopmacro--> macro</p></html>
> \ No newline at end of file
> +<html><p>Not inline <!--startmacro:testsimplemacro|-||-|--><span class="xwikirenderingerror">Not an inline macro</span><span class="xwikirenderingerrordescription hidden"><pre>This macro can only be used by itself on a new line</pre></span><!--stopmacro--> macro</p></html>
> \ No newline at end of file
>
> Modified: platform/core/trunk/xwiki-rendering/xwiki-rendering-tests/src/test/resources/macros/macro9.test
> ===================================================================
> --- platform/core/trunk/xwiki-rendering/xwiki-rendering-tests/src/test/resources/macros/macro9.test   2009-03-13 15:43:26 UTC (rev 17617)
> +++ platform/core/trunk/xwiki-rendering/xwiki-rendering-tests/src/test/resources/macros/macro9.test   2009-03-13 15:50:43 UTC (rev 17618)
> @@ -15,7 +15,9 @@
> Â onWord [Failed to execute macro: testfailingmacro]
> Â endXMLNode [span] [class=xwikirenderingerror]
> Â beginXMLNode [span] [class=xwikirenderingerrordescription hidden]
> +beginXMLNode [pre]
> Â onWord [stack trace here]
> +endXMLNode [pre]
> Â endXMLNode [span] [class=xwikirenderingerrordescription hidden]
> Â endMacroMarkerInline [testfailingmacro] [] []
> Â onSpace
> @@ -25,7 +27,7 @@
> Â .#-----------------------------------------------------
> Â .expect|xhtml/1.0
> Â .#-----------------------------------------------------
> -<p>Execution <!--startmacro:testfailingmacro|-||-|--><span class="xwikirenderingerror">Failed to execute macro: testfailingmacro</span><span class="xwikirenderingerrordescription hidden">stack trace here</span><!--stopmacro--> error</p>
> +<p>Execution <!--startmacro:testfailingmacro|-||-|--><span class="xwikirenderingerror">Failed to execute macro: testfailingmacro</span><span class="xwikirenderingerrordescription hidden"><pre>stack trace here</pre></span><!--stopmacro--> error</p>
> Â .#-----------------------------------------------------
> Â .expect|xwiki/2.0
> Â .#-----------------------------------------------------
> @@ -33,4 +35,4 @@
> Â .#-----------------------------------------------------
> Â .input|xhtml/1.0
> Â .#-----------------------------------------------------
> -<html><p>Execution <!--startmacro:testfailingmacro|-||-|--><span class="xwikirenderingerror">Failed to execute macro: testfailingmacro</span><span class="xwikirenderingerrordescription hidden">stack trace here</span><!--stopmacro--> error</p></html>
> \ No newline at end of file
> +<html><p>Execution <!--startmacro:testfailingmacro|-||-|--><span class="xwikirenderingerror">Failed to execute macro: testfailingmacro</span><span class="xwikirenderingerrordescription hidden"><pre>stack trace here</pre></span><!--stopmacro--> error</p></html>
> \ No newline at end of file
>
> _______________________________________________
> notifications mailing list
> notifications(a)xwiki.org
> http://lists.xwiki.org/mailman/listinfo/notifications
>
--
Thomas Mortagne
Hi Sergiu,
On Mar 13, 2009, at 12:38 AM, sdumitriu (SVN) wrote:
> Author: sdumitriu
> Date: 2009-03-13 00:38:08 +0100 (Fri, 13 Mar 2009)
> New Revision: 17602
>
> Modified:
> platform/core/trunk/xwiki-cache/xwiki-cache-tests/src/main/java/
> org/xwiki/cache/tests/AbstractTestCache.java
> platform/core/trunk/xwiki-containers/xwiki-container-api/src/main/
> java/org/xwiki/container/ApplicationContext.java
> platform/core/trunk/xwiki-containers/xwiki-container-portlet/src/
> main/java/org/xwiki/container/portlet/PortletApplicationContext.java
> platform/core/trunk/xwiki-containers/xwiki-container-servlet/src/
> main/java/org/xwiki/container/servlet/ServletApplicationContext.java
> platform/core/trunk/xwiki-core/src/test/java/com/xpn/xwiki/test/
> TestApplicationContext.java
> Log:
> XWIKI-3312: Add a getTemporaryDirectory() method to ApplicationContext
> Done.
> Patch submitted by Dan Miron, enhanced and extended.
>
>
> Modified: platform/core/trunk/xwiki-cache/xwiki-cache-tests/src/main/
> java/org/xwiki/cache/tests/AbstractTestCache.java
> ===================================================================
> --- platform/core/trunk/xwiki-cache/xwiki-cache-tests/src/main/java/
> org/xwiki/cache/tests/AbstractTestCache.java 2009-03-12 23:03:56 UTC
> (rev 17601)
> +++ platform/core/trunk/xwiki-cache/xwiki-cache-tests/src/main/java/
> org/xwiki/cache/tests/AbstractTestCache.java 2009-03-12 23:38:08 UTC
> (rev 17602)
> @@ -19,6 +19,7 @@
> */
> package org.xwiki.cache.tests;
>
> +import java.io.File;
> import java.io.InputStream;
> import java.net.MalformedURLException;
> import java.net.URL;
> @@ -130,6 +131,21 @@
> }
>
> /**
> + * {@inheritDoc}
> + *
> + * @see
> org.xwiki.container.ApplicationContext#getTemporaryDirectory()
> + */
> + public File getTemporaryDirectory()
> + {
> + try {
> + // The system temporary directory is a good place for
> temporary test data.
> + return new File(System.getProperty("java.io.tmpdir"));
> + } catch (SecurityException e) {
> + return new File(".");
> + }
> + }
I don't understand why you had to modify the cache module.
> +
> + /**
> * @return a instance of the cache factory.
> * @throws Exception error when searching for cache factory
> component.
> */
>
> Modified: platform/core/trunk/xwiki-containers/xwiki-container-api/
> src/main/java/org/xwiki/container/ApplicationContext.java
> ===================================================================
> --- platform/core/trunk/xwiki-containers/xwiki-container-api/src/
> main/java/org/xwiki/container/ApplicationContext.java 2009-03-12
> 23:03:56 UTC (rev 17601)
> +++ platform/core/trunk/xwiki-containers/xwiki-container-api/src/
> main/java/org/xwiki/container/ApplicationContext.java 2009-03-12
> 23:38:08 UTC (rev 17602)
> @@ -20,6 +20,7 @@
> */
> package org.xwiki.container;
>
> +import java.io.File;
> import java.io.InputStream;
> import java.net.MalformedURLException;
> import java.net.URL;
> @@ -27,5 +28,15 @@
> public interface ApplicationContext
> {
> InputStream getResourceAsStream(String resourceName);
> +
> URL getResource(String resourceName) throws MalformedURLException;
> +
> + /**
> + * Gets the directory which the container must provide for
> storing temporary data. The contents of this directory
> + * may be deleted between container restarts (<em>temporary</
> em>, as the name implies), so it is not a safe place to
> + * store permanent/important data.
> + *
> + * @return a {@link File} object pointing to a directory that
> the application can use for storing temporary files
> + */
> + File getTemporaryDirectory();
I don't like this too much but it's ok for now. However I don't think
this is a good generic solution for the future. I think it would be
better to implement a temporary storage that uses the same storage api
as the other storages (main storage, version storage, attachment
storage, etc). The pb with returning a File is that 1) it ties us to a
disk storage which might not be available in all environments for
various reasons and 2) it's not extensible and you cannot swap another
implementation (like it you want to use a memory storage for example).
For this we need the new storage/model of course which is why it's ok
to have this now.
WDYT?
Thanks
-Vincent
Dear all,
Restlet uses as its logging system the Java Logging System provided
with the JDK.
So in order to vary its verbosity it's needed to configure that system
by providing a logging.properties like the one located in the JRE/lib.
This properties file is ether passed as a system property through a -D
parameter to the JVM, or explicitly loaded and set using
LogManager.getLogManager().readConfiguration();
In order load this configuration file I did the following: I placed a
logging.properties file in WEB-INF and loaded it in the init() method
of a subclass of the Restlet Servlet.
Now there are several possibilities wrt to where to place the
logging.properties and how to actually name it.
1) WEB-INF/logging.properties
2) The resources of the REST module
3) XWiki Core.
I am +1 for 1 (maybe we can call it java-logging.properties)
WDYT?
Cheers,
Fabio