cziegeler 2004/01/10 06:38:20
Modified: src/java/org/apache/cocoon/components/source/impl
SitemapSource.java
src/java/org/apache/cocoon/environment
ForwardRedirector.java
src/java/org/apache/cocoon ProcessorWrapper.java
Processor.java Cocoon.java
src/java/org/apache/cocoon/components/source
CocoonSourceResolver.java SourceUtil.java
src/java/org/apache/cocoon/components/container
DefaultSitemapConfigurationHolder.java
ComponentContext.java
src/java/org/apache/cocoon/components/pipeline
AbstractProcessingPipeline.java
src/java/org/apache/cocoon/components/cprocessor
InvokeContext.java TreeProcessor.java
src/java/org/apache/cocoon/components/flow/javascript
JSCocoon.java
src/java/org/apache/cocoon/sitemap SitemapRedirector.java
src/java/org/apache/cocoon/components/flow
AbstractInterpreter.java
src/java/org/apache/cocoon/environment/commandline
AbstractCommandLineEnvironment.java
Added: src/java/org/apache/cocoon/environment/internal
EnvironmentInfo.java EnvironmentStack.java
EnvironmentHelper.java EnvironmentContext.java
Removed: src/java/org/apache/cocoon/environment
EnvironmentContext.java EnvironmentHelper.java
EnvironmentInfo.java EnvironmentStack.java
Log:
Move internal classes into own package
Revision Changes Path
1.24 +2 -2
cocoon-2.2/src/java/org/apache/cocoon/components/source/impl/SitemapSource.java
Index: SitemapSource.java
===================================================================
RCS file:
/home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/source/impl/SitemapSource.java,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -r1.23 -r1.24
--- SitemapSource.java 9 Jan 2004 08:39:54 -0000 1.23
+++ SitemapSource.java 10 Jan 2004 14:38:19 -0000 1.24
@@ -66,8 +66,8 @@
import org.apache.cocoon.components.pipeline.ProcessingPipeline;
import org.apache.cocoon.components.source.SourceUtil;
import org.apache.cocoon.environment.Environment;
-import org.apache.cocoon.environment.EnvironmentHelper;
import org.apache.cocoon.environment.ObjectModelHelper;
+import org.apache.cocoon.environment.internal.EnvironmentHelper;
import org.apache.cocoon.environment.wrapper.EnvironmentWrapper;
import org.apache.cocoon.environment.wrapper.MutableEnvironmentFacade;
import org.apache.cocoon.xml.ContentHandlerWrapper;
1.1
cocoon-2.2/src/java/org/apache/cocoon/environment/internal/EnvironmentInfo.java
Index: EnvironmentInfo.java
===================================================================
/*
============================================================================
The Apache Software License, Version 1.1
============================================================================
Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. The end-user documentation included with the redistribution, if any, must
include the following acknowledgment: "This product includes software
developed by the Apache Software Foundation (http://www.apache.org/)."
Alternately, this acknowledgment may appear in the software itself, if
and wherever such third-party acknowledgments normally appear.
4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
used to endorse or promote products derived from this software without
prior written permission. For written permission, please contact
[EMAIL PROTECTED]
5. Products derived from this software may not be called "Apache", nor may
"Apache" appear in their name, without prior written permission of the
Apache Software Foundation.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This software consists of voluntary contributions made by many individuals
on behalf of the Apache Software Foundation and was originally created by
Stefano Mazzocchi <[EMAIL PROTECTED]>. For more information on the Apache
Software Foundation, please see <http://www.apache.org/>.
*/
package org.apache.cocoon.environment.internal;
import org.apache.avalon.framework.service.ServiceManager;
import org.apache.cocoon.Processor;
import org.apache.cocoon.environment.Environment;
/**
* Experimental code for cleaning up the environment handling
* This is an internal class, and it might change in an incompatible way over
time.
* For developing your own components/applications based on Cocoon, you
shouldn't
* really need it.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
* @version CVS $Id: EnvironmentInfo.java,v 1.1 2004/01/10 14:38:19 cziegeler
Exp $
* @since 2.2
*/
public class EnvironmentInfo {
public final Processor processor;
public final int oldStackCount;
public final ServiceManager manager;
public final Environment environment;
public EnvironmentInfo(Processor processor,
int oldStackCount,
ServiceManager manager,
Environment environment) {
this.processor = processor;
this.oldStackCount = oldStackCount;
this.manager = manager;
this.environment = environment;
}
}
1.1
cocoon-2.2/src/java/org/apache/cocoon/environment/internal/EnvironmentStack.java
Index: EnvironmentStack.java
===================================================================
/*
============================================================================
The Apache Software License, Version 1.1
============================================================================
Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. The end-user documentation included with the redistribution, if any, must
include the following acknowledgment: "This product includes software
developed by the Apache Software Foundation (http://www.apache.org/)."
Alternately, this acknowledgment may appear in the software itself, if
and wherever such third-party acknowledgments normally appear.
4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
used to endorse or promote products derived from this software without
prior written permission. For written permission, please contact
[EMAIL PROTECTED]
5. Products derived from this software may not be called "Apache", nor may
"Apache" appear in their name, without prior written permission of the
Apache Software Foundation.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This software consists of voluntary contributions made by many individuals
on behalf of the Apache Software Foundation and was originally created by
Stefano Mazzocchi <[EMAIL PROTECTED]>. For more information on the Apache
Software Foundation, please see <http://www.apache.org/>.
*/
package org.apache.cocoon.environment.internal;
import org.apache.cocoon.xml.XMLConsumer;
import org.apache.commons.collections.ArrayStack;
import org.xml.sax.Attributes;
import org.xml.sax.Locator;
import org.xml.sax.SAXException;
/**
* The stack for the processing environment.
* This is an internal class, and it might change in an incompatible way over
time.
* For developing your own components/applications based on Cocoon, you
shouldn't
* really need it.
* This is a special implementation of a stack for the handling of the
* cocoon protocol and the sitemap source resolving.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
* @version CVS $Id: EnvironmentStack.java,v 1.1 2004/01/10 14:38:19
cziegeler Exp $
* @since 2.2
*/
final class EnvironmentStack
extends ArrayStack
implements Cloneable {
int offset;
EnvironmentInfo getCurrentInfo() {
return (EnvironmentInfo)this.get(offset);
}
void pushInfo(EnvironmentInfo info) {
this.push(info);
}
EnvironmentInfo popInfo() {
return (EnvironmentInfo)this.pop();
}
EnvironmentInfo peekInfo() {
return (EnvironmentInfo)this.peek();
}
int getOffset() {
return this.offset;
}
void setOffset(int value) {
this.offset = value;
}
public Object clone() {
EnvironmentStack old = (EnvironmentStack) super.clone();
old.offset = offset;
return old;
}
XMLConsumer getEnvironmentAwareConsumerWrapper(XMLConsumer consumer,
int oldOffset) {
return new EnvironmentChanger(consumer, this, oldOffset, this.offset);
}
}
/**
* This class is an [EMAIL PROTECTED] XMLConsumer} that changes the current
environment.
* When a pipeline calls an internal pipeline, two environments are
* established: one for the calling pipeline and one for the internal
pipeline.
* Now, if SAX events are send from the internal pipeline, they are
* received by some component of the calling pipeline, so inbetween we
* have to change the environment forth and back.
*/
final class EnvironmentChanger
implements XMLConsumer {
final XMLConsumer consumer;
final EnvironmentStack stack;
final int oldOffset;
final int newOffset;
EnvironmentChanger(XMLConsumer consumer, EnvironmentStack es,
int oldOffset, int newOffset) {
this.consumer = consumer;
this.stack = es;
this.oldOffset = oldOffset;
this.newOffset = newOffset;
}
public void setDocumentLocator(Locator locator) {
this.stack.setOffset(this.oldOffset);
this.consumer.setDocumentLocator(locator);
this.stack.setOffset(this.newOffset);
}
public void startDocument()
throws SAXException {
this.stack.setOffset(this.oldOffset);
this.consumer.startDocument();
this.stack.setOffset(this.newOffset);
}
public void endDocument()
throws SAXException {
this.stack.setOffset(this.oldOffset);
this.consumer.endDocument();
this.stack.setOffset(this.newOffset);
}
public void startPrefixMapping(String prefix, String uri)
throws SAXException {
this.stack.setOffset(this.oldOffset);
this.consumer.startPrefixMapping(prefix, uri);
this.stack.setOffset(this.newOffset);
}
public void endPrefixMapping(String prefix)
throws SAXException {
this.stack.setOffset(this.oldOffset);
this.consumer.endPrefixMapping(prefix);
this.stack.setOffset(this.newOffset);
}
public void startElement(String uri, String loc, String raw, Attributes a)
throws SAXException {
this.stack.setOffset(this.oldOffset);
this.consumer.startElement(uri, loc, raw, a);
this.stack.setOffset(this.newOffset);
}
public void endElement(String uri, String loc, String raw)
throws SAXException {
this.stack.setOffset(this.oldOffset);
this.consumer.endElement(uri, loc, raw);
this.stack.setOffset(this.newOffset);
}
public void characters(char c[], int start, int len)
throws SAXException {
this.stack.setOffset(this.oldOffset);
this.consumer.characters(c, start, len);
this.stack.setOffset(this.newOffset);
}
public void ignorableWhitespace(char c[], int start, int len)
throws SAXException {
this.stack.setOffset(this.oldOffset);
this.consumer.ignorableWhitespace(c, start, len);
this.stack.setOffset(this.newOffset);
}
public void processingInstruction(String target, String data)
throws SAXException {
this.stack.setOffset(this.oldOffset);
this.consumer.processingInstruction(target, data);
this.stack.setOffset(this.newOffset);
}
public void skippedEntity(String name)
throws SAXException {
this.stack.setOffset(this.oldOffset);
this.consumer.skippedEntity(name);
this.stack.setOffset(this.newOffset);
}
public void startDTD(String name, String publicId, String systemId)
throws SAXException {
this.stack.setOffset(this.oldOffset);
this.consumer.startDTD(name, publicId, systemId);
this.stack.setOffset(this.newOffset);
}
public void endDTD()
throws SAXException {
this.stack.setOffset(this.oldOffset);
this.consumer.endDTD();
this.stack.setOffset(this.newOffset);
}
public void startEntity(String name)
throws SAXException {
this.stack.setOffset(this.oldOffset);
this.consumer.startEntity(name);
this.stack.setOffset(this.newOffset);
}
public void endEntity(String name)
throws SAXException {
this.stack.setOffset(this.oldOffset);
this.consumer.endEntity(name);
this.stack.setOffset(this.newOffset);
}
public void startCDATA()
throws SAXException {
this.stack.setOffset(this.oldOffset);
this.consumer.startCDATA();
this.stack.setOffset(this.newOffset);
}
public void endCDATA()
throws SAXException {
this.stack.setOffset(this.oldOffset);
this.consumer.endCDATA();
this.stack.setOffset(this.newOffset);
}
public void comment(char ch[], int start, int len)
throws SAXException {
this.stack.setOffset(this.oldOffset);
this.consumer.comment(ch, start, len);
this.stack.setOffset(this.newOffset);
}
}
1.1
cocoon-2.2/src/java/org/apache/cocoon/environment/internal/EnvironmentHelper.java
Index: EnvironmentHelper.java
===================================================================
/*
============================================================================
The Apache Software License, Version 1.1
============================================================================
Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. The end-user documentation included with the redistribution, if any, must
include the following acknowledgment: "This product includes software
developed by the Apache Software Foundation (http://www.apache.org/)."
Alternately, this acknowledgment may appear in the software itself, if
and wherever such third-party acknowledgments normally appear.
4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
used to endorse or promote products derived from this software without
prior written permission. For written permission, please contact
[EMAIL PROTECTED]
5. Products derived from this software may not be called "Apache", nor may
"Apache" appear in their name, without prior written permission of the
Apache Software Foundation.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This software consists of voluntary contributions made by many individuals
on behalf of the Apache Software Foundation and was originally created by
Stefano Mazzocchi <[EMAIL PROTECTED]>. For more information on the Apache
Software Foundation, please see <http://www.apache.org/>.
*/
package org.apache.cocoon.environment.internal;
import java.io.IOException;
import java.net.MalformedURLException;
import java.util.Map;
import org.apache.avalon.framework.activity.Disposable;
import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.avalon.framework.logger.Logger;
import org.apache.avalon.framework.service.ServiceException;
import org.apache.avalon.framework.service.ServiceManager;
import org.apache.avalon.framework.service.Serviceable;
import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.Processor;
import org.apache.cocoon.components.source.SourceUtil;
import org.apache.cocoon.environment.Environment;
import org.apache.cocoon.environment.ObjectModelHelper;
import org.apache.cocoon.environment.Request;
import org.apache.cocoon.environment.Response;
import org.apache.cocoon.environment.Session;
import org.apache.cocoon.environment.SourceResolver;
import org.apache.cocoon.xml.XMLConsumer;
import org.apache.excalibur.source.Source;
/**
* Experimental code for cleaning up the environment handling
* This is an internal class, and it might change in an incompatible way over
time.
* For developing your own components/applications based on Cocoon, you
shouldn't
* really need it.
*
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
* @version CVS $Id: EnvironmentHelper.java,v 1.1 2004/01/10 14:38:19
cziegeler Exp $
* @since 2.2
*/
public class EnvironmentHelper
extends AbstractLogEnabled
implements SourceResolver, Serviceable, Disposable {
/** The key used to store the current environment context
* in the object model */
static protected final String PROCESS_KEY =
EnvironmentHelper.class.getName();
/** The key used to store the last processor information
* in the environment context
*/
static protected final String LAST_PROCESSOR_KEY = "global:" +
PROCESS_KEY + "/processor";
/** The environment information */
static protected final InheritableThreadLocal environmentStack = new
CloningInheritableThreadLocal();
/** The real source resolver */
protected org.apache.excalibur.source.SourceResolver resolver;
/** The service manager */
protected ServiceManager manager;
/** The complete prefix */
protected String prefix;
/** The Context path */
protected String context;
/** The last prefix, which is stripped off from the request uri */
protected String lastPrefix;
/**
* Constructor
*
*/
public EnvironmentHelper(String context) {
this.context = context;
}
/**
* Constructor
*
*/
public EnvironmentHelper(EnvironmentHelper parent) {
this.context = parent.context;
this.lastPrefix = parent.lastPrefix;
this.prefix = parent.prefix;
}
/* (non-Javadoc)
* @see
org.apache.avalon.framework.service.Serviceable#service(org.apache.avalon.framework.service.ServiceManager)
*/
public void service(ServiceManager manager) throws ServiceException {
this.manager = manager;
this.resolver = (org.apache.excalibur.source.SourceResolver)
this.manager.lookup(org.apache.excalibur.source.SourceResolver.ROLE);
Source source = null;
try {
source = this.resolver.resolveURI(this.context);
this.context = source.getURI();
} catch (IOException ioe) {
throw new ServiceException("EnvironmentHelper", "Unable to
resolve environment context. ", ioe);
} finally {
this.resolver.release(source);
}
}
/* (non-Javadoc)
* @see org.apache.avalon.framework.activity.Disposable#dispose()
*/
public void dispose() {
if ( this.manager != null ) {
this.manager.release( this.resolver );
this.resolver = null;
this.manager = null;
}
}
/* (non-Javadoc)
* @see
org.apache.excalibur.source.SourceResolver#release(org.apache.excalibur.source.Source)
*/
public void release(Source source) {
this.resolver.release(source);
}
/* (non-Javadoc)
* @see
org.apache.excalibur.source.SourceResolver#resolveURI(java.lang.String,
java.lang.String, java.util.Map)
*/
public Source resolveURI(final String location,
String baseURI,
final Map parameters)
throws MalformedURLException, IOException {
return this.resolver.resolveURI(location,
(baseURI == null ? this.context :
baseURI),
parameters);
}
/* (non-Javadoc)
* @see
org.apache.excalibur.source.SourceResolver#resolveURI(java.lang.String)
*/
public Source resolveURI(final String location)
throws MalformedURLException, IOException {
return this.resolveURI(location, null, null);
}
/**
* Return the current context URI
*/
public String getContext() {
return this.context;
}
/**
* Return the prefix
*/
public String getPrefix() {
return this.prefix;
}
/**
* Change the context of the environment.
* @param env The environment to change
* @throws ProcessingException
*/
public void changeContext(Environment env)
throws ProcessingException {
if ( this.lastPrefix != null ) {
final String uris = env.getURI();
if (!uris.startsWith(this.lastPrefix)) {
final String message = "The current URI (" + uris +
") doesn't start with given prefix (" +
this.lastPrefix + ")";
throw new ProcessingException(message);
}
// we don't need to check for slash at the beginning
// of uris - the prefix always ends with a slash!
final int l = this.lastPrefix.length();
env.setURI(this.prefix, uris.substring(l));
}
}
/**
* Set the context of the environment.
* @param env The environment to change
* @throws ProcessingException
*/
public void setContext(Environment env)
throws ProcessingException {
if ( this.prefix != null ) {
// FIXME - This is not correct!
final String uris = env.getURIPrefix() + env.getURI();
if (!uris.startsWith(this.prefix)) {
final String message = "The current URI (" + uris +
") doesn't start with given prefix (" +
this.prefix + ")";
throw new ProcessingException(message);
}
// we don't need to check for slash at the beginning
// of uris - the prefix always ends with a slash!
final int l = this.prefix.length();
env.setURI(this.prefix, uris.substring(l));
}
}
/**
* Adds an prefix to the overall stripped off prefix from the request uri
*/
public void changeContext(Source newSource, String newPrefix)
throws IOException {
final String newContext = newSource.getURI();
if (getLogger().isDebugEnabled()) {
getLogger().debug("Changing Cocoon context");
getLogger().debug(" from context(" + this.context + ") and
prefix(" + this.prefix + ")");
getLogger().debug(" to context(" + newContext + ") and prefix("
+ newPrefix + ")");
}
int l = newPrefix.length();
if (l >= 1) {
this.lastPrefix = newPrefix;
if ( this.prefix == null ) {
this.prefix = "";
}
final StringBuffer buffer = new StringBuffer(this.prefix);
buffer.append(newPrefix);
// check for a slash at the beginning to avoid problems with
subsitemaps
if ( buffer.charAt(buffer.length()-1) != '/') {
buffer.append('/');
this.lastPrefix = this.lastPrefix + '/';
}
this.prefix = buffer.toString();
}
if (SourceUtil.getScheme(this.context).equals("zip")) {
// if the resource is zipped into a war file (e.g. Weblogic temp
deployment)
// FIXME (VG): Is this still required? Better to unify both cases.
if (getLogger().isDebugEnabled()) {
getLogger().debug("Base context is zip: " + this.context);
}
org.apache.excalibur.source.Source source = null;
try {
source = this.resolver.resolveURI(this.context + newContext);
this.context = source.getURI();
} finally {
this.resolver.release(source);
}
} else {
String sContext;
// if we got a absolute context or one with a protocol resolve it
if (newContext.charAt(0) == '/') {
// context starts with the '/' - absolute file URL
sContext = "file:" + newContext;
} else if (newContext.indexOf(':') > 1) {
// context have ':' - absolute URL
sContext = newContext;
} else {
// context is relative to old one
sContext = this.context + '/' + newContext;
}
// Cut the file name part from context (if present)
int i = sContext.lastIndexOf('/');
if (i != -1 && i + 1 < sContext.length()) {
sContext = sContext.substring(0, i + 1);
}
Source source = null;
try {
source = this.resolver.resolveURI(sContext);
this.context = source.getURI();
} finally {
this.resolver.release(source);
}
}
if (getLogger().isDebugEnabled()) {
getLogger().debug("New context is " + this.context);
}
}
public void redirect(Environment env,
boolean sessionmode,
String newURL)
throws IOException {
this.doRedirect(env, sessionmode, newURL, false, false);
}
public void globalRedirect(Environment env,
boolean sessionmode,
String newURL)
throws IOException {
this.doRedirect(env, sessionmode, newURL, false, true);
}
public void permanentRedirect(Environment env, boolean sessionmode,
String newURL)
throws IOException {
this.doRedirect(env, sessionmode, newURL, true, false);
}
/**
* Redirect the client to new URL with session mode
*/
protected void doRedirect(Environment env,
boolean sessionmode,
String newURL,
boolean permanent,
boolean global)
throws IOException {
final Request request =
ObjectModelHelper.getRequest(env.getObjectModel());
// check if session mode shall be activated
if (sessionmode) {
// The session
Session session = null;
if (getLogger().isDebugEnabled()) {
getLogger().debug("redirect: entering session mode");
}
String s = request.getRequestedSessionId();
if (s != null) {
if (getLogger().isDebugEnabled()) {
getLogger().debug("Old session ID found in request, id =
" + s);
if ( request.isRequestedSessionIdValid() ) {
getLogger().debug("And this old session ID is valid");
}
}
}
// get session from request, or create new session
session = request.getSession(true);
if (session == null) {
if (getLogger().isDebugEnabled()) {
getLogger().debug("redirect session mode: unable to get
session object!");
}
}
if (getLogger().isDebugEnabled()) {
getLogger().debug ("redirect: session mode completed, id = "
+ session.getId() );
}
}
// redirect
final Response response =
ObjectModelHelper.getResponse(env.getObjectModel());
env.redirect(newURL, global, permanent);
}
/**
* This hook must be called by the sitemap each time a sitemap is entered
* This method should never raise an exception, except when the
* parameters are not set!
*/
public static void enterProcessor(Processor processor,
ServiceManager manager,
Environment env)
throws ProcessingException {
if ( null == processor) {
throw new ProcessingException("Processor is not set.");
}
EnvironmentStack stack = (EnvironmentStack)environmentStack.get();
if (stack == null) {
stack = new EnvironmentStack();
environmentStack.set(stack);
}
stack.pushInfo(new EnvironmentInfo(processor, stack.getOffset(),
manager, env));
stack.setOffset(stack.size()-1);
((EnvironmentContext)env.getObjectModel().get(PROCESS_KEY)).addAttribute(LAST_PROCESSOR_KEY,
processor);
}
/**
* This hook must be called by the sitemap each time a sitemap is left.
* It's the counterpart to [EMAIL PROTECTED] #enterProcessor(Processor)}.
*/
public static void leaveProcessor() {
final EnvironmentStack stack =
(EnvironmentStack)environmentStack.get();
final EnvironmentInfo info = (EnvironmentInfo)stack.pop();
stack.setOffset(info.oldStackCount);
}
public static void checkEnvironment(Logger logger)
throws Exception {
// TODO (CZ): This is only for testing - remove it later on
final EnvironmentStack stack =
(EnvironmentStack)environmentStack.get();
if (stack != null && !stack.isEmpty() ) {
logger.error("ENVIRONMENT STACK HAS NOT BEEN CLEANED PROPERLY");
throw new ProcessingException("Environment stack has not been
cleaned up properly. "
+"Please report this (if possible
together with a test case) "
+"to the Cocoon developers.");
}
}
/**
* This hook has to be called before a request is processed.
* The hook is called by the Cocoon component and by the
* cocoon protocol implementation.
* This method should never raise an exception, except when
* the environment is not set.
*
* @return A unique key within this thread.
*/
public static Object startProcessing(Environment env)
throws ProcessingException {
if ( null == env) {
throw new ProcessingException("EnvironmentHelper.startProcessing:
environment must be set.");
}
final EnvironmentContext desc = new EnvironmentContext(env);
env.getObjectModel().put(PROCESS_KEY, desc);
env.startingProcessing();
return desc;
}
/**
* Return the environment context
*/
public static EnvironmentContext getCurrentEnvironmentContext() {
final EnvironmentStack stack =
(EnvironmentStack)environmentStack.get();
final EnvironmentInfo info = stack.getCurrentInfo();
final Map objectModel = info.environment.getObjectModel();
return (EnvironmentContext)objectModel.get(PROCESS_KEY);
}
/**
* Return the environment context
*/
public static EnvironmentContext getEnvironmentContext(Environment
environment) {
final Map objectModel = environment.getObjectModel();
return (EnvironmentContext)objectModel.get(PROCESS_KEY);
}
/**
* This hook has to be called before a request is processed.
* The hook is called by the Cocoon component and by the
* cocoon protocol implementation.
* @param key A unique key within this thread return by
* [EMAIL PROTECTED] #startProcessing(Environment)}.
*/
public static void endProcessing(Environment env, Object key) {
env.finishingProcessing();
final EnvironmentContext desc = (EnvironmentContext)key;
desc.dispose();
env.getObjectModel().remove(PROCESS_KEY);
}
/**
* Return the current processor
*/
public static Processor getCurrentProcessor() {
final EnvironmentStack stack =
(EnvironmentStack)environmentStack.get();
if ( stack != null && !stack.isEmpty()) {
final EnvironmentInfo info = stack.getCurrentInfo();
return info.processor;
}
return null;
}
/**
* Get the current sitemap component manager.
* This method return the current sitemap component manager. This
* is the manager that holds all the components of the currently
* processed (sub)sitemap.
*/
static public ServiceManager getSitemapServiceManager() {
final EnvironmentStack stack =
(EnvironmentStack)environmentStack.get();
if ( stack != null && !stack.isEmpty()) {
final EnvironmentInfo info = stack.getCurrentInfo();
return info.manager;
}
return null;
}
/**
* Return the processor that is actually processing the request
*/
public static Processor getLastProcessor(Environment env) {
EnvironmentContext context = (EnvironmentContext)
env.getObjectModel().get(PROCESS_KEY);
return (Processor)env.getAttribute(LAST_PROCESSOR_KEY);
}
/**
* Create an environment aware xml consumer for the cocoon
* protocol
*/
public static XMLConsumer createEnvironmentAwareConsumer(XMLConsumer
consumer) {
final EnvironmentStack stack =
(EnvironmentStack)environmentStack.get();
final EnvironmentInfo info = stack.getCurrentInfo();
return stack.getEnvironmentAwareConsumerWrapper(consumer,
info.oldStackCount);
}
}
final class CloningInheritableThreadLocal
extends InheritableThreadLocal {
/**
* Computes the child's initial value for this InheritableThreadLocal
* as a function of the parent's value at the time the child Thread is
* created. This method is called from within the parent thread before
* the child is started.
* <p>
* This method merely returns its input argument, and should be overridden
* if a different behavior is desired.
*
* @param parentValue the parent thread's value
* @return the child thread's initial value
*/
protected Object childValue(Object parentValue) {
if ( null != parentValue) {
return ((EnvironmentStack)parentValue).clone();
} else {
return null;
}
}
}
1.1
cocoon-2.2/src/java/org/apache/cocoon/environment/internal/EnvironmentContext.java
Index: EnvironmentContext.java
===================================================================
/*
============================================================================
The Apache Software License, Version 1.1
============================================================================
Copyright (C) 1999-2003 The Apache Software Foundation. All rights reserved.
Redistribution and use in source and binary forms, with or without modifica-
tion, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright notice,
this list of conditions and the following disclaimer in the documentation
and/or other materials provided with the distribution.
3. The end-user documentation included with the redistribution, if any, must
include the following acknowledgment: "This product includes software
developed by the Apache Software Foundation (http://www.apache.org/)."
Alternately, this acknowledgment may appear in the software itself, if
and wherever such third-party acknowledgments normally appear.
4. The names "Apache Cocoon" and "Apache Software Foundation" must not be
used to endorse or promote products derived from this software without
prior written permission. For written permission, please contact
[EMAIL PROTECTED]
5. Products derived from this software may not be called "Apache", nor may
"Apache" appear in their name, without prior written permission of the
Apache Software Foundation.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLU-
DING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
This software consists of voluntary contributions made by many individuals
on behalf of the Apache Software Foundation and was originally created by
Stefano Mazzocchi <[EMAIL PROTECTED]>. For more information on the Apache
Software Foundation, please see <http://www.apache.org/>.
*/
package org.apache.cocoon.environment.internal;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;
import org.apache.avalon.framework.activity.Disposable;
import org.apache.avalon.framework.container.ContainerUtil;
import org.apache.cocoon.environment.Environment;
/**
* Experimental code for cleaning up the environment handling
* This is an internal class, and it might change in an incompatible way over
time.
* For developing your own components/applications based on Cocoon, you
shouldn't
* really need it.
*
* The environment context can store any additional objects for an
environment.
* This is an alternative to using the attributes of an environment and
* can be used to store internal objects/information wihtout exposing
* it to clients of the environment object.
* Each object added to the environment context is disposed when the
* processing of the environment is finished. If you don't want to
* dispose an object, use a key that starts with "global:"!
*
* @author <a href="mailto:[EMAIL PROTECTED]">Carsten Ziegeler</a>
* @version CVS $Id: EnvironmentContext.java,v 1.1 2004/01/10 14:38:19
cziegeler Exp $
* @since 2.2
*/
public class EnvironmentContext
implements Disposable {
/** The corresponding environment */
protected Environment environment;
/** The attributes */
protected Map attributes;
/**
* Constructor
*/
public EnvironmentContext(Environment environment) {
this.attributes = new HashMap();
this.environment = environment;
}
/**
* Return the corresponding environment
* @return The environment
*/
public Environment getEnvironment() {
return this.environment;
}
/**
* Add an object to the environment.
* If an object with the same key is already stored, this is overwritten.
* Each object is disposed when the environment is finished. However,
* if you add an object with a key that starts with "global:", then
* the object is not disposed!
*
* @param key The key for the object
* @param value The object itself
*/
public void addAttribute(String key, Object value) {
this.attributes.put(key, value);
}
/**
* Return the object associated with the key
* @param key The unique key
* @return The object or null
*/
public Object getAttribute(String key) {
return this.attributes.get(key);
}
/**
* Remove the object associated with the key
* @param key The unique key
*/
public void removeAttribute(String key) {
this.attributes.remove(key);
}
/* (non-Javadoc)
* @see org.apache.avalon.framework.activity.Disposable#dispose()
*/
public void dispose() {
final Iterator iter = this.attributes.entrySet().iterator();
while ( iter.hasNext() ) {
Map.Entry entry = (Map.Entry)iter.next();
if ( !((String) entry.getKey()).startsWith("global:") ) {
ContainerUtil.dispose(entry.getValue());
}
}
this.attributes.clear();
}
}
1.15 +2 -1
cocoon-2.2/src/java/org/apache/cocoon/environment/ForwardRedirector.java
Index: ForwardRedirector.java
===================================================================
RCS file:
/home/cvs/cocoon-2.2/src/java/org/apache/cocoon/environment/ForwardRedirector.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- ForwardRedirector.java 28 Dec 2003 21:09:59 -0000 1.14
+++ ForwardRedirector.java 10 Jan 2004 14:38:19 -0000 1.15
@@ -55,6 +55,7 @@
import org.apache.avalon.framework.logger.AbstractLogEnabled;
import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.components.cprocessor.TreeProcessor;
+import org.apache.cocoon.environment.internal.*;
/**
* A <code>Redirector</code> that handles forward redirects, i.e. internal
1.10 +2 -2
cocoon-2.2/src/java/org/apache/cocoon/ProcessorWrapper.java
Index: ProcessorWrapper.java
===================================================================
RCS file:
/home/cvs/cocoon-2.2/src/java/org/apache/cocoon/ProcessorWrapper.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- ProcessorWrapper.java 9 Jan 2004 08:36:37 -0000 1.9
+++ ProcessorWrapper.java 10 Jan 2004 14:38:19 -0000 1.10
@@ -56,7 +56,7 @@
import org.apache.avalon.framework.thread.ThreadSafe;
import org.apache.cocoon.components.pipeline.ProcessingPipeline;
import org.apache.cocoon.environment.Environment;
-import org.apache.cocoon.environment.EnvironmentHelper;
+import org.apache.cocoon.environment.internal.EnvironmentHelper;
/**
* This class is a wrapper around the real processor (the
<code>Cocoon</code> class).
1.14 +2 -2 cocoon-2.2/src/java/org/apache/cocoon/Processor.java
Index: Processor.java
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/Processor.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- Processor.java 9 Jan 2004 08:36:37 -0000 1.13
+++ Processor.java 10 Jan 2004 14:38:19 -0000 1.14
@@ -54,7 +54,7 @@
import org.apache.cocoon.components.pipeline.ProcessingPipeline;
import org.apache.cocoon.environment.Environment;
-import org.apache.cocoon.environment.EnvironmentHelper;
+import org.apache.cocoon.environment.internal.EnvironmentHelper;
/**
*
1.35 +2 -2 cocoon-2.2/src/java/org/apache/cocoon/Cocoon.java
Index: Cocoon.java
===================================================================
RCS file: /home/cvs/cocoon-2.2/src/java/org/apache/cocoon/Cocoon.java,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -r1.34 -r1.35
--- Cocoon.java 9 Jan 2004 08:36:37 -0000 1.34
+++ Cocoon.java 10 Jan 2004 14:38:19 -0000 1.35
@@ -72,10 +72,10 @@
import org.apache.cocoon.components.pipeline.ProcessingPipeline;
import org.apache.cocoon.components.source.impl.DelayedRefreshSourceWrapper;
import org.apache.cocoon.environment.Environment;
-import org.apache.cocoon.environment.EnvironmentHelper;
import org.apache.cocoon.environment.ObjectModelHelper;
import org.apache.cocoon.environment.Request;
import org.apache.cocoon.environment.Session;
+import org.apache.cocoon.environment.internal.EnvironmentHelper;
import org.apache.excalibur.source.Source;
import org.apache.excalibur.source.SourceResolver;
import org.apache.excalibur.source.impl.URLSource;
1.7 +2 -2
cocoon-2.2/src/java/org/apache/cocoon/components/source/CocoonSourceResolver.java
Index: CocoonSourceResolver.java
===================================================================
RCS file:
/home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/source/CocoonSourceResolver.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- CocoonSourceResolver.java 27 Dec 2003 15:10:22 -0000 1.6
+++ CocoonSourceResolver.java 10 Jan 2004 14:38:19 -0000 1.7
@@ -58,8 +58,8 @@
import org.apache.avalon.framework.service.ServiceException;
import org.apache.avalon.framework.service.ServiceManager;
import org.apache.cocoon.Processor;
-import org.apache.cocoon.environment.EnvironmentHelper;
import org.apache.cocoon.environment.SourceResolver;
+import org.apache.cocoon.environment.internal.EnvironmentHelper;
import org.apache.excalibur.source.Source;
import org.apache.excalibur.source.SourceException;
import org.apache.excalibur.source.impl.SourceResolverImpl;
1.11 +2 -2
cocoon-2.2/src/java/org/apache/cocoon/components/source/SourceUtil.java
Index: SourceUtil.java
===================================================================
RCS file:
/home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/source/SourceUtil.java,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- SourceUtil.java 7 Jan 2004 15:48:32 -0000 1.10
+++ SourceUtil.java 10 Jan 2004 14:38:19 -0000 1.11
@@ -62,7 +62,7 @@
import org.apache.avalon.framework.service.ServiceSelector;
import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.ResourceNotFoundException;
-import org.apache.cocoon.environment.EnvironmentHelper;
+import org.apache.cocoon.environment.internal.EnvironmentHelper;
import org.apache.cocoon.serialization.Serializer;
import org.apache.cocoon.xml.IncludeXMLConsumer;
import org.apache.cocoon.xml.XMLUtils;
1.2 +2 -2
cocoon-2.2/src/java/org/apache/cocoon/components/container/DefaultSitemapConfigurationHolder.java
Index: DefaultSitemapConfigurationHolder.java
===================================================================
RCS file:
/home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/container/DefaultSitemapConfigurationHolder.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- DefaultSitemapConfigurationHolder.java 7 Jan 2004 15:57:30 -0000
1.1
+++ DefaultSitemapConfigurationHolder.java 10 Jan 2004 14:38:19 -0000
1.2
@@ -55,7 +55,7 @@
import org.apache.cocoon.components.ChainedConfiguration;
import org.apache.cocoon.components.SitemapConfigurationHolder;
-import org.apache.cocoon.environment.EnvironmentHelper;
+import org.apache.cocoon.environment.internal.EnvironmentHelper;
/**
* This is the implementation for the sitemap configuration holder that
implements
1.2 +2 -2
cocoon-2.2/src/java/org/apache/cocoon/components/container/ComponentContext.java
Index: ComponentContext.java
===================================================================
RCS file:
/home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/container/ComponentContext.java,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- ComponentContext.java 7 Jan 2004 15:57:30 -0000 1.1
+++ ComponentContext.java 10 Jan 2004 14:38:19 -0000 1.2
@@ -54,7 +54,7 @@
import org.apache.avalon.framework.context.ContextException;
import org.apache.avalon.framework.context.DefaultContext;
import org.apache.cocoon.components.ContextHelper;
-import org.apache.cocoon.environment.EnvironmentHelper;
+import org.apache.cocoon.environment.internal.EnvironmentHelper;
import java.util.Map;
1.25 +2 -2
cocoon-2.2/src/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java
Index: AbstractProcessingPipeline.java
===================================================================
RCS file:
/home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/pipeline/AbstractProcessingPipeline.java,v
retrieving revision 1.24
retrieving revision 1.25
diff -u -r1.24 -r1.25
--- AbstractProcessingPipeline.java 8 Jan 2004 11:13:07 -0000 1.24
+++ AbstractProcessingPipeline.java 10 Jan 2004 14:38:19 -0000 1.25
@@ -70,9 +70,9 @@
import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.Processor;
import org.apache.cocoon.environment.Environment;
-import org.apache.cocoon.environment.EnvironmentHelper;
import org.apache.cocoon.environment.ObjectModelHelper;
import org.apache.cocoon.environment.Response;
+import org.apache.cocoon.environment.internal.EnvironmentHelper;
import org.apache.cocoon.generation.Generator;
import org.apache.cocoon.reading.Reader;
import org.apache.cocoon.serialization.Serializer;
1.5 +3 -3
cocoon-2.2/src/java/org/apache/cocoon/components/cprocessor/InvokeContext.java
Index: InvokeContext.java
===================================================================
RCS file:
/home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/cprocessor/InvokeContext.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- InvokeContext.java 9 Jan 2004 08:36:37 -0000 1.4
+++ InvokeContext.java 10 Jan 2004 14:38:19 -0000 1.5
@@ -63,8 +63,8 @@
import org.apache.avalon.framework.service.Serviceable;
import org.apache.cocoon.components.pipeline.ProcessingPipeline;
import org.apache.cocoon.components.cprocessor.variables.VariableResolver;
-import org.apache.cocoon.environment.EnvironmentContext;
-import org.apache.cocoon.environment.EnvironmentHelper;
+import org.apache.cocoon.environment.internal.EnvironmentContext;
+import org.apache.cocoon.environment.internal.EnvironmentHelper;
/**
* The invocation context of <code>ProcessingNode</code>s.
1.13 +2 -2
cocoon-2.2/src/java/org/apache/cocoon/components/cprocessor/TreeProcessor.java
Index: TreeProcessor.java
===================================================================
RCS file:
/home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/cprocessor/TreeProcessor.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- TreeProcessor.java 9 Jan 2004 08:36:37 -0000 1.12
+++ TreeProcessor.java 10 Jan 2004 14:38:19 -0000 1.13
@@ -84,8 +84,8 @@
import org.apache.cocoon.components.source.SourceUtil;
import org.apache.cocoon.components.source.impl.DelayedRefreshSourceWrapper;
import org.apache.cocoon.environment.Environment;
-import org.apache.cocoon.environment.EnvironmentContext;
-import org.apache.cocoon.environment.EnvironmentHelper;
+import org.apache.cocoon.environment.internal.EnvironmentContext;
+import org.apache.cocoon.environment.internal.EnvironmentHelper;
import org.apache.cocoon.environment.wrapper.EnvironmentWrapper;
import org.apache.cocoon.environment.wrapper.MutableEnvironmentFacade;
import org.apache.cocoon.xml.ContentHandlerWrapper;
1.16 +2 -2
cocoon-2.2/src/java/org/apache/cocoon/components/flow/javascript/JSCocoon.java
Index: JSCocoon.java
===================================================================
RCS file:
/home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/flow/javascript/JSCocoon.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- JSCocoon.java 7 Jan 2004 15:48:32 -0000 1.15
+++ JSCocoon.java 10 Jan 2004 14:38:19 -0000 1.16
@@ -59,7 +59,6 @@
import org.mozilla.javascript.JavaScriptException;
import org.apache.cocoon.sitemap.SitemapRedirector;
-import org.apache.cocoon.environment.EnvironmentHelper;
import org.apache.cocoon.environment.SourceResolver;
import org.apache.cocoon.environment.Session;
import org.apache.cocoon.environment.Response;
@@ -68,6 +67,7 @@
import org.apache.cocoon.environment.ObjectModelHelper;
import org.apache.cocoon.environment.Environment;
import org.apache.cocoon.environment.Context;
+import org.apache.cocoon.environment.internal.EnvironmentHelper;
import org.apache.cocoon.components.modules.output.OutputModule;
import org.apache.cocoon.components.modules.input.InputModule;
import org.apache.cocoon.components.cprocessor.sitemap.PipelinesNode;
1.6 +2 -2
cocoon-2.2/src/java/org/apache/cocoon/sitemap/SitemapRedirector.java
Index: SitemapRedirector.java
===================================================================
RCS file:
/home/cvs/cocoon-2.2/src/java/org/apache/cocoon/sitemap/SitemapRedirector.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- SitemapRedirector.java 16 Nov 2003 23:17:10 -0000 1.5
+++ SitemapRedirector.java 10 Jan 2004 14:38:19 -0000 1.6
@@ -51,8 +51,8 @@
package org.apache.cocoon.sitemap;
import org.apache.cocoon.environment.Environment;
-import org.apache.cocoon.environment.EnvironmentHelper;
import org.apache.cocoon.environment.Redirector;
+import org.apache.cocoon.environment.internal.EnvironmentHelper;
import java.io.IOException;
1.16 +2 -2
cocoon-2.2/src/java/org/apache/cocoon/components/flow/AbstractInterpreter.java
Index: AbstractInterpreter.java
===================================================================
RCS file:
/home/cvs/cocoon-2.2/src/java/org/apache/cocoon/components/flow/AbstractInterpreter.java,v
retrieving revision 1.15
retrieving revision 1.16
diff -u -r1.15 -r1.16
--- AbstractInterpreter.java 5 Jan 2004 08:17:31 -0000 1.15
+++ AbstractInterpreter.java 10 Jan 2004 14:38:19 -0000 1.16
@@ -64,7 +64,7 @@
import org.apache.cocoon.components.cprocessor.sitemap.PipelinesNode;
import org.apache.cocoon.environment.Context;
import org.apache.cocoon.environment.Environment;
-import org.apache.cocoon.environment.EnvironmentHelper;
+import org.apache.cocoon.environment.internal.EnvironmentHelper;
import org.apache.cocoon.environment.wrapper.EnvironmentWrapper;
import org.apache.excalibur.source.SourceUtil;
1.9 +2 -2
cocoon-2.2/src/java/org/apache/cocoon/environment/commandline/AbstractCommandLineEnvironment.java
Index: AbstractCommandLineEnvironment.java
===================================================================
RCS file:
/home/cvs/cocoon-2.2/src/java/org/apache/cocoon/environment/commandline/AbstractCommandLineEnvironment.java,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- AbstractCommandLineEnvironment.java 30 Oct 2003 12:38:26 -0000
1.8
+++ AbstractCommandLineEnvironment.java 10 Jan 2004 14:38:19 -0000
1.9
@@ -58,7 +58,7 @@
import org.apache.cocoon.ProcessingException;
import org.apache.cocoon.components.source.SourceUtil;
import org.apache.cocoon.environment.AbstractEnvironment;
-import org.apache.cocoon.environment.EnvironmentHelper;
+import org.apache.cocoon.environment.internal.EnvironmentHelper;
import org.apache.excalibur.source.Source;
import org.apache.excalibur.source.SourceException;
import org.apache.excalibur.source.SourceResolver;