On Mon, Jun 2, 2008 at 1:36 PM, Andy Thomson <[EMAIL PROTECTED]> wrote:
> Hi Niklas,
>
> One of the reasons I left the original SITE command Map in place is because
> I did not want to replace all of those commands, I only wanted to add one or
> two new ones.

Agreed.

> In addition I did not want to pull back the SITE command list,
> build a new Map with the old and new commands,then replace the SITE command
> map.  It was easier to just add the setCommand() to the CommandFactory
> interface, and then implement the method in the SITE class.

The way we do the similar thing in DefaultCommandFactory is to use two
separate maps, one for the default commands and one for the custom.
Then, at resolution time we consult them both (if default commands are
to be used). My design above uses the same pattern.


> The SITE.getCommand() method can look for the
> requested command in the default map first, if it's not there, it can then
> search the user map (if one is defined).

Yes, that's exactly how we do it for commands in general, although the
other way around so that you can replace the default commands.

> A method such as isUseDefaultSiteCommands() is a good idea. Maybe just add
> it to the CommandFactory interface?

Yes, that was my thought in the previous mail.

/niklas

Reply via email to