[daisy] target path for plugins
Bruno Dumon
bruno at outerthought.org
Wed Jul 9 16:13:28 CEST 2008
On Wed, 2008-07-09 at 14:18 +0100, Tim McDonald wrote:
> Hi
>
> I'm trying to modify the <target path="..."> in a repositories
> myconfig.xml file to target a plugin (as opposed to the inbuilt
> authentication services). However, I can't seen to work out what the
> path for the plugin should be.
>
> The runtime-config.xml file adds plugins using a directory command
> which is slightly different from the normal way the authentication
> services are added:
>
> <!--
> | Plugins to be loaded before the repository server starts.
> -->
> <artifact id="ntlm" groupId="daisy" artifactId="daisy-auth-ntlm"
> version="2.2"/>
> <artifact id="ldap" groupId="daisy" artifactId="daisy-auth-ldap"
> version="2.2"/>
> <artifact id="imagehook" groupId="daisy" artifactId="daisy-image-
> presavehook" version="2.2"/>
>
> <!--
> | Auto-add plugins from repository data directory that
> | should be loaded before the repository is started.
> -->
> <directory id="datadir" path="${daisy.datadir}$
> {file.separator}plugins${file.separator}load-before-repository"/>
>
> To clarify the plugin load's find I just can't find it....
>
It doesn't matter if modules are loaded via the 'artifact' tag or the
'directory' tag.
Configuration is retrieved from the ConfigurationManager using a group
and name, the path attribute in the myconfig.xml has as value
"group/name".
So it really depends on what you do in your plugin.
Assuming you're retrieving the configuration in spring, and have
something like this in your plugin's applicationContext.xml:
<conf:configuration group="mystuff" name="myplugin"
source="configurationManager">
then the path attribute would have as value "mystuff/myplugin".
If you look in Daisy's source, you will see e.g. the following for the
LDAP module:
<conf:configuration group="extra" name="ldap-auth"
source="configurationManager">
but in the myconfig.xml you'll see
<target path="/daisy/repository/authentication/ldap">
Following my previous explanation you would think it should be
"extra/ldap-auth". Well, this will actually work. The other path value
is for backwards compatibility with older Daisy installations. If you
grep the Daisy source code for this string, you'll find the mapping
table between the old and new paths.
--
Bruno Dumon http://outerthought.org/
Outerthought http://www.daisycms.org/
bruno at outerthought.org http://www.kauriproject.org/
More information about the daisy
mailing list