Hello devs,
got a really newbie question and sitting on it for hours.
Your help will be appreciated. All I am trying to do is
- writing a Java class which has a method - when called
with doc name/ID will return the document title. That is all.
The following code is what Itried:
import com.xpn.xwiki.XWikiContext;
import com.xpn.xwiki.api.Api;
import com.xpn.xwiki.api.XWiki;
import com.xpn.xwiki.doc.XWikiDocument;
public class SampleService extends Api
{
public SampleService()
{
super(); /// I guess there should be XwikiContext parameter in
the constructor
}
public String myDocTitle(String:name)
{
com.xpn.xwiki.doc.XWikiDocument docu =
context.getWiki().getDocument("theSpace.theDoc", context); // I do
not where to get this context from
return docu.getTitle();
}
}
Hello all,
Following the initial discussion at
http://markmail.org/thread/kachlhm3d26g22jb I by this mail throw a vote
to move on and create the contrib project.
After giving it some more thoughts in a discussion with Vincent, here is
what I propose :
1) Create a "contrib" top level project, so create :
- The "contrib.xwiki.org" wiki with the draft at
http://dev.xwiki.org/xwiki/bin/view/Drafts/Contrib-Main-WebHome as
initial content for it's Main.WebHome
- List this wiki in the Main.Forge page on www.xwiki.org, and also
refactor a little this page using the content at
http://dev.xwiki.org/xwiki/bin/view/Drafts/Www-Main-Forge (The main
noticeable difference is the change of wording between "XWiki Products
and Extensions" to "XWiki [Top Level] Projects", and the fact platform
now belongs to the list).
- Create a contrib directory at svn.xwiki.org/svnroot/, with the
following architecture :
contrib/
|__people/
|__projects/
|__retired/
|__sandbox/
*people* will be a directory for "personal tests" projects (such as
http://svn.xwiki.org/svnroot/xwiki/sandbox/xdom/). The idea is behind is
to give whoever requests it a personal space where he can experiment
with XWiki code, and that space is private (i.e. an implied rule is that
people are not supposed to commit code in others projects, thus making
it different from sandbox projects). Each sub-folder of people/ will be
composed of the name of the person that requests his project, for
example "jvelociter".
*projects* will hosts the actual contrib projects, that are active
(meaning that they still do make sense as projects in the XWiki
ecosystem, they are not abandoned, etc.)
*retired* will be the "place where dead project go ;(" for example
http://svn.xwiki.org/svnroot/xwiki/sandbox/xeclipse-gsoc/ since it's now
replaced by the XEclipse top level project.
*sandbox* will be the new place for the current sandbox. We therefore
propose to move all sandboxed projects here (except for the retired ones
that will go straight to california).
2) Create a "XWiki Contribs" JIRA project with projects from "sandbox"
and "projects" as components. Note that we want to leave open the
possibility for big projects to have their own JIRA on our installation
as well. We will move existing issues that are right now correctly
componentized in the current XSANDBOX to the new project, and lose the
other ones (which are a couple of old closed issues AFAIR).
Here is my +1
Please let me know what you think of all this. If we agree I'd like to
make the move during the week.
Thanks,
Jerome.
Hi Everyone,
Is there any Hibernate database interface that I can use to store my own
data like design rationale object?
Hi Marius for last time I asked your that:
Could you explain a little how WYSIWYG editor can restore data using
Hibernate? Is there is a API for that or something else. Could you also
point me the package which handle the data restore?
Here is me at Graduate Forum handout XWiki flyers and people are interested
in XWiki :-)
Link:
http://picasaweb.google.com/lh/photo/mNzlYPKesLmiRRfwb2GTiA?feat=directlink
Thank you everyone! XWiki is awesome!
Hi Sergiu, all
I see in the XWikiHibernateStore that #countDocuments do distinct
documents by language while #searchDocuments does not.
I would have expect both to have the same behavior, so that we can use
them safely using the same query as input (for example for pagination).
Is there a reason for originally doing "select count(*)" versus select
"count(distinct doc.fullName)" ?
I think in any case we should have this API that does not distinct by
language. Should it replace the current behavior ? or should we add a
new API #countDocuments(String wheresql, boolean distinctFullname,
XWikiContext context) ?
Thanks,
Jerome.