At 4:42 PM -0400 9/21/04, Deadman, Hal wrote:
Looking at the RequestProcessor code there are some casts to
ActionMapping so you probably need to extend that rather than
ActionConfig. You will also be extending Martin's DownloadAction
abstract class to write a version that knows how to instantiate a
StreamInfo from mapping properties. I don't see where any other
interfaces would help. I think the fact that StreamInfo is an interface
is enough.

Yup, I guess I should have looked at the original source code.

Martin prescribes an abstract method:
    protected abstract StreamInfo getStreamInfo(ActionMapping mapping,
            ActionForm form, HttpServletRequest request,
            HttpServletResponse response)
            throws Exception;

It would be inside this method where the ActionMapping would need to be decoded to determine its custom properties. If there was no core implementation of this method, then there would be no corresponding interface defining those properties.


I was afraid of a "DownloadActionMapping" class which implemented those properties. But if only users of Struts ever implement the getStreamInfo method, then users of Struts can be responsible for deciding how to configure the ActionMapping which gets passed in there.

Sorry if I increased the confusion.

Joe




-----Original Message-----
From: Frank W. Zammetti (MLists) [mailto:[EMAIL PROTECTED]
Sent: Tuesday, September 21, 2004 4:05 PM
To: Struts Developers List
Subject: Re: On Martin Cooper's DownloadAction...

Did you really mean to say don't base the ACTION on a concrete subclass?

If so, I'm a bit confused (which is my usual state of being, so all is
well)...

The way I am looking at it, the only thing I'm extending is the
ActionConfig, which is a class.  The Action Martin wrote of course
extends
Action.

Did I completely miss your meaning? (Ok, let me amend that to cover the
most likely scenarioa: IN WHAT *DID* I completely miss your meaning? :)
)

--
Frank W. Zammetti
Founder and Chief Software Architect
Omnytex Technologies
http://www.omnytex.com

On Tue, September 21, 2004 3:46 pm, Joe Germuska said:
(1) Extend ActionMapping and have accessors and mutators for all the
"extra" attributes needed (whatever they may actually be, still open
for
debate)

Admitting that I haven't been following this thread closely...

 please, base the Action on an interface, not a concrete subclass of
 ActionMapping (ActionConfig).  The last thing we need is another
 single-inheritance trap.

 Thanks
        Joe

 BTW, I think it would be cool to have some core stuff which
 demonstrates the idea of using custom ActionMappings, as it's a
 powerful piece of functionality that I think is generally not
 understood by beginning Struts developers.

 --
 Joe Germuska
 [EMAIL PROTECTED]
 http://blog.germuska.com
 "In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn
 back; I'll know I'm in the wrong place."
     - Carlos Santana

 ---------------------------------------------------------------------
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


--
Joe Germuska [EMAIL PROTECTED] http://blog.germuska.com "In fact, when I die, if I don't hear 'A Love Supreme,' I'll turn back; I'll know I'm in the wrong place."
- Carlos Santana

Reply via email to