Allow ToolListener to be configured to use a path other than /tools/

Description

I was doing a little bit of development and had ny tool registration files in /WEB-INF/tools/ which is wrong (should be in /tools/) the ToolListener doesn't warn when it can't find the folder (or it doesn't register any files). So I've added some logging at WARN level as if you have the ToolListener but not tool registration files you can probably remove the listener (or add a tool registration file in the correct place.

I also allowed for the tool registration folder to be configurable with a context init parameter (defaulting to /tools/), context listeners can't have configuration directly so we have to use a context init parameter.

Attachments

2
  • 14 Jun 2011, 01:40 PM
  • 17 Dec 2010, 06:56 AM

Activity

Show:

Matthew Jones August 16, 2011 at 7:40 AM

That sounds good too, submit a patch. winking face The one we had replaced it, so that was the easiest, that sounds more complex.

Also tool titles and descriptions are overridden by the ones in the config localization bundles anyway, so the only reason you'd really want to be changing these registrations is to make a lot of modifications to tool categories, adding a new registration (like for https://sakaiproject.atlassian.net/browse/SAK-19369#icft=SAK-19369) or changing other settings.

Matthew Buckett August 16, 2011 at 7:34 AM

I would have preferred the file loaded from sakai_home to have extended the default tool configuration, rather than replacing it, that way a tool developed can change the tool's registration file and people don't have to take new copies and put them in sakai_home.

So for example if you just wanted to override the tool's title you could have a tool registration file with:

<registration>
<tool id="sakai.sites" title="The Site Tool Rocks!"></tool>
</registration>

and the configuration/description bundled with the tool still applies, just the title is changed.

Hudson CI Server June 30, 2011 at 2:15 PM

Integrated in kernel-trunk #323 (See http://builds.sakaiproject.org:8080/job/kernel-trunk/323/)
https://sakaiproject.atlassian.net/browse/KNL-342#icft=KNL-342 apply patch for alternate tools directory

Matthew Jones June 30, 2011 at 1:54 PM

FYI: The descriptions and names changes still will not be pulled out of this file if they exist in
/config/localization/bundles/src/bundle/org/sakaiproject/localization/bundle/tool/tools.properties.*
That file will (currently) take precedence. (https://sakaiproject.atlassian.net/browse/SAK-19720#icft=SAK-19720)

Beth Kirschner June 30, 2011 at 1:48 PM

Patch looks good – verified and applied to trunk.

Fixed

Details

Priority

Fix versions

Components

Assignee

Reporter

Labels

Created December 7, 2009 at 7:20 AM
Updated March 23, 2022 at 3:03 PM
Resolved June 30, 2011 at 1:48 PM

Flag notifications