Hi,

The reality right now is that there is no alternative to this code that has
been moved to legacy, at least for part of it.

Let me explain a bit what some of this code is doing.

- it allows to create a java object XWikiQuery which represents an XWiki
Query in Java as a structured object per field. This object stores criterias
- the XWiki Core itself provides a function to display a search field for
each field of an XWiki class (displaySearch) and a function that allows to
retrieve the content of search a search field into an XWikiQuery object, as
well as a function to transform the part concerning the field in the
XWikiQuery object into an XWQL statement portion
- some functions in XWiki.java (moved to aspects in legacy) also allow to
generate a field to choose the columns and the sort fields for a query
- the query plugin allows to transform the XWikiQuery object into an XWQL
statement including the sort fields
- a function in XWiki.java allows in one call to read the data from
$request, create the XWikiQuery object, transform it in XWQL, run the query
and display the results as an HTML table
- another function allows just to run the query and velocity code can
present the results just the way you decide

The end results is a system to build query interfaces dynamically.

We haven't used this code because nobody has been trained on it. But still
it's very powerful code, and I'd hate to see it go away without a
replacement. Currently it's not that complex to keep it. Most of the code
is in the XWiki fields anyway. The code in XWikiQuery and in QueryPlugin is
not that complicated as it's just looping over the fields.

On the long run this code has even more capabilities, like being able to
run query aggregates in addition to just listing XWiki documents. This
could allow to do counting and summing using a UI and even generate a graph
out of the result using the Graph Plugin.

Once you activate the QueryPlugin in xwiki.cfg this code still works.

It would be great if somebody from the active committers looked at it and
we could work together to see where this code should be headed. I'm
available to help understand the code.

Right now the key functions are:

- the XWikiQuery class
- QueryPlugin.makeQuery
- XWiki.createQueryFromRequest
- XWiki.displaySearch
- XWiki.displaySearchColumns
- XWiki.displaySearchOrder
- and code in each XWiki Field class

less important code is:

- XWiki.search(XWikiQuery)
- XWiki.searchAsTable(XWikiQuery)

Ludovic




2012/11/16 Thomas Mortagne <[email protected]>

> On Fri, Nov 16, 2012 at 3:28 PM, Ludovic Dubost <[email protected]> wrote:
>
> > Can you point to the code of the old query plugin. I'm probably -1
> because
> > it contains some code that is usefull to generate Search UIs.
> > This code should be moved to the new query component before the plugin is
> > removed
> >
>
>
> https://github.com/xwiki/xwiki-platform/tree/master/xwiki-platform-core/xwiki-platform-legacy/xwiki-platform-legacy-oldcore/src/main/java/com/xpn/xwiki/plugin/query
>
> The whole point of moving something to legacy is that it's not used anymore
> and we provide alternative for it, if there is missing feature in the query
> module it should listed and added.
>
>
> > Ludovic
> >
> >
> > 2012/11/16 Eduard Moraru <[email protected]>
> >
> > > +1
> > >
> > > Thanks,
> > > Eduard
> > >
> > >
> > > On Fri, Nov 16, 2012 at 3:02 PM, Thomas Mortagne
> > > <[email protected]>wrote:
> > >
> > > > It is.
> > > >
> > > > This plugin is deprecated since a very long time. Look at
> > > > http://extensions.xwiki.org/xwiki/bin/view/Extension/Query+Modulefor
> > > > informations about the "new" one (which exists since 1.6).
> > > >
> > > > On Fri, Nov 16, 2012 at 12:57 PM, crocket <[email protected]>
> > > wrote:
> > > >
> > > > > What is the old query plugin? I hope it is not $xwiki.query.
> > > > >
> > > > >
> > > > > On Fri, Nov 16, 2012 at 7:32 PM, Thomas Mortagne
> > > > > <[email protected]>wrote:
> > > > >
> > > > > > Hi devs,
> > > > > >
> > > > > > Following the discussion on
> > > > http://markmail.org/message/uck6w56gqus2mxswI
> > > > > > would like to extract the query plugin from
> > > > xwiki-platform-legacy-oldcore
> > > > > > and move it to retired repository.
> > > > > >
> > > > > > The good things is that we will get rid of 3 jars in standard XE
> by
> > > > doing
> > > > > > this.
> > > > > >
> > > > > > I plan to do it in 4.4M1.
> > > > > >
> > > > > > WDYT ?
> > > > > >
> > > > > > Here is my +1
> > > > > > --
> > > > > > Thomas Mortagne
> > > > > > _______________________________________________
> > > > > > devs mailing list
> > > > > > [email protected]
> > > > > > http://lists.xwiki.org/mailman/listinfo/devs
> > > > > >
> > > > > _______________________________________________
> > > > > devs mailing list
> > > > > [email protected]
> > > > > http://lists.xwiki.org/mailman/listinfo/devs
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > Thomas Mortagne
> > > > _______________________________________________
> > > > devs mailing list
> > > > [email protected]
> > > > http://lists.xwiki.org/mailman/listinfo/devs
> > > >
> > > _______________________________________________
> > > devs mailing list
> > > [email protected]
> > > http://lists.xwiki.org/mailman/listinfo/devs
> > >
> >
> >
> >
> > --
> > Ludovic Dubost
> > Founder and CEO
> > Blog: http://blog.ludovic.org/
> > XWiki: http://www.xwiki.com
> > Skype: ldubost GTalk: ldubost
> > _______________________________________________
> > devs mailing list
> > [email protected]
> > http://lists.xwiki.org/mailman/listinfo/devs
> >
>
>
>
> --
> Thomas Mortagne
> _______________________________________________
> devs mailing list
> [email protected]
> http://lists.xwiki.org/mailman/listinfo/devs
>



-- 
Ludovic Dubost
Founder and CEO
Blog: http://blog.ludovic.org/
XWiki: http://www.xwiki.com
Skype: ldubost GTalk: ldubost
_______________________________________________
devs mailing list
[email protected]
http://lists.xwiki.org/mailman/listinfo/devs

Reply via email to