When I was looking for places where hasProgrammingRights is called, I found calls to
c.x.x.api.Context.get() in the templates. I discovered that there is code in the templates which
implicitly calls $xcontext.get('something') by calling $xcontext.something where there is no
function Context.getSomething(). Since this is so easy and there is no way to know that anything is
wrong since Context.get() returns null if you don't have PR, I am proposing that we do away with the
practice of implicitly referring to functions in $context entirely.
I used the following command to find implicit context references and I have filled in the mappings
which I determined manually
user@debo8:~/wrk/xwiki.clone/xwiki/platform/web/trunk/standard/src/main/webapp/templates$ find ./
-name '*.vm' -exec grep '$xcontext\.[a-zA-Z0-9]*[^a-zA-Z0-9\(]' {} \; | sed -n -e
's/\($xcontext\.[a-zA-Z0-9]*[^a-zA-Z0-9(]\)/\n\1\n/p' | grep '^$xcontext' | sort
$xcontext.action=
$xcontext.action=
$xcontext.action=
$xcontext.action
$xcontext.action
$xcontext.action
$xcontext.action
$xcontext.action
$xcontext.action
$xcontext.action
$xcontext.action,
$xcontext.action,
$xcontext.action,
$xcontext.action,
$xcontext.action,
$xcontext.action,
$xcontext.action,
$xcontext.action,
$xcontext.action,
$xcontext.action,
$xcontext.action,
$xcontext.action,
$xcontext.action.
$xcontext.action)
^-- maps to Context.getAction()
$xcontext.database
$xcontext.database)
$xcontext.database)
$xcontext.database)
$xcontext.database)
$xcontext.database)
$xcontext.database)
^-- maps to Context.getDatabase()
$xcontext.language"
$xcontext.language"
$xcontext.language"
^-- maps to Context.getLanguage()
$xcontext.tocData
^-- this line is broken entirely, it maps to context.get('tocData') but the line is:
#set ($xcontext.tocData = $tocData) which is simply invalid and I can't even figure
out what it would do.
$xcontext.user
$xcontext.user
$xcontext.user
$xcontext.user
$xcontext.user
$xcontext.user
$xcontext.user
$xcontext.user
$xcontext.user
$xcontext.user
$xcontext.user
$xcontext.user,
$xcontext.user,
$xcontext.user,
$xcontext.user,
$xcontext.user,
$xcontext.user,
$xcontext.user,
$xcontext.user,
$xcontext.user,
$xcontext.user,
$xcontext.user,
$xcontext.user,
$xcontext.user,
$xcontext.user.
$xcontext.user.
$xcontext.user.
$xcontext.user"
$xcontext.user"
$xcontext.user)
$xcontext.user)
$xcontext.user)
$xcontext.user)
$xcontext.user)
^-- Maps to $xcontext.getUser()
$xcontext.wiki,
$xcontext.wiki,
$xcontext.wiki,
^-- Maps to $xcontext.get('wiki') I think this is the source of most of the messages and since it
appears to be relatively new code, it convinces me that the $context.blah pattern is simply
unsafe and should be abandoned at least for the xcontext object.
I would like to fix these now and establish a best practice of avoiding the use of these in the
future for $xcontext. I myself avoid this pattern entirely but I do not have a compelling reason to
propose it as a best practice except for $context.
WDYT?
Caleb
Hi Thomas,
FYI the build is failing on the xwiki10 parser syntax tests (links3.test):
junit.framework.ComparisonFailure: null
Expected :[[http:~~/~~/reference>>reference]] [[*not bold*>>reference]]
Actual :[[http:~~/~~/reference>>reference]] [[**not bold**>>reference]]
at org.xwiki.rendering.scaffolding.RenderingTestCase.runTestInternal(RenderingTestCase.java:159)
at org.xwiki.rendering.scaffolding.RenderingTestCase.runTest(RenderingTestCase.java:106)
at org.jmock.core.VerifyingTestCase.runBare(VerifyingTestCase.java:39)
at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
Seems like non bold is transformed into bold now.
Any ide?
Thanks
-Vincent
Hi Sergiu,
On Feb 26, 2011, at 12:00 AM, sdumitriu (SVN) wrote:
> Author: sdumitriu
> Date: 2011-02-26 00:00:44 +0100 (Sat, 26 Feb 2011)
> New Revision: 34960
>
> Added:
> platform/core/trunk/xwiki-eventstream/
> platform/core/trunk/xwiki-eventstream/pom.xml
> platform/core/trunk/xwiki-eventstream/src/
> platform/core/trunk/xwiki-eventstream/src/main/
> platform/core/trunk/xwiki-eventstream/src/main/java/
> platform/core/trunk/xwiki-eventstream/src/main/java/org/
> platform/core/trunk/xwiki-eventstream/src/main/java/org/xwiki/
> platform/core/trunk/xwiki-eventstream/src/main/java/org/xwiki/eventstream/
> platform/core/trunk/xwiki-eventstream/src/main/java/org/xwiki/eventstream/Event.java
> platform/core/trunk/xwiki-eventstream/src/main/java/org/xwiki/eventstream/EventFactory.java
> platform/core/trunk/xwiki-eventstream/src/main/java/org/xwiki/eventstream/EventGroup.java
> platform/core/trunk/xwiki-eventstream/src/main/java/org/xwiki/eventstream/EventStream.java
> platform/core/trunk/xwiki-eventstream/src/main/java/org/xwiki/eventstream/internal/
> platform/core/trunk/xwiki-eventstream/src/main/java/org/xwiki/eventstream/internal/DefaultEvent.java
> platform/core/trunk/xwiki-eventstream/src/main/java/org/xwiki/eventstream/internal/DefaultEventFactory.java
> platform/core/trunk/xwiki-eventstream/src/main/resources/
> platform/core/trunk/xwiki-eventstream/src/main/resources/META-INF/
> platform/core/trunk/xwiki-eventstream/src/main/resources/META-INF/components.txt
> platform/core/trunk/xwiki-eventstream/src/test/
> platform/core/trunk/xwiki-eventstream/src/test/java/
> platform/core/trunk/xwiki-eventstream/src/test/java/org/
> platform/core/trunk/xwiki-eventstream/src/test/java/org/xwiki/
> platform/core/trunk/xwiki-eventstream/src/test/java/org/xwiki/eventstream/
> platform/core/trunk/xwiki-eventstream/src/test/java/org/xwiki/eventstream/EventAndFactoryTest.java
> platform/core/trunk/xwiki-eventstream/src/test/java/org/xwiki/eventstream/EventGroupTest.java
> Modified:
> platform/core/trunk/pom.xml
> Log:
> XWIKI-6047: New EventStream component
That was new to me. Was this discussed (it's possible I missed a mail on the list)?
From the jira it seems this module is meant to be a replacement of the ActivityStream plugin, right? If so what's the strategy to replace it (timing, backward compat, etc)?
There seems to be a notion of Event similar to that of the Observation module.
Maybe Event is not the right term here seems the javadoc says "A recorded event that happened at some point in the wiki". Maybe something like ArchiveEvent, PastEvent, SavedEvent, etc And maybe these events should extend the Observation Event and add new fields (date, etc)? Or maybe it's better to not extend but have a field that is the original Observation Event object? Or maybe not and it's better to have no relationship to the Observation module to be independent? In any case this should probably be discussed/explained.
Maybe the Obervation module should be split in one more submodule called xwiki-observation-store or xwiki-observation-history? It seems to me this could be about historizing the events sent by the Observation managed.
To be honest, I haven't really thought about it enough (would need to load the code in my IDE).
I find that this commit happens quite late in the release cycle (3 days before end of milestone) and would have warranted some earlier discussion.
It's ok, I'm not asking to rollback, just saying that something this important from an architecture point of view should rather be done earlier and discussed.
Thanks
-Vincent
On Fri, Feb 25, 2011 at 4:27 AM, jvelociter
<platform-notifications(a)xwiki.org> wrote:
> Author: jvelociter
> Date: 2011-02-25 04:27:58 +0100 (Fri, 25 Feb 2011)
> New Revision: 34925
>
> Added:
> Â platform/web/trunk/standard/src/main/webapp/resources/uicomponents/search/searchSuggest.js
> Â platform/xwiki-applications/trunk/search/src/main/resources/XWiki/SearchSuggestConfig.xml
> Â platform/xwiki-applications/trunk/search/src/main/resources/XWiki/SearchSuggestConfigSheet.xml
> Â platform/xwiki-applications/trunk/search/src/main/resources/XWiki/SearchSuggestLuceneService.xml
> Â platform/xwiki-applications/trunk/search/src/main/resources/XWiki/SearchSuggestSourceClass.xml
> Modified:
> Â platform/core/trunk/xwiki-core/src/main/resources/ApplicationResources.properties
> Â platform/web/trunk/standard/src/main/webapp/templates/javascript.vm
> Log:
> XASEARCH-22 Support for multi-sources live suggestions when typing in the search box
> XWIKI-6044 Resources for the search suggest feature of search application
>
> First iteration on the "search suggest" feature.
>
> It's not completely finished, though it's functional. It's not activated by default yet, you can go and activate it in the administration in order to test.
>
> Remains to do :
>
> * Fully internationalize
> * Improve suggestion display (show both document title AND document full name)
> * Shortcut to open suggestions pages in edit mode (replace jump to page functionnality)
> * Other tuning
* Search on both name and title for the document name source
* Fix the attachment name source that does not seem to work
* Filter on blacklisted spaces for non-advanced users
Jerome.
>
> Feedback very welcome.
>
>
>
> Modified: platform/core/trunk/xwiki-core/src/main/resources/ApplicationResources.properties
> ===================================================================
> --- platform/core/trunk/xwiki-core/src/main/resources/ApplicationResources.properties  2011-02-25 02:31:38 UTC (rev 34924)
> +++ platform/core/trunk/xwiki-core/src/main/resources/ApplicationResources.properties  2011-02-25 03:27:58 UTC (rev 34925)
> @@ -2980,6 +2980,7 @@
> Â dashboard.actions.add.failed=Failed to add gadget:
>
> Â # Search application resources
> +admin.searchsuggest=Search Suggest
> Â admin.search=Search
> Â admin.search.description=Choose the default search engine or configure the Lucene index.
> Â search.admin.title=Search
>
> Added: platform/web/trunk/standard/src/main/webapp/resources/uicomponents/search/searchSuggest.js
> ===================================================================
> --- platform/web/trunk/standard/src/main/webapp/resources/uicomponents/search/searchSuggest.js              (rev 0)
> +++ platform/web/trunk/standard/src/main/webapp/resources/uicomponents/search/searchSuggest.js  2011-02-25 03:27:58 UTC (rev 34925)
> @@ -0,0 +1,213 @@
> +var XWiki = (function (XWiki) {
> +
> + Â /**
> + Â * The search suggest hooks itself on the search input and provide live results as the user types.
> + Â * Search form validation is not affected (user can still type enter and get to the regular search result page)
> + Â */
> + Â XWiki.SearchSuggest = Class.create({
> +
> + Â Â /**
> + Â Â Â * Constructor. Prepares a light modal container on the same model as the modalPopup
> + Â Â Â * and registers event listerners.
> + Â Â Â */
> + Â Â initialize: function(searchInput, sources){
> +
> + Â Â Â this.sources = sources;
> +
> + Â Â Â this.realSearchInput = $(searchInput);
> +
> + Â Â Â this.modalContainer = new Element('div', {'class': 'xdialog-modal-container'}).hide();
> + Â Â Â var screen = new Element('div', {'class': 'xdialog-screen'}).setStyle({
> + Â Â Â Â opacity : 0.35,
> + Â Â Â Â backgroundColor : "#000000"
> + Â Â Â });
> + Â Â Â this.modalContainer.insert(screen);
> + Â Â Â this.modalContainer.insert(new Element('div', {'id' : 'searchSuggest'}));
> + Â Â Â document.body.appendChild(this.modalContainer);
> +
> + Â Â Â document.observe("xwiki:suggest:clearSuggestions", this.onClearSuggestions.bindAsEventListener(this));
> + Â Â Â document.observe("xwiki:suggest:containerCreated", this.onSuggestContainerCreated.bindAsEventListener(this));
> + Â Â Â document.observe("xwiki:suggest:containerPrepared", this.onSuggestContainerPrepared.bindAsEventListener(this));
> + Â Â Â document.observe("xwiki:suggest:selected", this.onSuggestionSelected.bindAsEventListener(this));
> +
> + Â Â Â this.createSuggest();
> + Â Â },
> +
> + Â Â /**
> + Â Â * Callback triggered when the original suggest clears its suggestions.
> + Â Â */
> + Â Â onClearSuggestions: function(event){
> + Â Â Â if (event.memo.suggest == this.suggest) {
> + Â Â Â Â this.modalContainer.hide();
> + Â Â Â Â this.devirtualizeSearchInput();
> + Â Â Â }
> + Â Â },
> +
> + Â Â /**
> + Â Â * Callback triggered when the original suggest has prepared its results container.
> + Â Â */
> + Â Â onSuggestContainerPrepared: function(event){
> + Â Â Â if (event.memo.suggest == this.suggest && event.memo.suggest == this.suggest) {
> + Â Â Â Â this.modalContainer.show();
> + Â Â Â Â this.virtualizeSearchInput();
> + Â Â Â }
> + Â Â },
> +
> + Â Â /**
> + Â Â * Callback triggered when a suggestion is selected.
> + Â Â * Submits the form or go to a selected page according to selection.
> + Â Â */
> + Â Â onSuggestionSelected: function(event) {
> + Â Â Â if (event.memo.suggest = this.suggest) {
> + Â Â Â Â event.stop();
> + Â Â Â Â this.onClearSuggestions(event);
> + Â Â Â Â this.virtualSearchInput.value = event.memo.value;
> + Â Â Â Â if (!event.memo.id) {
> + Â Â Â Â Â // Submit form
> + Â Â Â Â Â this.realSearchInput.up('form').submit();
> + Â Â Â Â }
> + Â Â Â Â else {
> + Â Â Â Â Â // Go to page
> + Â Â Â Â Â window.location = event.memo.id;;
> + Â Â Â Â }
> + Â Â Â }
> + Â Â },
> +
> + Â Â /**
> + Â Â * Creates the underlaying suggest widget.
> + Â Â */
> + Â Â createSuggest: function() {
> + Â Â Â // Create dummy suggestion node to hold the "Show all results" option
> + Â Â Â var valueNode = new Element('div')
> + Â Â Â Â Â Â .insert(new Element('span', {'class':'suggestId'}))
> + Â Â Â Â Â Â .insert(new Element('span', {'class':'suggestValue'}))
> + Â Â Â Â Â Â .insert(new Element('span', {'class':'suggestInfo'}))
> + Â Â Â var allResultsNode = new XWiki.widgets.XList([
> + Â Â Â Â new XWiki.widgets.XListItem( "Show all results...", {
> + Â Â Â Â Â 'containerClasses': 'suggestItem',
> + Â Â Â Â Â 'classes': 'showAllResuts',
> + Â Â Â Â Â 'eventCallbackScope' : this,
> + Â Â Â Â Â 'noHighlight' : true,
> + Â Â Â Â Â 'value' : valueNode
> + Â Â Â Â } ),
> + Â Â Â ],
> + Â Â Â {
> + Â Â Â Â 'classes' : 'suggestList',
> + Â Â Â Â 'eventListeners' : {
> + Â Â Â Â Â 'click': function(event){
> + Â Â Â Â Â Â this.devirtualizeSearchInput();
> + Â Â Â Â Â Â this.realSearchInput.up('form').submit();
> + Â Â Â Â Â },
> + Â Â Â Â Â 'mouseover':function(event){
> + Â Â Â Â Â Â this.suggest.clearHighlight();
> + Â Â Â Â Â Â this.suggest.iHighlighted = event.element();
> + Â Â Â Â Â Â event.element().addClassName('xhighlight');
> + Â Â Â Â Â }
> + Â Â Â Â }
> + Â Â Â });
> + Â Â Â this.suggest = new XWiki.widgets.Suggest( this.realSearchInput, {
> + Â Â Â Â parentContainer: $('searchSuggest'),
> + Â Â Â Â className: 'ajaxsuggest searchSuggest',
> + Â Â Â Â fadeOnClear:false,
> + Â Â Â Â align: "right",
> + Â Â Â Â minchars: 3,
> + Â Â Â Â sources : this.sources,
> + Â Â Â Â insertBeforeSuggestions : new Element("div", {'class' : 'results'}).update(allResultsNode.getElement())
> + Â Â Â });
> + Â Â },
> +
> + Â Â /**
> + Â Â * Add a "virtual" search input on top of the original one, so that it appears on top of the modal container.
> + Â Â */
> + Â Â virtualizeSearchInput: function(){
> + Â Â Â if (!this.isVirtual) {
> + Â Â Â Â this.isVirtual = true;
> + Â Â Â Â this.virtualSearchInput.value = this.realSearchInput.value;
> + Â Â Â Â this.virtualSearchInput.show();
> + Â Â Â Â this.virtualSearchInput.focus();
> + Â Â Â Â this.suggest.setInputField(this.virtualSearchInput);
> + Â Â Â }
> + Â Â },
> +
> + Â Â /**
> + Â Â * Hides the virtual search input
> + Â Â */
> + Â Â devirtualizeSearchInput: function(){
> + Â Â Â this.realSearchInput.value = this.virtualSearchInput.value;
> + Â Â Â this.realSearchInput.focus();
> + Â Â Â this.suggest.setInputField(this.realSearchInput);
> + Â Â Â this.isVirtual = false;
> + Â Â },
> +
> + Â Â /**
> + Â Â * Callback triggered when the original suggest has created its results container.
> + Â Â */
> + Â Â onSuggestContainerCreated: function(event){
> + Â Â Â if (event.memo.suggest == this.suggest) {
> + Â Â Â Â var container = event.memo.container;
> + Â Â Â Â this.modalContainer.show();
> + Â Â Â Â this.virtualSearchInput = this.realSearchInput.clone();
> + Â Â Â Â this.virtualSearchInput.id = this.realSearchInput.id + '-virtual';
> + Â Â Â Â this.virtualSearchInput.clonePosition(container, { setWidth : false });
> + Â Â Â Â $('searchSuggest').insert(this.virtualSearchInput);
> + Â Â Â Â this.virtualSearchInput.setStyle({position : 'absolute'});
> + Â Â Â Â this.virtualSearchInput.setStyle({
> + Â Â Â Â Â top : (this.virtualSearchInput.cumulativeOffset().top - this.realSearchInput.getHeight()) + 'px',
> + Â Â Â Â Â position:'absolute'
> + Â Â Â Â });
> +
> + Â Â Â Â if (Prototype.Browser.IE || Prototype.Browser.WebKit) {
> + Â Â Â Â Â this.virtualSearchInput.observe("keydown", this.onKeyPress.bindAsEventListener(this));
> + Â Â Â Â } else {
> + Â Â Â Â Â this.virtualSearchInput.observe("keypress", this.onKeyPress.bindAsEventListener(this));
> + Â Â Â Â }
> + Â Â Â }
> + Â Â },
> +
> + Â /**
> + Â Â * Callback triggered when a key has been typed on the virtual input.
> + Â Â */
> + Â onKeyPress: function(event){
> + Â Â var key = event.keyCode;
> + Â Â switch(key) {
> + Â Â Â // Ignore special keys, which are treated in onKeyPress
> + Â Â Â case Event.KEY_RETURN:
> + Â Â Â Â if (!this.suggest.hasActiveSelection()) {
> + Â Â Â Â Â this.devirtualizeSearchInput();
> + Â Â Â Â Â event.stop();
> + Â Â Â Â Â this.realSearchInput.up('form').submit();
> + Â Â Â Â }
> + Â Â Â default:
> + Â Â }
> + Â }
> +
> + Â });
> +
> + Â return XWiki;
> +
> +})(XWiki);
> +
> +document.observe("dom:loaded", function(){
> +
> + Â var sources = [
> + Â ## Iterate over the sources defined in the configuration document, and create a source array to be passed to the
> + Â ## search suggest contructor.
> + Â #set($sourceDocument = $xwiki.getDocument("XWiki.SearchSuggestConfig"))
> + Â #foreach($source in $sourceDocument.getObjects('XWiki.SearchSuggestSourceClass'))
> + Â Â #if($source.getProperty('activated').value == 1)
> + Â Â {
> + Â Â Â name : "$escapetool.javascript($source.display('name','view'))",
> + Â Â Â varname : 'input',
> + Â Â Â script : "#evaluate($source.getProperty('url').value)&query=$source.getProperty('query').value&nb=$source.getProperty('resultsNumber').value&",
> + Â Â Â icon : "#evaluate($source.getProperty('icon').value)",
> + Â Â Â highlight: #if($source.getProperty('highlight').value == 1) true #else false #end
> + Â Â },
> + Â Â #end
> + Â #end
> +   null  // Don't handle last coma. This is going to be compated anyway.
> + Â ].compact()
> +
> + Â new XWiki.SearchSuggest($('headerglobalsearchinput'), sources);
> +
> +});
> +
>
> Modified: platform/web/trunk/standard/src/main/webapp/templates/javascript.vm
> ===================================================================
> --- platform/web/trunk/standard/src/main/webapp/templates/javascript.vm 2011-02-25 02:31:38 UTC (rev 34924)
> +++ platform/web/trunk/standard/src/main/webapp/templates/javascript.vm 2011-02-25 03:27:58 UTC (rev 34925)
> @@ -21,6 +21,27 @@
> Â $xwiki.ssfx.use('uicomponents/widgets/notification.css', true)
> Â $xwiki.jsfx.use('uicomponents/widgets/list/xlist.js')
> Â $xwiki.jsfx.use('uicomponents/suggest/suggest.js')
> +#if($xwiki.exists('XWiki.SearchSuggestConfig'))
> + Â ## Hook to request the search suggest script if search suggest configuration is present.
> + Â ## We can't just have it as a always-use SSX yet since we compute a hash to be sure to refresh
> + Â ## the file when the configuration changes.
> + Â ## Ideally, this code should be located in a interface extension, in the search application.
> + Â #set($searchSuggestConfigDocument = $xwiki.getDocument('XWiki.SearchSuggestConfig'))
> + Â #set($searchSuggestConfigObject = $searchSuggestConfigDocument.getObject('XWiki.SearchSuggestConfig'))
> + Â #if($searchSuggestConfigObject.getProperty('activated').value == 1)
> + Â #set($searchSuggestConfigHash = '')
> + Â #foreach($source in $searchSuggestConfigDocument.getObjects('XWiki.SearchSuggestSourceClass'))
> + Â Â #if($source.getProperty('activated').value == 1)
> + Â Â Â #set($sourceId = "${source.get('name')}:${source.get('url')}:${source.get('highlight')}:${source.get('icon')}}")
> + Â Â Â #set($searchSuggestConfigHash = "${searchSuggestConfigHash}|${sourceId}")
> + Â Â #end
> + Â #end
> + Â $xwiki.jsfx.use('uicomponents/search/searchSuggest.js', {
> + Â Â 'forceSkinAction' : true,
> + Â Â 'h' : $searchSuggestConfigHash.hashCode()
> + Â })
> + Â #end
> +#end
> Â <script type="text/javascript" src="$xwiki.getSkinFile("js/prototype/prototype.js")"></script>
> Â <script type="text/javascript" src="$xwiki.getSkinFile("js/xwiki/xwiki.js", true)"></script>
> Â <script type="text/javascript">
>
> Added: platform/xwiki-applications/trunk/search/src/main/resources/XWiki/SearchSuggestConfig.xml
> ===================================================================
> --- platform/xwiki-applications/trunk/search/src/main/resources/XWiki/SearchSuggestConfig.xml              (rev 0)
> +++ platform/xwiki-applications/trunk/search/src/main/resources/XWiki/SearchSuggestConfig.xml  2011-02-25 03:27:58 UTC (rev 34925)
> @@ -0,0 +1,960 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<xwikidoc>
> +<web>XWiki</web>
> +<name>SearchSuggestConfig</name>
> +<language></language>
> +<defaultLanguage>en</defaultLanguage>
> +<translation>0</translation>
> +<parent>XWiki.SearchCode</parent>
> +<creator>XWiki.Admin</creator>
> +<author>XWiki.Admin</author>
> +<customClass></customClass>
> +<contentAuthor>XWiki.Admin</contentAuthor>
> +<creationDate>1280310893000</creationDate>
> +<date>1298601876000</date>
> +<contentUpdateDate>1298601876000</contentUpdateDate>
> +<version>1.1</version>
> +<title>Search Suggest Configuration</title>
> +<template></template>
> +<defaultTemplate></defaultTemplate>
> +<validationScript></validationScript>
> +<comment></comment>
> +<minorEdit>false</minorEdit>
> +<syntaxId>xwiki/2.0</syntaxId>
> +<hidden>false</hidden>
> +<class>
> +<name>XWiki.SearchSuggestConfig</name>
> +<customClass></customClass>
> +<customMapping></customMapping>
> +<defaultViewSheet></defaultViewSheet>
> +<defaultEditSheet></defaultEditSheet>
> +<defaultWeb></defaultWeb>
> +<nameField></nameField>
> +<validationScript></validationScript>
> +<activated>
> +<disabled>0</disabled>
> +<displayFormType>select</displayFormType>
> +<name>activated</name>
> +<number>1</number>
> +<prettyName>activated</prettyName>
> +<unmodifiable>0</unmodifiable>
> +<classType>com.xpn.xwiki.objects.classes.BooleanClass</classType>
> +</activated>
> +</class>
> +<object>
> +<class>
> +<name>XWiki.ConfigurableClass</name>
> +<customClass></customClass>
> +<customMapping></customMapping>
> +<defaultViewSheet></defaultViewSheet>
> +<defaultEditSheet></defaultEditSheet>
> +<defaultWeb></defaultWeb>
> +<nameField></nameField>
> +<validationScript></validationScript>
> +<codeToExecute>
> +<disabled>0</disabled>
> +<editor>---</editor>
> +<name>codeToExecute</name>
> +<number>7</number>
> +<picker>0</picker>
> +<prettyName>codeToExecute</prettyName>
> +<rows>5</rows>
> +<size>40</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.TextAreaClass</classType>
> +</codeToExecute>
> +<configurationClass>
> +<disabled>0</disabled>
> +<name>configurationClass</name>
> +<number>3</number>
> +<picker>0</picker>
> +<prettyName>configurationClass</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</configurationClass>
> +<configureGlobally>
> +<defaultValue></defaultValue>
> +<disabled>0</disabled>
> +<displayFormType>checkbox</displayFormType>
> +<displayType></displayType>
> +<name>configureGlobally</name>
> +<number>4</number>
> +<prettyName>configureGlobally</prettyName>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.BooleanClass</classType>
> +</configureGlobally>
> +<displayInSection>
> +<disabled>0</disabled>
> +<name>displayInSection</name>
> +<number>1</number>
> +<picker>0</picker>
> +<prettyName>displayInSection</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</displayInSection>
> +<heading>
> +<disabled>0</disabled>
> +<name>heading</name>
> +<number>2</number>
> +<picker>0</picker>
> +<prettyName>heading</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</heading>
> +<iconAttachment>
> +<disabled>0</disabled>
> +<name>iconAttachment</name>
> +<number>8</number>
> +<picker>0</picker>
> +<prettyName>iconAttachment</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</iconAttachment>
> +<linkPrefix>
> +<disabled>0</disabled>
> +<name>linkPrefix</name>
> +<number>5</number>
> +<picker>0</picker>
> +<prettyName>linkPrefix</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</linkPrefix>
> +<propertiesToShow>
> +<cache>0</cache>
> +<disabled>0</disabled>
> +<displayType>input</displayType>
> +<multiSelect>1</multiSelect>
> +<name>propertiesToShow</name>
> +<number>6</number>
> +<picker>0</picker>
> +<prettyName>propertiesToShow</prettyName>
> +<relationalStorage>1</relationalStorage>
> +<separator> </separator>
> +<separators> ,|</separators>
> +<size>20</size>
> +<sort>none</sort>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<values></values>
> +<classType>com.xpn.xwiki.objects.classes.StaticListClass</classType>
> +</propertiesToShow>
> +</class>
> +<name>XWiki.SearchSuggestConfig</name>
> +<number>0</number>
> +<className>XWiki.ConfigurableClass</className>
> +<guid>322238f5-c742-43ed-81e0-ba169fc05653</guid>
> +<property>
> +<codeToExecute>[[Configure the suggest sources>>XWiki.SearchSuggestConfig]]</codeToExecute>
> +</property>
> +<property>
> +<configurationClass>XWiki.SearchSuggestConfig</configurationClass>
> +</property>
> +<property>
> +<configureGlobally>1</configureGlobally>
> +</property>
> +<property>
> +<displayInSection>searchSuggest</displayInSection>
> +</property>
> +<property>
> +<heading>Search Suggest</heading>
> +</property>
> +<property>
> +<iconAttachment></iconAttachment>
> +</property>
> +<property>
> +<linkPrefix></linkPrefix>
> +</property>
> +<property>
> +<propertiesToShow>
> +<value>activated</value>
> +</propertiesToShow>
> +</property>
> +</object>
> +<object>
> +<class>
> +<name>XWiki.SearchSuggestConfig</name>
> +<customClass></customClass>
> +<customMapping></customMapping>
> +<defaultViewSheet></defaultViewSheet>
> +<defaultEditSheet></defaultEditSheet>
> +<defaultWeb></defaultWeb>
> +<nameField></nameField>
> +<validationScript></validationScript>
> +<activated>
> +<disabled>0</disabled>
> +<displayFormType>select</displayFormType>
> +<name>activated</name>
> +<number>1</number>
> +<prettyName>activated</prettyName>
> +<unmodifiable>0</unmodifiable>
> +<classType>com.xpn.xwiki.objects.classes.BooleanClass</classType>
> +</activated>
> +</class>
> +<name>XWiki.SearchSuggestConfig</name>
> +<number>0</number>
> +<className>XWiki.SearchSuggestConfig</className>
> +<guid>5faef1df-77ac-4bb3-9dda-8d38447b94e1</guid>
> +<property>
> +<activated>0</activated>
> +</property>
> +</object>
> +<object>
> +<class>
> +<name>XWiki.SearchSuggestSourceClass</name>
> +<customClass></customClass>
> +<customMapping></customMapping>
> +<defaultViewSheet></defaultViewSheet>
> +<defaultEditSheet></defaultEditSheet>
> +<defaultWeb></defaultWeb>
> +<nameField></nameField>
> +<validationScript></validationScript>
> +<activated>
> +<defaultValue></defaultValue>
> +<disabled>0</disabled>
> +<displayFormType>checkbox</displayFormType>
> +<displayType></displayType>
> +<name>activated</name>
> +<number>7</number>
> +<prettyName>activated</prettyName>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.BooleanClass</classType>
> +</activated>
> +<highlight>
> +<defaultValue></defaultValue>
> +<disabled>0</disabled>
> +<displayFormType>checkbox</displayFormType>
> +<displayType></displayType>
> +<name>highlight</name>
> +<number>6</number>
> +<prettyName>highlight</prettyName>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.BooleanClass</classType>
> +</highlight>
> +<icon>
> +<disabled>0</disabled>
> +<name>icon</name>
> +<number>5</number>
> +<picker>0</picker>
> +<prettyName>icon</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</icon>
> +<name>
> +<disabled>0</disabled>
> +<name>name</name>
> +<number>1</number>
> +<picker>0</picker>
> +<prettyName>name</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</name>
> +<query>
> +<disabled>0</disabled>
> +<name>query</name>
> +<number>3</number>
> +<picker>0</picker>
> +<prettyName>query</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</query>
> +<resultsNumber>
> +<disabled>0</disabled>
> +<name>resultsNumber</name>
> +<number>4</number>
> +<picker>0</picker>
> +<prettyName>resultsNumber</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</resultsNumber>
> +<url>
> +<disabled>0</disabled>
> +<name>url</name>
> +<number>2</number>
> +<picker>0</picker>
> +<prettyName>url</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</url>
> +</class>
> +<name>XWiki.SearchSuggestConfig</name>
> +<number>0</number>
> +<className>XWiki.SearchSuggestSourceClass</className>
> +<guid>291d9c6d-b9b1-41b2-8aab-5f1cedba5ded</guid>
> +<property>
> +<activated>1</activated>
> +</property>
> +<property>
> +<highlight>1</highlight>
> +</property>
> +<property>
> +<icon>$xwiki.getSkinFile('icons/silk/page_white_text.gif')</icon>
> +</property>
> +<property>
> +<name>Document name</name>
> +</property>
> +<property>
> +<query>name:__INPUT__*</query>
> +</property>
> +<property>
> +<resultsNumber>3</resultsNumber>
> +</property>
> +<property>
> +<url>$xwiki.getURL('XWiki.SearchSuggestLuceneService', 'get', 'outputSyntax=plain')</url>
> +</property>
> +</object>
> +<object>
> +<class>
> +<name>XWiki.SearchSuggestSourceClass</name>
> +<customClass></customClass>
> +<customMapping></customMapping>
> +<defaultViewSheet></defaultViewSheet>
> +<defaultEditSheet></defaultEditSheet>
> +<defaultWeb></defaultWeb>
> +<nameField></nameField>
> +<validationScript></validationScript>
> +<activated>
> +<defaultValue></defaultValue>
> +<disabled>0</disabled>
> +<displayFormType>checkbox</displayFormType>
> +<displayType></displayType>
> +<name>activated</name>
> +<number>7</number>
> +<prettyName>activated</prettyName>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.BooleanClass</classType>
> +</activated>
> +<highlight>
> +<defaultValue></defaultValue>
> +<disabled>0</disabled>
> +<displayFormType>checkbox</displayFormType>
> +<displayType></displayType>
> +<name>highlight</name>
> +<number>6</number>
> +<prettyName>highlight</prettyName>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.BooleanClass</classType>
> +</highlight>
> +<icon>
> +<disabled>0</disabled>
> +<name>icon</name>
> +<number>5</number>
> +<picker>0</picker>
> +<prettyName>icon</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</icon>
> +<name>
> +<disabled>0</disabled>
> +<name>name</name>
> +<number>1</number>
> +<picker>0</picker>
> +<prettyName>name</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</name>
> +<query>
> +<disabled>0</disabled>
> +<name>query</name>
> +<number>3</number>
> +<picker>0</picker>
> +<prettyName>query</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</query>
> +<resultsNumber>
> +<disabled>0</disabled>
> +<name>resultsNumber</name>
> +<number>4</number>
> +<picker>0</picker>
> +<prettyName>resultsNumber</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</resultsNumber>
> +<url>
> +<disabled>0</disabled>
> +<name>url</name>
> +<number>2</number>
> +<picker>0</picker>
> +<prettyName>url</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</url>
> +</class>
> +<name>XWiki.SearchSuggestConfig</name>
> +<number>1</number>
> +<className>XWiki.SearchSuggestSourceClass</className>
> +<guid>9c2ba119-f8b2-4652-b5ff-9d446cbdb9aa</guid>
> +<property>
> +<activated>1</activated>
> +</property>
> +<property>
> +<highlight>0</highlight>
> +</property>
> +<property>
> +<icon>$xwiki.getSkinFile('icons/silk/page_white_text.gif')</icon>
> +</property>
> +<property>
> +<name>Document content</name>
> +</property>
> +<property>
> +<query>__INPUT__*</query>
> +</property>
> +<property>
> +<resultsNumber>3</resultsNumber>
> +</property>
> +<property>
> +<url>$xwiki.getURL('XWiki.SearchSuggestLuceneService', 'get', 'outputSyntax=plain')</url>
> +</property>
> +</object>
> +<object>
> +<class>
> +<name>XWiki.SearchSuggestSourceClass</name>
> +<customClass></customClass>
> +<customMapping></customMapping>
> +<defaultViewSheet></defaultViewSheet>
> +<defaultEditSheet></defaultEditSheet>
> +<defaultWeb></defaultWeb>
> +<nameField></nameField>
> +<validationScript></validationScript>
> +<activated>
> +<defaultValue></defaultValue>
> +<disabled>0</disabled>
> +<displayFormType>checkbox</displayFormType>
> +<displayType></displayType>
> +<name>activated</name>
> +<number>7</number>
> +<prettyName>activated</prettyName>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.BooleanClass</classType>
> +</activated>
> +<highlight>
> +<defaultValue></defaultValue>
> +<disabled>0</disabled>
> +<displayFormType>checkbox</displayFormType>
> +<displayType></displayType>
> +<name>highlight</name>
> +<number>6</number>
> +<prettyName>highlight</prettyName>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.BooleanClass</classType>
> +</highlight>
> +<icon>
> +<disabled>0</disabled>
> +<name>icon</name>
> +<number>5</number>
> +<picker>0</picker>
> +<prettyName>icon</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</icon>
> +<name>
> +<disabled>0</disabled>
> +<name>name</name>
> +<number>1</number>
> +<picker>0</picker>
> +<prettyName>name</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</name>
> +<query>
> +<disabled>0</disabled>
> +<name>query</name>
> +<number>3</number>
> +<picker>0</picker>
> +<prettyName>query</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</query>
> +<resultsNumber>
> +<disabled>0</disabled>
> +<name>resultsNumber</name>
> +<number>4</number>
> +<picker>0</picker>
> +<prettyName>resultsNumber</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</resultsNumber>
> +<url>
> +<disabled>0</disabled>
> +<name>url</name>
> +<number>2</number>
> +<picker>0</picker>
> +<prettyName>url</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</url>
> +</class>
> +<name>XWiki.SearchSuggestConfig</name>
> +<number>2</number>
> +<className>XWiki.SearchSuggestSourceClass</className>
> +<guid>40387571-e03f-4ffd-abda-61cf2a2b2b55</guid>
> +<property>
> +<activated>1</activated>
> +</property>
> +<property>
> +<highlight>1</highlight>
> +</property>
> +<property>
> +<icon>$xwiki.getSkinFile('icons/silk/attach.gif')</icon>
> +</property>
> +<property>
> +<name>Attachment name</name>
> +</property>
> +<property>
> +<query>name:__INPUT__* AND type:attachment</query>
> +</property>
> +<property>
> +<resultsNumber>3</resultsNumber>
> +</property>
> +<property>
> +<url>$xwiki.getURL('XWiki.SearchSuggestLuceneService', 'get', 'outputSyntax=plain')</url>
> +</property>
> +</object>
> +<object>
> +<class>
> +<name>XWiki.SearchSuggestSourceClass</name>
> +<customClass></customClass>
> +<customMapping></customMapping>
> +<defaultViewSheet></defaultViewSheet>
> +<defaultEditSheet></defaultEditSheet>
> +<defaultWeb></defaultWeb>
> +<nameField></nameField>
> +<validationScript></validationScript>
> +<activated>
> +<defaultValue></defaultValue>
> +<disabled>0</disabled>
> +<displayFormType>checkbox</displayFormType>
> +<displayType></displayType>
> +<name>activated</name>
> +<number>7</number>
> +<prettyName>activated</prettyName>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.BooleanClass</classType>
> +</activated>
> +<highlight>
> +<defaultValue></defaultValue>
> +<disabled>0</disabled>
> +<displayFormType>checkbox</displayFormType>
> +<displayType></displayType>
> +<name>highlight</name>
> +<number>6</number>
> +<prettyName>highlight</prettyName>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.BooleanClass</classType>
> +</highlight>
> +<icon>
> +<disabled>0</disabled>
> +<name>icon</name>
> +<number>5</number>
> +<picker>0</picker>
> +<prettyName>icon</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</icon>
> +<name>
> +<disabled>0</disabled>
> +<name>name</name>
> +<number>1</number>
> +<picker>0</picker>
> +<prettyName>name</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</name>
> +<query>
> +<disabled>0</disabled>
> +<name>query</name>
> +<number>3</number>
> +<picker>0</picker>
> +<prettyName>query</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</query>
> +<resultsNumber>
> +<disabled>0</disabled>
> +<name>resultsNumber</name>
> +<number>4</number>
> +<picker>0</picker>
> +<prettyName>resultsNumber</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</resultsNumber>
> +<url>
> +<disabled>0</disabled>
> +<name>url</name>
> +<number>2</number>
> +<picker>0</picker>
> +<prettyName>url</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</url>
> +</class>
> +<name>XWiki.SearchSuggestConfig</name>
> +<number>3</number>
> +<className>XWiki.SearchSuggestSourceClass</className>
> +<guid>dbc05205-6333-4889-8613-83686f9288f6</guid>
> +<property>
> +<activated>1</activated>
> +</property>
> +<property>
> +<highlight>0</highlight>
> +</property>
> +<property>
> +<icon>$xwiki.getSkinFile('icons/silk/attach.gif')</icon>
> +</property>
> +<property>
> +<name>Attachment content</name>
> +</property>
> +<property>
> +<query>__INPUT__*AND type:attachment</query>
> +</property>
> +<property>
> +<resultsNumber>3</resultsNumber>
> +</property>
> +<property>
> +<url>$xwiki.getURL('XWiki.SearchSuggestLuceneService', 'get', 'outputSyntax=plain')</url>
> +</property>
> +</object>
> +<object>
> +<class>
> +<name>XWiki.SearchSuggestSourceClass</name>
> +<customClass></customClass>
> +<customMapping></customMapping>
> +<defaultViewSheet></defaultViewSheet>
> +<defaultEditSheet></defaultEditSheet>
> +<defaultWeb></defaultWeb>
> +<nameField></nameField>
> +<validationScript></validationScript>
> +<activated>
> +<defaultValue></defaultValue>
> +<disabled>0</disabled>
> +<displayFormType>checkbox</displayFormType>
> +<displayType></displayType>
> +<name>activated</name>
> +<number>7</number>
> +<prettyName>activated</prettyName>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.BooleanClass</classType>
> +</activated>
> +<highlight>
> +<defaultValue></defaultValue>
> +<disabled>0</disabled>
> +<displayFormType>checkbox</displayFormType>
> +<displayType></displayType>
> +<name>highlight</name>
> +<number>6</number>
> +<prettyName>highlight</prettyName>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.BooleanClass</classType>
> +</highlight>
> +<icon>
> +<disabled>0</disabled>
> +<name>icon</name>
> +<number>5</number>
> +<picker>0</picker>
> +<prettyName>icon</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</icon>
> +<name>
> +<disabled>0</disabled>
> +<name>name</name>
> +<number>1</number>
> +<picker>0</picker>
> +<prettyName>name</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</name>
> +<query>
> +<disabled>0</disabled>
> +<name>query</name>
> +<number>3</number>
> +<picker>0</picker>
> +<prettyName>query</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</query>
> +<resultsNumber>
> +<disabled>0</disabled>
> +<name>resultsNumber</name>
> +<number>4</number>
> +<picker>0</picker>
> +<prettyName>resultsNumber</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</resultsNumber>
> +<url>
> +<disabled>0</disabled>
> +<name>url</name>
> +<number>2</number>
> +<picker>0</picker>
> +<prettyName>url</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</url>
> +</class>
> +<name>XWiki.SearchSuggestConfig</name>
> +<number>4</number>
> +<className>XWiki.SearchSuggestSourceClass</className>
> +<guid>1e881b2d-031c-42ba-bd2d-867fa72c7dab</guid>
> +<property>
> +<activated>0</activated>
> +</property>
> +<property>
> +<highlight>0</highlight>
> +</property>
> +<property>
> +<icon>$xwiki.getSkinFile('icons/silk/page_white_picture.gif')</icon>
> +</property>
> +<property>
> +<name>Blog Posts</name>
> +</property>
> +<property>
> +<query>__INPUT__* AND object:Blog.BlogPostClass</query>
> +</property>
> +<property>
> +<resultsNumber>3</resultsNumber>
> +</property>
> +<property>
> +<url>$xwiki.getURL('XWiki.SearchSuggestLuceneService', 'get', 'outputSyntax=plain')</url>
> +</property>
> +</object>
> +<object>
> +<class>
> +<name>XWiki.SearchSuggestSourceClass</name>
> +<customClass></customClass>
> +<customMapping></customMapping>
> +<defaultViewSheet></defaultViewSheet>
> +<defaultEditSheet></defaultEditSheet>
> +<defaultWeb></defaultWeb>
> +<nameField></nameField>
> +<validationScript></validationScript>
> +<activated>
> +<defaultValue></defaultValue>
> +<disabled>0</disabled>
> +<displayFormType>checkbox</displayFormType>
> +<displayType></displayType>
> +<name>activated</name>
> +<number>7</number>
> +<prettyName>activated</prettyName>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.BooleanClass</classType>
> +</activated>
> +<highlight>
> +<defaultValue></defaultValue>
> +<disabled>0</disabled>
> +<displayFormType>checkbox</displayFormType>
> +<displayType></displayType>
> +<name>highlight</name>
> +<number>6</number>
> +<prettyName>highlight</prettyName>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.BooleanClass</classType>
> +</highlight>
> +<icon>
> +<disabled>0</disabled>
> +<name>icon</name>
> +<number>5</number>
> +<picker>0</picker>
> +<prettyName>icon</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</icon>
> +<name>
> +<disabled>0</disabled>
> +<name>name</name>
> +<number>1</number>
> +<picker>0</picker>
> +<prettyName>name</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</name>
> +<query>
> +<disabled>0</disabled>
> +<name>query</name>
> +<number>3</number>
> +<picker>0</picker>
> +<prettyName>query</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</query>
> +<resultsNumber>
> +<disabled>0</disabled>
> +<name>resultsNumber</name>
> +<number>4</number>
> +<picker>0</picker>
> +<prettyName>resultsNumber</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</resultsNumber>
> +<url>
> +<disabled>0</disabled>
> +<name>url</name>
> +<number>2</number>
> +<picker>0</picker>
> +<prettyName>url</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</url>
> +</class>
> +<name>XWiki.SearchSuggestConfig</name>
> +<number>5</number>
> +<className>XWiki.SearchSuggestSourceClass</className>
> +<guid>8cc7466d-c6be-4118-bb06-8f287a3bad92</guid>
> +<property>
> +<activated>1</activated>
> +</property>
> +<property>
> +<highlight>0</highlight>
> +</property>
> +<property>
> +<icon>$xwiki.getSkinFile('icons/silk/user.gif')</icon>
> +</property>
> +<property>
> +<name>Users</name>
> +</property>
> +<property>
> +<query>__INPUT__* AND object:XWiki.XWikiUsers</query>
> +</property>
> +<property>
> +<resultsNumber>3</resultsNumber>
> +</property>
> +<property>
> +<url>$xwiki.getURL('XWiki.SearchSuggestLuceneService', 'get', 'outputSyntax=plain')</url>
> +</property>
> +</object>
> +<content>{{include document="XWiki.SearchSuggestConfigSheet" /}}
> +</content></xwikidoc>
>
> Added: platform/xwiki-applications/trunk/search/src/main/resources/XWiki/SearchSuggestConfigSheet.xml
> ===================================================================
> --- platform/xwiki-applications/trunk/search/src/main/resources/XWiki/SearchSuggestConfigSheet.xml                (rev 0)
> +++ platform/xwiki-applications/trunk/search/src/main/resources/XWiki/SearchSuggestConfigSheet.xml    2011-02-25 03:27:58 UTC (rev 34925)
> @@ -0,0 +1,73 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<xwikidoc>
> +<web>XWiki</web>
> +<name>SearchSuggestConfigSheet</name>
> +<language></language>
> +<defaultLanguage>en</defaultLanguage>
> +<translation>0</translation>
> +<parent>XWiki.SearchSuggestConfig</parent>
> +<creator>XWiki.Admin</creator>
> +<author>XWiki.Admin</author>
> +<customClass></customClass>
> +<contentAuthor>XWiki.Admin</contentAuthor>
> +<creationDate>1280310959000</creationDate>
> +<date>1297439261000</date>
> +<contentUpdateDate>1297439261000</contentUpdateDate>
> +<version>1.1</version>
> +<title></title>
> +<template></template>
> +<defaultTemplate></defaultTemplate>
> +<validationScript></validationScript>
> +<comment></comment>
> +<minorEdit>false</minorEdit>
> +<syntaxId>xwiki/2.0</syntaxId>
> +<hidden>false</hidden>
> +<object>
> +<class>
> +<name>XWiki.SheetClass</name>
> +<customClass></customClass>
> +<customMapping></customMapping>
> +<defaultViewSheet></defaultViewSheet>
> +<defaultEditSheet></defaultEditSheet>
> +<defaultWeb></defaultWeb>
> +<nameField></nameField>
> +<validationScript></validationScript>
> +<defaultEditMode>
> +<disabled>0</disabled>
> +<name>defaultEditMode</name>
> +<number>1</number>
> +<prettyName>Default Edit Mode</prettyName>
> +<size>15</size>
> +<unmodifiable>0</unmodifiable>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</defaultEditMode>
> +</class>
> +<name>XWiki.SearchSuggestConfigSheet</name>
> +<number>0</number>
> +<className>XWiki.SheetClass</className>
> +<guid>933b2bea-9566-4352-83ed-0cd9b4fba530</guid>
> +<property>
> +<defaultEditMode>inline</defaultEditMode>
> +</property>
> +</object>
> +<content>{{velocity}}
> +=Search Suggest=
> +
> +#set($searchSuggestConfigClass = $xwiki.getDocument("XWiki.SearchSuggestConfig").xWikiClass)
> +#set($searchSuggestSourceClassname = "XWiki.SearchSuggestSourceClass")
> +#set($configObj = $doc.getObject($doc.fullName))
> +**$searchSuggestConfigClass.get("activated").prettyName**: $doc.display("activated")
> +
> +== Sources ==
> +
> +A suggest source is a URL that takes 3 parameters: query, input and nb. The query parameter must contain a ~_~_INPUT~_~_ placeholder. This URL must process the query with the given user input and return the result in the XML format expected by the suggest component.
> +
> +|= Name |= URL |= Query |= Results Number |= Icon |= Highlight matches |= Activated
> +#foreach($srcObj in $doc.getObjects($searchSuggestSourceClassname))| $doc.display('name', $srcObj) | $doc.display('url', $srcObj) | #if($context.action == 'view') {{{ #end $doc.display('query', $srcObj) #if($context.action == 'view') }}} #end | $doc.display('resultsNumber', $srcObj) | $doc.display('icon', $srcObj) | $doc.display('highlight', $srcObj) | $doc.display('activated', $srcObj)
> +#end
> +
> +
> +#if($context.display == 'edit')
> +[[Add a new source>>$doc.getExternalURL('objectadd', "classname=${searchSuggestSourceClassname}&xredirect=${doc.getURL('inline')}")]]
> +#end
> +{{/velocity}}</content></xwikidoc>
>
> Added: platform/xwiki-applications/trunk/search/src/main/resources/XWiki/SearchSuggestLuceneService.xml
> ===================================================================
> --- platform/xwiki-applications/trunk/search/src/main/resources/XWiki/SearchSuggestLuceneService.xml               (rev 0)
> +++ platform/xwiki-applications/trunk/search/src/main/resources/XWiki/SearchSuggestLuceneService.xml   2011-02-25 03:27:58 UTC (rev 34925)
> @@ -0,0 +1,62 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<xwikidoc>
> +<web>XWiki</web>
> +<name>SearchSuggestLuceneService</name>
> +<language></language>
> +<defaultLanguage>en</defaultLanguage>
> +<translation>0</translation>
> +<parent>XWiki.SearchSuggestConfig</parent>
> +<creator>XWiki.Admin</creator>
> +<author>XWiki.Admin</author>
> +<customClass></customClass>
> +<contentAuthor>XWiki.Admin</contentAuthor>
> +<creationDate>1280310630000</creationDate>
> +<date>1280318001000</date>
> +<contentUpdateDate>1280318001000</contentUpdateDate>
> +<version>1.1</version>
> +<title></title>
> +<template></template>
> +<defaultTemplate></defaultTemplate>
> +<validationScript></validationScript>
> +<comment></comment>
> +<minorEdit>false</minorEdit>
> +<syntaxId>xwiki/2.0</syntaxId>
> +<hidden>false</hidden>
> +<content>{{velocity}}
> +#set($query = "$!request.query")
> +#set($input = "$!request.input")
> +#set($nb = "$!request.nb")
> +#if($nb != '')
> + Â #set($nb = $util.parseInt($nb) + 1)
> +#else
> + Â #set($nb = 6)
> +#end
> +#if($query != '' && $input != '')
> + Â #set($query = $query.replaceAll('__INPUT__', $input))
> + Â #set($discard = $response.setContentType("text/xml"))
> + Â <?xml version="1.0" encoding="UTF-8"?>
> + Â #set($rawresults = $xwiki.lucene.getSearchResults($query, $util.null))
> + Â #set($results = $rawresults.getResults("0", "$nb"))
> + Â <results>
> + Â Â #foreach($item in $results)
> + Â Â Â #set($itemfullname = "${item.wiki}:${item.space}.${item.name}")
> + Â Â Â #set($itemdoc = $xwiki.getDocument($itemfullname))
> + Â Â Â #if($item.type == "attachment")
> + Â Â Â Â #set($name = $item.filename)
> + Â Â Â Â #set($url = $itemdoc.getAttachmentURL($name))
> + Â Â Â #else
> + Â Â Â Â #set($name = $itemdoc.getDisplayTitle())
> + Â Â Â Â #set($url = $itemdoc.getURL())
> + Â Â Â #end
> + Â Â Â <rs id="$url" info="$name">$name</rs>
> + Â Â #end
> + Â </results>
> +#else
> +{{info}}
> +This service allows to retrieve search results for the suggest UI component.
> +Examples:
> +* [[$doc.getExternalURL('get', 'outputSyntax=plain&query=__INPUT__*&input=test')]]
> +{{/info}}
> +#end
> +{{/velocity}}
> +</content></xwikidoc>
>
> Added: platform/xwiki-applications/trunk/search/src/main/resources/XWiki/SearchSuggestSourceClass.xml
> ===================================================================
> --- platform/xwiki-applications/trunk/search/src/main/resources/XWiki/SearchSuggestSourceClass.xml                (rev 0)
> +++ platform/xwiki-applications/trunk/search/src/main/resources/XWiki/SearchSuggestSourceClass.xml    2011-02-25 03:27:58 UTC (rev 34925)
> @@ -0,0 +1,122 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<xwikidoc>
> +<web>XWiki</web>
> +<name>SearchSuggestSourceClass</name>
> +<language></language>
> +<defaultLanguage></defaultLanguage>
> +<translation>0</translation>
> +<parent>XWiki.SearchSuggestConfig</parent>
> +<creator>XWiki.Admin</creator>
> +<author>XWiki.Admin</author>
> +<customClass></customClass>
> +<contentAuthor>XWiki.Admin</contentAuthor>
> +<creationDate>1280310752000</creationDate>
> +<date>1280318001000</date>
> +<contentUpdateDate>1280318001000</contentUpdateDate>
> +<version>1.1</version>
> +<title></title>
> +<template></template>
> +<defaultTemplate></defaultTemplate>
> +<validationScript></validationScript>
> +<comment></comment>
> +<minorEdit>false</minorEdit>
> +<syntaxId>xwiki/2.0</syntaxId>
> +<hidden>false</hidden>
> +<class>
> +<name>XWiki.SearchSuggestSourceClass</name>
> +<customClass></customClass>
> +<customMapping></customMapping>
> +<defaultViewSheet></defaultViewSheet>
> +<defaultEditSheet></defaultEditSheet>
> +<defaultWeb></defaultWeb>
> +<nameField></nameField>
> +<validationScript></validationScript>
> +<activated>
> +<defaultValue></defaultValue>
> +<disabled>0</disabled>
> +<displayFormType>checkbox</displayFormType>
> +<displayType></displayType>
> +<name>activated</name>
> +<number>7</number>
> +<prettyName>activated</prettyName>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.BooleanClass</classType>
> +</activated>
> +<highlight>
> +<defaultValue></defaultValue>
> +<disabled>0</disabled>
> +<displayFormType>checkbox</displayFormType>
> +<displayType></displayType>
> +<name>highlight</name>
> +<number>6</number>
> +<prettyName>highlight</prettyName>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.BooleanClass</classType>
> +</highlight>
> +<icon>
> +<disabled>0</disabled>
> +<name>icon</name>
> +<number>5</number>
> +<picker>0</picker>
> +<prettyName>icon</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</icon>
> +<name>
> +<disabled>0</disabled>
> +<name>name</name>
> +<number>1</number>
> +<picker>0</picker>
> +<prettyName>name</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</name>
> +<query>
> +<disabled>0</disabled>
> +<name>query</name>
> +<number>3</number>
> +<picker>0</picker>
> +<prettyName>query</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</query>
> +<resultsNumber>
> +<disabled>0</disabled>
> +<name>resultsNumber</name>
> +<number>4</number>
> +<picker>0</picker>
> +<prettyName>resultsNumber</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</resultsNumber>
> +<url>
> +<disabled>0</disabled>
> +<name>url</name>
> +<number>2</number>
> +<picker>0</picker>
> +<prettyName>url</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<validationMessage></validationMessage>
> +<validationRegExp></validationRegExp>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</url>
> +</class>
> +<content>{{include document="XWiki.ClassSheet"/}}
> +</content></xwikidoc>
>
> _______________________________________________
> notifications mailing list
> notifications(a)xwiki.org
> http://lists.xwiki.org/mailman/listinfo/notifications
>
Hi devs,
I'd like to make the XWiki Rendering module a top level project.
Rationale
========
* Make it more visible in order to get more outside visibility/contributions (it'll have its own wiki and can be advertised separately from the rest, see below)
* Ensure that we keep the rendering module independent from xwiki's core model
* Prepare it for a potential (no plans yet) future step which would be to either merge it with some other projects (such as Eclipse's WikiText) or move it to a forge with more visibility should we want that
* Allow releasing it separately from the rest of XWiki with minimal dependencies which means it would be possible to use an oldish version of XE with the latest rendering module, allowing to provide features on an older platform.
* Allows better controlling backward compatibility
* Allows better and cleaner documentation (since it would be on a wiki of its own)
* This module has grown large and has a life of its own now that warrants being a top level project
The only cons I can see is that it means one more module to release separately and thus a little bit more time during the release process but I don't think that's a good enough reason to not do it (compared to the listed advantages above).
Implementation details
==================
* Name: XWiki Rendering (I hesitated giving it a code name such a XWiki Babel but in the end I think using a descriptive name is more inline with other names we have and clearer for the end users - it also allows us to not change existing package names this not breaking backward compatibility)
* SVN: http://svn.xwiki.org/svnroot/xwiki/rendering
* JIRA: http://jira.xwiki.org/jira/browse/XRENDERING
* Wiki: http://rendering.xwiki.org
* Package: org.xwiki.rendering
* Versioning strategy: Start at 3.0-SNAPSHOT and release XWiki Rendering 3.0 final just before we release XE 3.0 final. Then let it have its own life: 3.1, 3.2, etc, independently of platform/XE (although in practice it can be released at the same time as we release platform)
* Directory structure:
http://svn.xwiki.org/svnroot/xwiki/rendering/
|_ tags
|_ branches
|_ trunk
|_ xwiki-rendering-api
|_ xwiki-rendering-macros
|_ (move here all macros that don't depend on XWiki's model - it's ok to depend on XWiki's WikiModel's interface though)
|_ xwiki-rendering-standalone
|_ xwiki-rendering-syntaxes
|_ (all syntaxes submodules moved here)
|_ xwiki-rendering-tests
|_ xwiki-rendering-transformations
|_ (all transformation submodules)
* We leave in platform/xwiki-rendering/* the macros that depend on XWiki's model + the xwiki-rendering-xwiki module.
* In the future, the idea will be to separate xwiki-rendering-api into several parts (rendering-block, rendering-renderers, etc) but that's a second step.
I'm on holidays right now (for a week) but that's something I'd be keep on implementing on and off during this week should we agree on it.
Here's my +1
Thanks
-Vincent
Hi
Having a discussion in our company about wiki's and LDAP support
We had some issues getting LDAP working and a person made a comment that LDAP was not really a key focus and that some of the issues we encountered are in other classes that are used and therefore the problems are not in Xwiki
Is there plans to improve Xwiki LDAP support and and will configuration come into the front end?
Will its configuration be simplified?
Cheers
Peter
\o/
On Thu, Feb 24, 2011 at 5:08 PM, tmortagne
<contrib-notifications(a)xwiki.org> wrote:
> Author: tmortagne
> Date: 2011-02-24 17:08:47 +0100 (Thu, 24 Feb 2011)
> New Revision: 34917
>
> Added:
> Â contrib/sandbox/xwiki-extension-handler-xar/src/test/resources/repository/local/page.xml
> Removed:
> Â contrib/sandbox/xwiki-extension-handler-xar/src/main/java/org/xwiki/extension/xar/internal/handler/packager/xml/ClassHandler.java
> Â contrib/sandbox/xwiki-extension-handler-xar/src/main/java/org/xwiki/extension/xar/internal/handler/packager/xml/ObjectHandler.java
> Modified:
> Â contrib/sandbox/xwiki-extension-handler-xar/src/main/java/org/xwiki/extension/xar/internal/handler/packager/xml/DocumentImporterHandler.java
> Â contrib/sandbox/xwiki-extension-handler-xar/src/test/java/org/xwiki/extension/xar/XarExtensionHandlerTest.java
> Â contrib/sandbox/xwiki-extension-handler-xar/src/test/resources/repository/local/test-1.0.xar
> Â contrib/sandbox/xwiki-extension-handler-xar/src/test/resources/repository/local/test-2.0.xar
> Log:
> XWIKI-5557: Add extension manager xar handler
> Yea ! first fully implemented version with install/commit/upgrade support (ok "upgrade" is maybe a lot to say ;))
>
> Deleted: contrib/sandbox/xwiki-extension-handler-xar/src/main/java/org/xwiki/extension/xar/internal/handler/packager/xml/ClassHandler.java
> ===================================================================
> --- contrib/sandbox/xwiki-extension-handler-xar/src/main/java/org/xwiki/extension/xar/internal/handler/packager/xml/ClassHandler.java  2011-02-24 15:58:04 UTC (rev 34916)
> +++ contrib/sandbox/xwiki-extension-handler-xar/src/main/java/org/xwiki/extension/xar/internal/handler/packager/xml/ClassHandler.java  2011-02-24 16:08:47 UTC (rev 34917)
> @@ -1,37 +0,0 @@
> -/*
> - * 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,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - * Lesser General Public License for more details.
> - *
> - * You should have received a copy of the GNU Lesser General Public
> - * License along with this software; if not, write to the Free
> - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
> - * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
> - */
> -package org.xwiki.extension.xar.internal.handler.packager.xml;
> -
> -import org.xwiki.component.manager.ComponentManager;
> -
> -import com.xpn.xwiki.objects.classes.BaseClass;
> -
> -public class ClassHandler extends AbstractHandler
> -{
> - Â Â public ClassHandler(ComponentManager componentManager, BaseClass xclass)
> - Â Â {
> - Â Â Â Â super(componentManager, xclass);
> - Â Â }
> -
> - Â Â public BaseClass getObject()
> - Â Â {
> - Â Â Â Â return (BaseClass) getCurrentBean();
> - Â Â }
> -}
>
> Modified: contrib/sandbox/xwiki-extension-handler-xar/src/main/java/org/xwiki/extension/xar/internal/handler/packager/xml/DocumentImporterHandler.java
> ===================================================================
> --- contrib/sandbox/xwiki-extension-handler-xar/src/main/java/org/xwiki/extension/xar/internal/handler/packager/xml/DocumentImporterHandler.java     2011-02-24 15:58:04 UTC (rev 34916)
> +++ contrib/sandbox/xwiki-extension-handler-xar/src/main/java/org/xwiki/extension/xar/internal/handler/packager/xml/DocumentImporterHandler.java     2011-02-24 16:08:47 UTC (rev 34917)
> @@ -19,6 +19,7 @@
> Â */
> Â package org.xwiki.extension.xar.internal.handler.packager.xml;
>
> +import org.dom4j.io.SAXContentHandler;
> Â import org.xml.sax.Attributes;
> Â import org.xml.sax.SAXException;
> Â import org.xwiki.component.manager.ComponentLookupException;
> @@ -26,7 +27,9 @@
> Â import org.xwiki.model.reference.DocumentReference;
>
> Â import com.xpn.xwiki.XWikiContext;
> +import com.xpn.xwiki.XWikiException;
> Â import com.xpn.xwiki.doc.XWikiDocument;
> +import com.xpn.xwiki.objects.BaseObject;
>
> Â public class DocumentImporterHandler extends AbstractHandler
> Â {
> @@ -34,6 +37,11 @@
>
> Â Â private boolean needSave = true;
>
> + Â Â /**
> + Â Â * Avoid create a new SAXContentHandler for each object/class when the same can be used for all.
> + Â Â */
> + Â Â public SAXContentHandler domBuilder = new SAXContentHandler();
> +
> Â Â public DocumentImporterHandler(ComponentManager componentManager)
> Â Â {
> Â Â Â Â super(componentManager);
> @@ -43,6 +51,7 @@
> Â Â Â Â } catch (ComponentLookupException e) {
> Â Â Â Â Â Â setCurrentBean(new XWikiDocument());
> Â Â Â Â }
> +
> Â Â Â Â // skip useless known elements
> Â Â Â Â this.skippedElements.add("version");
> Â Â Â Â this.skippedElements.add("minorEdit");
> @@ -99,10 +108,9 @@
> Â Â {
> Â Â Â Â if (qName.equals("attachment")) {
> Â Â Â Â Â Â setCurrentHandler(new AttachmentHandler(getComponentManager()));
> - Â Â Â Â } else if (qName.equals("object")) {
> - Â Â Â Â Â Â setCurrentHandler(new ObjectHandler(getComponentManager()));
> - Â Â Â Â } else if (qName.equals("class")) {
> - Â Â Â Â Â Â setCurrentHandler(new ClassHandler(getComponentManager(), getDocument().getXClass()));
> + Â Â Â Â } else if (qName.equals("class") || qName.equals("object")) {
> + Â Â Â Â Â Â this.domBuilder.startDocument();
> + Â Â Â Â Â Â setCurrentHandler(this.domBuilder);
> Â Â Â Â } else {
> Â Â Â Â Â Â super.startElementInternal(uri, localName, qName, attributes);
> Â Â Â Â }
> @@ -120,14 +128,25 @@
>
> Â Â Â Â Â Â getDocument().getAttachmentList().add(handler.getAttachment());
>
> - Â Â Â Â Â Â // TODO: add attachment to documentxwikidoc
> + Â Â Â Â Â Â // TODO: add attachment to document
> Â Â Â Â Â Â saveDocument("Import: add attachment");
> Â Â Â Â } else if (qName.equals("object")) {
> - Â Â Â Â Â Â ObjectHandler handler = (ObjectHandler) getCurrentHandler();
> - Â Â Â Â Â Â getDocument().addXObject(handler.getObject());
> + Â Â Â Â Â Â try {
> + Â Â Â Â Â Â Â Â BaseObject baseObject = new BaseObject();
> + Â Â Â Â Â Â Â Â baseObject.fromXML(this.domBuilder.getDocument().getRootElement());
> + Â Â Â Â Â Â Â Â getDocument().setXObject(baseObject.getNumber(), baseObject);
> + Â Â Â Â Â Â } catch (XWikiException e) {
> + Â Â Â Â Â Â Â Â throw new SAXException("Failed to parse object", e);
> + Â Â Â Â Â Â }
>
> Â Â Â Â Â Â this.needSave = true;
> Â Â Â Â } else if (qName.equals("class")) {
> + Â Â Â Â Â Â try {
> + Â Â Â Â Â Â Â Â getDocument().getXClass().fromXML(this.domBuilder.getDocument().getRootElement());
> + Â Â Â Â Â Â } catch (XWikiException e) {
> + Â Â Â Â Â Â Â Â throw new SAXException("Failed to parse object", e);
> + Â Â Â Â Â Â }
> +
> Â Â Â Â Â Â this.needSave = true;
> Â Â Â Â } else {
> Â Â Â Â Â Â super.endElementInternal(uri, localName, qName);
>
> Deleted: contrib/sandbox/xwiki-extension-handler-xar/src/main/java/org/xwiki/extension/xar/internal/handler/packager/xml/ObjectHandler.java
> ===================================================================
> --- contrib/sandbox/xwiki-extension-handler-xar/src/main/java/org/xwiki/extension/xar/internal/handler/packager/xml/ObjectHandler.java  2011-02-24 15:58:04 UTC (rev 34916)
> +++ contrib/sandbox/xwiki-extension-handler-xar/src/main/java/org/xwiki/extension/xar/internal/handler/packager/xml/ObjectHandler.java  2011-02-24 16:08:47 UTC (rev 34917)
> @@ -1,37 +0,0 @@
> -/*
> - * 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,
> - * but WITHOUT ANY WARRANTY; without even the implied warranty of
> - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> - * Lesser General Public License for more details.
> - *
> - * You should have received a copy of the GNU Lesser General Public
> - * License along with this software; if not, write to the Free
> - * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
> - * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
> - */
> -package org.xwiki.extension.xar.internal.handler.packager.xml;
> -
> -import org.xwiki.component.manager.ComponentManager;
> -
> -import com.xpn.xwiki.objects.BaseObject;
> -
> -public class ObjectHandler extends AbstractHandler
> -{
> - Â Â public ObjectHandler(ComponentManager componentManager)
> - Â Â {
> - Â Â Â Â super(componentManager, new BaseObject());
> - Â Â }
> -
> - Â Â public BaseObject getObject()
> - Â Â {
> - Â Â Â Â return (BaseObject) getCurrentBean();
> - Â Â }
> -}
>
> Modified: contrib/sandbox/xwiki-extension-handler-xar/src/test/java/org/xwiki/extension/xar/XarExtensionHandlerTest.java
> ===================================================================
> --- contrib/sandbox/xwiki-extension-handler-xar/src/test/java/org/xwiki/extension/xar/XarExtensionHandlerTest.java    2011-02-24 15:58:04 UTC (rev 34916)
> +++ contrib/sandbox/xwiki-extension-handler-xar/src/test/java/org/xwiki/extension/xar/XarExtensionHandlerTest.java    2011-02-24 16:08:47 UTC (rev 34917)
> @@ -40,6 +40,9 @@
> Â import com.xpn.xwiki.XWiki;
> Â import com.xpn.xwiki.XWikiContext;
> Â import com.xpn.xwiki.doc.XWikiDocument;
> +import com.xpn.xwiki.objects.BaseObject;
> +import com.xpn.xwiki.objects.classes.BaseClass;
> +import com.xpn.xwiki.objects.classes.NumberClass;
> Â import com.xpn.xwiki.test.AbstractBridgedComponentTestCase;
>
> Â public class XarExtensionHandlerTest extends AbstractBridgedComponentTestCase
> @@ -147,6 +150,11 @@
> Â Â Â Â Assert.assertEquals("Wrong content", "content", document.getContent());
> Â Â Â Â Assert.assertEquals("Wrong author", "XWiki.author", document.getAuthor());
> Â Â Â Â Assert.assertEquals("Wrong versions", "1.1", document.getVersion());
> +
> + Â Â Â Â BaseClass baseClass = document.getXClass();
> + Â Â Â Â Assert.assertNotNull(baseClass.getField("property"));
> + Â Â Â Â Assert.assertEquals("property", baseClass.getField("property").getName());
> + Â Â Â Â Assert.assertSame(NumberClass.class, baseClass.getField("property").getClass());
> Â Â }
>
> Â Â @Test
> @@ -173,6 +181,11 @@
> Â Â Â Â Assert.assertEquals("Wrong content", "content 2", document.getContent());
> Â Â Â Â Assert.assertEquals("Wrong author", "XWiki.author", document.getAuthor());
> Â Â Â Â Assert.assertEquals("Wrong versions", "2.1", document.getVersion());
> +
> + Â Â Â Â BaseClass baseClass = document.getXClass();
> + Â Â Â Â Assert.assertNotNull(baseClass.getField("property"));
> + Â Â Â Â Assert.assertEquals("property", baseClass.getField("property").getName());
> + Â Â Â Â Assert.assertSame(NumberClass.class, baseClass.getField("property").getClass());
> Â Â }
>
> Â Â @Test
>
> Added: contrib/sandbox/xwiki-extension-handler-xar/src/test/resources/repository/local/page.xml
> ===================================================================
> --- contrib/sandbox/xwiki-extension-handler-xar/src/test/resources/repository/local/page.xml               (rev 0)
> +++ contrib/sandbox/xwiki-extension-handler-xar/src/test/resources/repository/local/page.xml   2011-02-24 16:08:47 UTC (rev 34917)
> @@ -0,0 +1,166 @@
> +<?xml version="1.0" encoding="UTF-8"?>
> +<xwikidoc>
> +<web>space</web>
> +<name>page</name>
> +<language></language>
> +<defaultLanguage>en</defaultLanguage>
> +<translation>0</translation>
> +<parent></parent>
> +<creator>XWiki.creator</creator>
> +<author>XWiki.author</author>
> +<customClass></customClass>
> +<contentAuthor>XWiki.contentAuthor</contentAuthor>
> +<creationDate>1297952360000</creationDate>
> +<date>1297952371000</date>
> +<contentUpdateDate>1297952371000</contentUpdateDate>
> +<version>1.1</version>
> +<title></title>
> +<template></template>
> +<defaultTemplate></defaultTemplate>
> +<validationScript></validationScript>
> +<comment></comment>
> +<minorEdit>false</minorEdit>
> +<syntaxId>xwiki/2.0</syntaxId>
> +<hidden>false</hidden>
> +<class>
> +<name>space.page</name>
> +<customClass></customClass>
> +<customMapping></customMapping>
> +<defaultViewSheet></defaultViewSheet>
> +<defaultEditSheet></defaultEditSheet>
> +<defaultWeb></defaultWeb>
> +<nameField></nameField>
> +<validationScript></validationScript>
> +<property>
> +<disabled>0</disabled>
> +<name>property</name>
> +<number>1</number>
> +<numberType>long</numberType>
> +<prettyName>property</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<classType>com.xpn.xwiki.objects.classes.NumberClass</classType>
> +</property>
> +</class>
> +<object>
> +<class>
> +<name>XWiki.StyleSheetExtension</name>
> +<customClass></customClass>
> +<customMapping></customMapping>
> +<defaultViewSheet></defaultViewSheet>
> +<defaultEditSheet></defaultEditSheet>
> +<defaultWeb></defaultWeb>
> +<nameField></nameField>
> +<validationScript></validationScript>
> +<cache>
> +<cache>0</cache>
> +<disabled>0</disabled>
> +<displayType>select</displayType>
> +<multiSelect>0</multiSelect>
> +<name>cache</name>
> +<number>5</number>
> +<prettyName>Caching policy</prettyName>
> +<relationalStorage>0</relationalStorage>
> +<separator> </separator>
> +<separators> ,|</separators>
> +<size>1</size>
> +<unmodifiable>0</unmodifiable>
> +<values>long|short|default|forbid</values>
> +<classType>com.xpn.xwiki.objects.classes.StaticListClass</classType>
> +</cache>
> +<code>
> +<disabled>0</disabled>
> +<name>code</name>
> +<number>2</number>
> +<prettyName>Code</prettyName>
> +<rows>20</rows>
> +<size>50</size>
> +<unmodifiable>0</unmodifiable>
> +<classType>com.xpn.xwiki.objects.classes.TextAreaClass</classType>
> +</code>
> +<name>
> +<disabled>0</disabled>
> +<name>name</name>
> +<number>1</number>
> +<prettyName>Name</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
> +</name>
> +<parse>
> +<disabled>0</disabled>
> +<displayFormType>select</displayFormType>
> +<displayType>yesno</displayType>
> +<name>parse</name>
> +<number>4</number>
> +<prettyName>Parse content</prettyName>
> +<unmodifiable>0</unmodifiable>
> +<classType>com.xpn.xwiki.objects.classes.BooleanClass</classType>
> +</parse>
> +<use>
> +<cache>0</cache>
> +<disabled>0</disabled>
> +<displayType>select</displayType>
> +<multiSelect>0</multiSelect>
> +<name>use</name>
> +<number>3</number>
> +<prettyName>Use this extension</prettyName>
> +<relationalStorage>0</relationalStorage>
> +<separator> </separator>
> +<separators> ,|</separators>
> +<size>1</size>
> +<unmodifiable>0</unmodifiable>
> +<values>onDemand=On demand|always=Always</values>
> +<classType>com.xpn.xwiki.objects.classes.StaticListClass</classType>
> +</use>
> +</class>
> +<name>space.page</name>
> +<number>0</number>
> +<className>XWiki.StyleSheetExtension</className>
> +<guid>8eaeac52-e2f2-47b2-87e1-bc6909597b39</guid>
> +<property>
> +<cache>long</cache>
> +</property>
> +<property>
> +<code>some code</code>
> +</property>
> +<property>
> +<name>name</name>
> +</property>
> +<property>
> +<parse></parse>
> +</property>
> +<property>
> +<use>onDemand</use>
> +</property>
> +</object>
> +<object>
> +<class>
> +<name>space.page</name>
> +<customClass></customClass>
> +<customMapping></customMapping>
> +<defaultViewSheet></defaultViewSheet>
> +<defaultEditSheet></defaultEditSheet>
> +<defaultWeb></defaultWeb>
> +<nameField></nameField>
> +<validationScript></validationScript>
> +<property>
> +<disabled>0</disabled>
> +<name>property</name>
> +<number>1</number>
> +<numberType>long</numberType>
> +<prettyName>property</prettyName>
> +<size>30</size>
> +<unmodifiable>0</unmodifiable>
> +<classType>com.xpn.xwiki.objects.classes.NumberClass</classType>
> +</property>
> +</class>
> +<name>space.page</name>
> +<number>0</number>
> +<className>space.page</className>
> +<guid>e2167721-2a64-430c-9520-bac1c0ee68cb</guid>
> +<property>
> +<property>12</property>
> +</property>
> +</object>
> +<content>content</content></xwikidoc>
>
>
> Property changes on: contrib/sandbox/xwiki-extension-handler-xar/src/test/resources/repository/local/page.xml
> ___________________________________________________________________
> Added: svn:mime-type
> Â + text/plain
> Added: svn:eol-style
> Â + native
>
> Modified: contrib/sandbox/xwiki-extension-handler-xar/src/test/resources/repository/local/test-1.0.xar
> ===================================================================
> (Binary files differ)
>
> Modified: contrib/sandbox/xwiki-extension-handler-xar/src/test/resources/repository/local/test-2.0.xar
> ===================================================================
> (Binary files differ)
>
> _______________________________________________
> notifications mailing list
> notifications(a)xwiki.org
> http://lists.xwiki.org/mailman/listinfo/notifications
>