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