You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Sean Schofield <se...@gmail.com> on 2004/12/29 23:07:51 UTC
[chain] Retrieving a command using Catalog:Command syntax
I wanted to move this discussion from struts-dev to commons-dev in
case anyone here wants to comment on this idea.
Here is a link to the original email:
http://www.mail-archive.com/dev%40struts.apache.org/msg05736.html
Here is my latest response:
> This is definitely an interesting notion, and probably does belong in
> Commons Chain itself.
Agreed.
> To avoid any backwards compatibility issues, it might be easiest to add a
> getCommand() method to CatalogFactory that
> does this lookup (that kind of method doesn't really fit into a class
> named CatalogFactory very well ... but its at the correct
> architectural level).
What about a CatalogUtils class (or maybe CommandUtils)? You could
have a couple of static methods in there for doing this...
getCommand(String catalogName, String commandName)
getCommand(String catalogCommandPair)
...
etc.
> Regarding syntax, I like the ':' idea, but have only one reservation
> -- what if we later on wanted to implement some sort of URL-ish
> interpretation where the prefix was treated as an access scheme of
> some sort (like "http:" or "ftp:" in a typical URL), and a string like
> "foo:bar:baz" would mean "use access method 'foo' to access catalog
> 'bar', then load command 'baz'. Perhaps we should reserve for future
> use any string that has more than one ':' in it.
>
Maybe this wouldn't be an issue with a "Utils" class as mentioned above.
getCommand(String accessMethod, String catalogName, String commandName)
getCommand(String catalogCommandPair)
getCommand(String catalogCommandPair, String accessMethod)
... or something like this ... you get the picture.
> Craig
sean
---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org