From cocoon-dev-return-17931-apmail-xml-cocoon-dev-archive=xml.apache.org@xml.apache.org Fri Oct 19 16:45:23 2001 Return-Path: Delivered-To: apmail-xml-cocoon-dev-archive@xml.apache.org Received: (qmail 84126 invoked by uid 500); 19 Oct 2001 16:45:22 -0000 Mailing-List: contact cocoon-dev-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: cocoon-dev@xml.apache.org Delivered-To: mailing list cocoon-dev@xml.apache.org Received: (qmail 84094 invoked from network); 19 Oct 2001 16:45:21 -0000 Message-ID: <3BD058DC.C9EA1AD@apache.org> Date: Fri, 19 Oct 2001 12:46:20 -0400 From: Berin Loritsch X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U) X-Accept-Language: en MIME-Version: 1.0 To: cocoon-dev@xml.apache.org Subject: Re: [RT] Environment Revamping References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Carsten Ziegeler wrote: > > > Berin Loritsch wrote: > > > > Carsten Ziegeler wrote: > > > > > > > > > public interface SystemContext extends > > > > org.apache.avalon.framework.context.Context { > > > > Source resolve(String uri); > > > > org.apache.cocoon.environment.Context getEnvironmentContext(); > > > > Object get(Object key); // from Avalon context > > > > } > > > > > > > > This removes the need for the SourceResolver interface to be > > > > exposed or passed > > > > as an argument to Components. Components that do not need it or > > > > use it will > > > > have access to a simpler API. > > > > > > > The intention of this interface is very good, I like it, but > > > I see one (more technical) problem here: the resolve() method > > > is Environment or Request dependant. This means, if a component > > > (e.g. the store) is contextualized at startup and gets the > > > SystemContext, the resolving of resources must be done > > > with the current environment in mind which might result in > > > different resources. > > > This resolving with respect to the current environment is > > > of course necessary for all sitemap components (generators > > > etc). > > > If we get this working: +1 > > > > > > Ok, with that clarification, the resolve method would move to > > RequestContext. > > > > > What do you mean with the org.apache.cocoon.environment.Context > > > object? Is this the RequestContext mentioned below? > > > > No, that is the equivalent of the ServletContext. It is global in scope, > > and only a few components _really_ need it. If you need it, extend > > Contextualizable, and cast the Context to SystemContext. > > > Sorry, I was not very clear here: > I meant the object returned getEnvironmentContext(). That's what I thought you meant. getEnvironmentContext() returns the same object as get(CONTEXT_OBJECT); on objectModel now. It is a global concern, not a request specific concern. --------------------------------------------------------------------- To unsubscribe, e-mail: cocoon-dev-unsubscribe@xml.apache.org For additional commands, email: cocoon-dev-help@xml.apache.org