Hello devs,
I've been working on the support of pretty thumbnails picture for XE
(other mail coming on later). I've had the need for a couple of new
bridge APIs, namely in DocumentAccessBridge :
int getObjectNumber(DocumentReference documentReference,
DocumentReference classReference, String parameterName, String
valueToMatch);
to get the number of the first object that has a property with a
certain value in a document. Sort of similar to
com.xpn.xwiki.api.Document#getObject(String, String, String)
Object getProperty(DocumentReference documentReference,
DocumentReference classReference, int objectNumber, String
propertyName);
to get the value of a property for the Nth object of a class in a
document (to be used in combination with the previous one for
example).
and finally :
Object getProperty(ObjectReference objectReference, String propertyName);
Object getProperty(ObjectPropertyReference objectPropertyReference);
two new APIs to get properties value based both on object reference +
property name, or just property reference
Let me know what you think
My +1
--
Jerome Velociter
Winesquare
http://www.winesquare.net/
Hello,
For my work on the pretty thumbnails I also had the need to add some
service API to the Model module script service. Basically the same
kind of APIs that did already exist to resolve documents and
attachments from a string representation, but this time to resolve
object references and object properties references.
Here they are :
public ObjectReference resolveObject(String stringRepresentation)
public ObjectReference resolveObject(String stringRepresentation,
String hint, Object... parameters)
public ObjectPropertyReference resolveObjectProperty(String
stringRepresentation)
public ObjectPropertyReference resolveObjectProperty(String
stringRepresentation, String hint, Object... parameters)
WDYT ?
My +1
--
Jerome Velociter
Winesquare
http://www.winesquare.net/
I have found that I like static private functions because they allow me to make promises about my code, making it more self explanatory and I was interested in opinions from others about it.
It's not something I would want to force on other people but I would use it myself if people don't think it's too messy.
Reasoning:
A private method which does not touch any state of the is easy to review, it has no side channels to modify or access information so:
#1 with the same inputs it will always give the same output.
#2 it will not affect the world around it aside from it's inputs and output (no surprise side effects).
By declaring the private method static, you make that promise and the compiler will hold you to it.
As a reviewer I can let my guard down when looking at the code because it doesn't affect object state so it can't be the source of some types of bugs. The code is sandboxed so to speak.
These assumptions do not hold true if static variables are used but I believe those should never be used unless absolutely necessary and when they are, code should be reviewed more closely anyway.
Example:
https://github.com/xwiki/xwiki-rendering/blob/master/xwiki-rendering-transf…
If I were writing this now, I would be tempted to make these into static functions:
private Block convertToDeepTree(Block sourceTree, String iconName)
private void mergeTree(Block targetTree, Block sourceTree)
private int indexOf(List<Block> targetBlocks, Block block)
private boolean blockEquals(Block target, Block source)
Anyone have any thoughts on this pattern?
Caleb
Hi devs,
I've just realized that using @override is enough to generate a proper javadoc copied from the overriden method and that checkstyle doesn't complain either.
Basically instead of writing:
/**
* {@inheritDoc}
*
* @see org.xwiki.logging.LoggerManager#popLogListener()
*/
@Override
public EventListener popLogListener()
We can simply write:
@Override
public EventListener popLogListener()
Advantages:
1) Less text to type and smaller class files
2) Less duplicated text
I thus propose to use this from now and to progressively remove unnecessary javadoc in our legacy code.
BTW this is also explained in the javadoc tool:
See section "Automatic Reuse of Method Comments" in http://download.oracle.com/javase/1.3/docs/tooldocs/win32/javadoc.html
WDYT?
Here's my +1
Thanks
-Vincent
Guys, I should have sent this mail before pushing my changes but here it's just after the fact…
Basically I've replaced xwiki-platform-swizzle with xwiki-platform-jira
The details are on http://jira.xwiki.org/jira/browse/XWIKI-6879
I hope it's fine.
My next step is to make it work with the extension manager (thomas M is on it) and to document it on extensions.xwiki.org.
Thanks
-Vincent
In order to fix a problem with the cache, I would like to add a pointer type to the storage api.
The problem with the cache is there are multiple names which, when asked of the persistent store,
return the same document. There is no effective way to know what all names which will return that
document. When a document is modified, it is removed from the cache but the only version removed is it's
"real" name. All of the other names for it linger in the cache eating up memory and threatening to
provide someone stale data.
Instead of caching the document, we could cache a pointer to the document and when it became stale,
the pointer could be set to null and then any other name under which that document was cached would look
up a null pointer and the cache logic could remove it.
I would like to add it to xwiki-platform-store-api module and it will look roughly like this:
package org.xwiki.store;
public final class Pointer<T>
{
/** The thing which this pointer points to. */
public T target;
}
WDYT?
Caleb
Hi devs,
Could each of you update the status of the Roadmap items for XE 3.2 to know where we stand. Be as precise as possible please. If you have any doubt about whether you'll be able to implement something in due time please raise it so that we can discuss and try to find solutions (reduce scope, get some help, etc).
As a reminder we have one more milestone (3.2M3) before the RC. Here are the dates again:
* 3.2M3: 12 Sep 2011
* 3.2RC1: 26 Sep 2011
* 3.2 Final: 10 Oct 2011
Roadmap items:
• UI for extension manager + backend extension manager (continued, especially nice XAR upgrades). Thomas + Jean-Vincent
• Search improvements and especially scoring, French support and wildcard issues (continued from 3.1). Sergiu
• App Within Minutes. Marius
• XE-923: Implement user dashboard. Anca
• XWIKI-6504: Convert Panels application into syntax 2.0. Sergiu
• XWIKI-6676 (UI does not report failed delete actions of attachments) and XWIKI-6623 (Attachment upload failure gives no feedback to user). Sergiu
• Fix issues with Oracle support. Specifically XWIKI-6682 and XWIKI-6683. Vincent + Sergiu + Sorin
• Fixes for HTTPS support. Specifically XWIKI-6690, XWIKI-4489 and XWIKI-5771. Sergiu to help
• XWIKI-6687 Be able to delete a space from the UI. Marius
• Stats module improvements (Commit code from client projects without changes). Marius
• LDAP Admin UI (commit Jerome work without changes)
• XWIKI-5037: Clustering bug preventing a node from restarting. Vincent + Thomas
• XWIKI-6684 Use a predefined Space Template like Dashboard, Livetable when creating a new space. Anca
• XWIKI-6073 Change stylesheet and javascript extension filename when a modification is done on those
• Rest improvements (Restlet upgrade + re-organization of the rest module - already started). Jerome
• Suggest widget improvements and bug fixes (better highlighting, better performance, new options - already started as well). Jerome
• Cache improvements, namely: XWIKI-6170, XWIKI-6173 and XWIKI-6169. Caleb
• Fix functional tests to work with CSRF protection: XWIKI-5465. Alex
• Performance tests. Marius
• Selenium 1 to Selenium 2 move for the WYSIWYG functional tests. Marius
• Integrate some Wiki 3.0 workspace features into XEM. Eduard
Thanks
-Vincent
Hello,
I have a XWiki object of a class where one property is defined as a
list. During the page creation of this object (by using appropriate
template provider) I'm setting several values from the list of possible
values for the property. My problem is that although I've set several
values I still get just one value when I look at the object properties
in appropriate sheet class. E.g.
I do have BookClass which besides other props defines property `kind'
where kind might have `fantasy', `drama', or `novel' value. It also
might have several values -- well, not good example but I hope this
illustrates what I'm doing here.
And now when I create new page as a book I set several kinds (for
example fantasy & drama) then when I see the page I see only fantasy as
the book kind.
I'm using XWiki 3.1 snapshot as of May 27 2011. My question is it a
known bug, am I doing anything wrong or was it already fixed (in case of
bug)?
Thanks a lot!
Karel
Dear all,
I am on the way of replacing the xmlrpc implementation of
RemoteXWikiDataStorage implements IDataStorage {}.
One question is about how to implement login and logout functionality
via REST API.
From REST API document, users can be authenticated via something like:
1. XWiki session
2. HTTP Basic Auth.
HTTP basic auth can be implemented via adding HTTP header to the HTTP
request, then XEclipse can display Xwiki Resources by parsing the response.
Therefore, do we need to implement login and logout methods?
Best regards
Jun Han
Hi all,
I've finished development of the XWiki Android Client. I also finished XWiki
REST library unit tests and instrumentation tests for the UI components will
be added soon.
Here is a demo of the application.(This demo is captured using the Android
emulator which may result slow response than an actual device)
( http://www.youtube.com/watch?v=aiEM0iNMnTE )
Please give me your feedback so that I can improve the project.
Thank you,
Best Regards,
Chamika Weerasinghe
Hi, Last week I have done following things:
1. Refine the link autosuggestion functions according to the code review of
Marius
2. Clean the code and wrote the README file for link autosuggestion
functions, including:
a. Introduction to link autosuggestion functions, describing its
features;
b. Report the added files and the modified files
c. Installation instructions
3. Testing it in Firefox, chrome, safari and ie6, ie7, ie8. Currently:
a. Firefox works fine in both linux and windows. Not test in IOS
b. Suggestion box can not be shown in the right place in chrome, I have
found the problem, and I am fixing it now.
c. Safari works fine in windows. not test in linux and IOS.
d. Haven't test in ie6, ie7 and ie8
In next week, I will do the following things;
1. Continue testing it in
a. Safari in Linux.
b. fix the bug found for chrome
c. test it in ie6, ie7 and ie8.
2. Write jasmine tests for link autosuggestions.
--
Best wishes,
许凌志(Jame Xu)
MOE KLINNS Lab and SKLMS Lab, Xi'an Jiaotong University
Department of Computer Science and Technology, Xi’an Jiaotong University
Hi devs,
I'd like to propose adding the Ivy JAR to our Platform/XE distributions.
The reason is simple: it makes it possible to use the Groovy @Grab directive which makes it real easy to extend XWiki using Groovy script.
Several advantages:
- not having to manually hunt for transitive dependencies
- not needing to stop/restart XWiki (since this is what you need to do if your groovy script needs to use some third party jars).
Here's a good usage example:
{{cache}}
{{groovy}}
@Grab(group='org.codehaus.groovy.modules.http-builder', module='http-builder', version='0.5.1')
import groovyx.net.http.RESTClient
github = new RESTClient( 'http://github.com/api/v2/json/' )
println "|=Project|=Description|=Use Wiki?|=Use Issues?"
def response = github.get( path : 'repos/show/xwiki' )
response.data.repositories.each() { repo ->
println "|[[${repo.name}>>http://github.com/xwiki/${repo.name}]]|${repo.description}|${repo.has_wiki}…"
}
{{/groovy}}
{{/cache}}
If you try to do this without the grab directive you'll find yourself hunting down more than 30 jars which you'll need to put in your WEB-INF/lib directory, whereas here it's a single line directive. It's really powerful.
Here's my +1 to make it easy for users to use Groovy scripts.
Thanks
-Vincent
Hi devs,
Since 1) we are currently testing only on one browser (FF 3.6 right now) and 2) since FF 6 is now the mainstream version and since 3) we have an issue with latest selenium2 and FF 3.7 (see http://code.google.com/p/selenium/issues/detail?id=2320), I propose to update our agents to use FF 6.0.
I'm going to proceed so shout if you don't agree.
Thanks
-Vincent
Hi devs,
It seems someone has been adding some components in the XWiki Platform jira project (such as "PDF Export", "Plugin API", "HTML Export", etc).
I thought we had agreed that the components listed there would only be modules. This is how Thomas and myself configured it.
Unfortunately JIRA doesn't have an activity stream to know who did this :)
Could that person come up so that we have a discussion?
Thanks
-Vincent
Hi devs,
We need some volunteer to:
- upgrade xwiki.org from 2.6 to 3.1 (http://www.xwiki.org/xwiki/bin/view/XWiki/Migrations)
- upgrade myxwiki.org from 3.1 to 3.2M2 (to test the 3.2 upcoming release) (http://myxwiki.org/xwiki/bin/view/XWiki/Upgrading)
I have done it a lot recently and I think it's fair that it's not always the same person who do it.
So is there someone who has never done it or hasn't done it in a while who's willing to do one of these?
(Note that I can be available to do it with this person to explain things or be there in case of an issue)
Thanks
-Vincent
Hi devs,
It would be good to release XWiki Rendering to Maven Central since it's a standalone library and we've already had requests from people who are using it but cannot release their own artifacts to Maven Central since XWiki Rendering JARs are not there.
I'm thus proposing to fix this by release XWiki Commons and XWiki Rendering to Maven Central.
Advantages:
- technical marketing
- makes it easier to external people to use XWiki rendering (no need to modify their settings.xml and add the XWiki remote repo)
- makes it possible for people depending on XWiki Commons/Rendering to publish their own artifacts to Central
Here's my +1
Thanks
-Vincent
Hello fellow developers,
I had a look at the index that we use in Curriki and one of them is suspicious to me.
As expected id and names are index keys for most table, that is correct.
However, one is suspect in several of the value tables: index on XWL_VALUE.
Do I understand correctly that this means these indexes is loaded into a btree (i.e. a ram-representation) of all the strings of xwiki, e.g. all the documents page content??
This seems wrong to make an index for this.
But http://platform.xwiki.org/xwiki/bin/view/AdminGuide/Database+Administration indeed recommends that:
> create index xwl_value on xwikilongs (xwl_value);
> create index xwi_value on xwikiintegers (xwi_value);
> create index xws_value on xwikistrings (xws_value);
> create index xwl_value on xwikilargestrings (xwl_value(50));
So... can someone explain me why such indices are created?
Would it be to honour the MySQL-based user-search?
thanks in advance
Paul
> mysql> show index from xwikilargestrings;
> +-------------------+------------+--------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
> | Table | Non_unique | Key_name | Seq_in_index | Column_name | Collation | Cardinality | Sub_part | Packed | Null | Index_type | Comment |
> +-------------------+------------+--------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
> | xwikilargestrings | 0 | PRIMARY | 1 | XWL_ID | A | 468592 | NULL | NULL | | BTREE | |
> | xwikilargestrings | 0 | PRIMARY | 2 | XWL_NAME | A | 937185 | NULL | NULL | | BTREE | |
> | xwikilargestrings | 1 | idl_value | 1 | XWL_VALUE | A | 312395 | 50 | NULL | YES | BTREE | |
> | xwikilargestrings | 1 | FK6661970F283EE295 | 1 | XWL_ID | A | 468592 | NULL | NULL | | BTREE | |
> | xwikilargestrings | 1 | FK6661970F283EE295 | 2 | XWL_NAME | A | 937185 | NULL | NULL | | BTREE | |
> +-------------------+------------+--------------------+--------------+-------------+-----------+-------------+----------+--------+------+------------+---------+
> 5 rows in set (0.00 sec)
Dear all,
I am working on extend the putPage method to add 'copy' and 'rename'.
uriInfo is used to get the additional query parameter, e.g.,
(1) ?copyFrom=aWiki:aSpace.oldPage
(2) ?moveFrom=aWiki:aSpace.oldPage
Following Eduard and Sergiu's emails,
XWiki.copyDocument(sourceDocumentReference, targetDocumentReference,
context) and
XWikiDocument.rename(newDocumentReference, context) are utilized to
solve (1) and (2), respectively.
Now I want to confirm the behaviors of copyFrom and moveFrom.
a) If the new page resource does not exist,
1. copyFrom method will return the newly created resource, and
"copied from xxx" is mentioned in the page history of new page.
The source page remains untouched.
2. moveFrom method will also return the newly created page and
source page is deleted.
b) If the new page resource already exists,
both copyFrom and moveFrom will do nothing. The existing page and
source page remain untouched.
Are these the desired functions for copyFrom and moveFrom methods?
Best regards
Jun Han
Hi devs,
Since we're having a hard time stabilizing our build and since there are always stuff to do to improve our build I'm proposing to introduce the notion of Build Day as an experiment.
The idea is that on this day all developers will focus only on improving the Build. More specifically:
- working on making all tests pass
- fix flickering tests if any
And if there are no more tests issues then the following items can be considered too (as a secondary objective only since the main goal is fixing the build):
- upgrade versions of maven plugins
- make the build run faster
- look for TODO in the pom.xml and fix them if possible
- etc
WDYT?
What about doing our first Build Day on Thursday the 25th of Augsut 2011?
Thanks
-Vincent
PS: This is NOT replacing the Build Manager role. It's an addition to it.
Hi,
I propose to host the PlantUML Macro extension
(http://extensions.xwiki.org/xwiki/bin/view/Extension/PlantUML+Macro)
source files on the XWiki Contrib GitHub repository. Althought this
macro is only groovy code included in wiki pages, it will be easier to
keep track of the different changes.
In my opinion, the other hosting tools (jira, continuous build) are not needed.
Is there an existing contrib project of the same kind (ie wiki macro)
that I can use as a template to build the directory tree ?
Thanks for your answer.
Maxime Sinclair
Hi, Last week I have done following things:
1.Implemented the relative references for link generation
2. implemented the default suggestions for sub-trigger "attach:", "." and
"@"
The default suggestion for trigger "attach:" is the attachments that
belongs to recently modified pages.
The default suggestion for trigger "." has two different situations:
1). when "." is after "attach:" the default suggestion is the
attachments that belongs to recently modifed pages under the specific space
2). when "." is not after "attach:" the default suggestion is the wiki
pages under specific space.
The default suggestion for trigger "@" is the attachments that belongs
to the specific wikipage.
3. Re-design the interface of the suggestion box according to Marius'
suggestions, and it attracts some advantages from the suggestion box of
confluence wiki.
Till now the Major functions for link suggestion of wiki editor has been
done, here is the video of the link suggestion for wiki editor.
Please see the demo video: http://www.youtube.com/watch?v=2_be-3oqgzE
In next week, I will do the following things;
1. Design the image suggestion functions and discuss with mentors.
2. Test the link suggestion functions in IE, chrome, to consider the
compatibility of the functions.
3. Refine the functions accroding to the review of mentors.
--
Best wishes,
许凌志(Jame Xu)
MOE KLINNS Lab and SKLMS Lab, Xi'an Jiaotong University
Department of Computer Science and Technology, Xi’an Jiaotong University
The XWiki development team is proud to announce the availability of
XWiki Enterprise 3.2 Milestone 2, the second milestone of the XWiki
Enterprise 3.2 version (see the roadmap at
http://enterprise.xwiki.org/xwiki/bin/Main/Roadmap ). Main new features
include:
* support for user-defined, personal dashboards,
* improvements to the spotlight-like search suggestions,
* improvements to the extension manager,
* support for arbitrary named parameters in the event stream,
* ... and a few dependency upgrades and bug fixes
See the full release notes at
http://purl.org/xwiki/rn/ReleaseNotesXWikiEnterprise32M2 for more details.
--
Sergiu Dumitriu
http://purl.org/net/sergiu/