Hi devs,

I’d like to add a new script API in oldcore.

I need a new API to know if the XAR export feature is available so that the 
Page level XAR export button is displayed (I’m trying to fix 

I was thinking about adding some XXXScriptService in oldcore but the right hint 
would be “xar” and XXX would be “XAR”. The problem is that we already have one 
in xwiki-platform-xar (which right now is used by oldcore and thus I cannot add 
this new method to the existing XarScriptService that is there).

I can’t find any name or hint that would make sense on the long run for 
oldcore. Some other ideas:
* OldCoreScriptService, hint = “oldcore” and we consider it something temporary 
that will need to go away and deprecate
* CoreScriptService, hint = “core”. Same
* ImportExportSerciceService, hint = “?”

Last, I have the option to continue what we’ve done so far which is increase a 
bit more the size of api.XWiki. For example we have in there the following 
method which does something similar:

 * @return true if title handling should be using the compatibility mode or 
not. When the compatibility mode is
 *         active, if the document's content first header (level 1 or level 2) 
matches the document's title the
 *         first header is stripped.
public boolean isTitleInCompatibilityMode()
    return this.xwiki.isTitleInCompatibilityMode();

so I could add XWiki.isXARExportAvailable()…

WDYT? Any preference?

Right now I have a hard time deciding. I hate it but I’m considering adding a 
new method to the XWiki class, but I’d love to find something better.


devs mailing list

Reply via email to