You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@cocoon.apache.org by Bruno Dumon <br...@outerthought.org> on 2002/09/03 17:22:38 UTC

Source and SourceResolver confusion

I'm a bit confused about the Source & SourceResolver in HEAD. Apparently
the org.apache.cocoon.environment.Source has been deprecated, but the
org.apache.cocoon.environment.SourceResolver is not (and still returns
deprecated cocoon Source objects).

In the act method of the Action interface, a reference to the cocoon
SourceResolver is passed, so I'm obliged here to use the deprecated
Source class.

Is this a known fact, a bug or am I missing something?

-- 
Bruno Dumon                             http://outerthought.org/
Outerthought - Open Source, Java & XML Competence Support Center
bruno@outerthought.org


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: Source and SourceResolver confusion

Posted by Carsten Ziegeler <cz...@s-und-n.de>.
Nicola Ken Barozzi wrote:
>
> Carsten Ziegeler wrote:
> >
> >>-----Original Message-----
> >>From: Bruno Dumon [mailto:bruno@outerthought.org]
> >>Sent: Tuesday, September 03, 2002 5:23 PM
> >>To: cocoon-dev@xml.apache.org
> >>Subject: Source and SourceResolver confusion
> >>
> >>
> >>I'm a bit confused about the Source & SourceResolver in HEAD. Apparently
> >>the org.apache.cocoon.environment.Source has been deprecated, but the
> >>org.apache.cocoon.environment.SourceResolver is not (and still returns
> >>deprecated cocoon Source objects).
> >
> > Yes, this is true. We can't deprecate the SourceResolver as it is one
> > of the main arguments for the setup() methods for actions,
> generators etc.
>
> Which is why we should start using standard service(ServiceManager sm)
> and other standard Avalon ones instead.
>
At the time, the interfaces for Action, Generator etc were defined, there
was no SourceResolver in excalibur and noone thought of making this
a component.

> The Component would have gotten the serviceManager and no interfaces
> would have changed (although the implementation yes.)
>
Yep, that's right - but unfortunately it's the way it is now and we
shouldn't change the core interfaces (we could do this for a 3.0
version).

Carsten


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


Re: Source and SourceResolver confusion

Posted by Nicola Ken Barozzi <ni...@apache.org>.
Carsten Ziegeler wrote:
> 
>>-----Original Message-----
>>From: Bruno Dumon [mailto:bruno@outerthought.org]
>>Sent: Tuesday, September 03, 2002 5:23 PM
>>To: cocoon-dev@xml.apache.org
>>Subject: Source and SourceResolver confusion
>>
>>
>>I'm a bit confused about the Source & SourceResolver in HEAD. Apparently
>>the org.apache.cocoon.environment.Source has been deprecated, but the
>>org.apache.cocoon.environment.SourceResolver is not (and still returns
>>deprecated cocoon Source objects).
> 
> Yes, this is true. We can't deprecate the SourceResolver as it is one
> of the main arguments for the setup() methods for actions, generators etc.

Which is why we should start using standard service(ServiceManager sm) 
and other standard Avalon ones instead.

The Component would have gotten the serviceManager and no interfaces 
would have changed (although the implementation yes.)

-- 
Nicola Ken Barozzi                   nicolaken@apache.org
             - verba volant, scripta manent -
    (discussions get forgotten, just code remains)
---------------------------------------------------------------------


---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org


RE: Source and SourceResolver confusion

Posted by Carsten Ziegeler <cz...@s-und-n.de>.

> -----Original Message-----
> From: Bruno Dumon [mailto:bruno@outerthought.org]
> Sent: Tuesday, September 03, 2002 5:23 PM
> To: cocoon-dev@xml.apache.org
> Subject: Source and SourceResolver confusion
> 
> 
> I'm a bit confused about the Source & SourceResolver in HEAD. Apparently
> the org.apache.cocoon.environment.Source has been deprecated, but the
> org.apache.cocoon.environment.SourceResolver is not (and still returns
> deprecated cocoon Source objects).
Yes, this is true. We can't deprecate the SourceResolver as it is one
of the main arguments for the setup() methods for actions, generators etc.

> 
> In the act method of the Action interface, a reference to the cocoon
> SourceResolver is passed, so I'm obliged here to use the deprecated
> Source class.
> 
> Is this a known fact, a bug or am I missing something?
> 
The resolve() method of the SourceResolver is deprecated by it inherits
from the org.apache.excalibur.source.SourceResolver class the
resolveURI() method. Use this instead and you don't have to deal
with deprecated methods or classes.

Carsten

---------------------------------------------------------------------
To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org
For additional commands, email: cocoon-dev-help@xml.apache.org