Vincent Massol wrote:
/* Returns a list of all the changed pages starting from a given date */ public List<XWikiPageHistorySummary> getModifiedPagesHistory( Date date, Integer numberOfResults, Integer start, Boolean fromLatest)
/*
what is "start"? what is "fromLatest"?
Start is the start offset when dealing with big result sets. So instead of bulk-transferring 10000 results, for example, I can transfer all of them, 50 results at a time (numberOfResults) by varying the start offset. fromLatest is basically the order. If it's true then the order is descending (recent modifications are transfered first). Maybe another name would be better.
Can't we have a searchDocument() API as in the XWiki class for doing queries?
This function, if I am not wrong, should do something more wrt searchDocument, i.e., returning all the modifications dates for all page revisions and not only for the latest versions.
Can you explain what happens if checkVersion is true?
If checkVersion is true then before storing the page, the version of the page to be stored page is checked against the latest version of the page on the xwiki. What can happen is the following: 1) getPage("x") -> (x, 1.4, content) 2) somebody updates via web "x" so that now the version in the wiki is 1.5 3) storePage((x, 1.4, content), true) This fails because the current version of x is different from that when x was retrieved (somebody has modified the page in the meanwhile). Of course this mechanism can be implemented client side (this is what is done in XEclipse, for example) by calling a getPage just before a storePage. But by putting it on the server we can guarantee a better "atomicity" for preventing the replacement of the content that could have been changed during the network transfer. -Fabio