No subject
Thu Sep 27 13:07:54 UTC 2007
public BaseClass getAggregatorURLClass(XWikiContext context)
throws XWikiException
{
XWikiDocument doc;
boolean needsUpdate = false;
doc = context.getWiki().getDocument("XWiki.AggregatorURLClass",
context);
BaseClass bclass = doc.getxWikiClass();
if (context.get("initdone") != null)
return bclass;
bclass.setName("XWiki.AggregatorURLClass");
needsUpdate |= bclass.addTextField("name", "Name", 80);
needsUpdate |= bclass.addTextField("url", "url", 80);
needsUpdate |= bclass.addTextField("imgurl", "Image url", 80);
needsUpdate |= bclass.addDateField("date", "date", "dd/MM/yyyy
HH:mm:ss");
needsUpdate |= bclass.addNumberField("nb","nb",5,"integer");
String content = doc.getContent();
if ((content == null) || (content.equals(""))) {
needsUpdate = true;
doc.setContent("#includeForm(\"XWiki.ClassSheet\")");
}
if (needsUpdate)
context.getWiki().saveDocument(doc, context);
return bclass;
}
> > One of the things they would
> > check is if "PluginGuide.pluginname" exists, where pluginname is what
> > they return in response to getName(). If "PluginGuide.pluginname"
> > doesn't exist, they'll create one, setting the title, etc. They
> > *could*, in theory, either add a field to that document or use the
> > document's inherent version to decide whether or not the document
> > should be all out replaced at some later point, so that when the
> > plugin is updated/loaded, the page is updated.
> >
> > The plugin code itself is the repository of all knowledge as far as
> > what xwiki properties it understands, how the methods should be
> > invoked, etc. That way, if I want to know how to use the feed plugin,
> > I can just go to PluginGuide.feed, and find out.
This does imply creating docs in the local user install (perhaps w/ an
option). Which would mean, for example, that if you enabled the plugin
on xwiki.org, you'd get the latest doc (under PluginGuide.pluginname
rather than Code.Plugins), w/o having to update two separate places.
>
> I'm just not understanding the first part of this email about the
> PluginGuide stuff. The rest matches my thinking too. We're just
> missing tech writers to do the job.
>
Does that make it any clearer?
--
'Waste of a good apple' -Samwise Gamgee
More information about the devs
mailing list